timwhitez starred SharpToken
2022-9-30 10:20:10 Author: github.com(查看原文) 阅读量:20 收藏

.NET版本的incognito

image

Usage

SharpToken By BeichenDream
=========================================================

Github : https://github.com/BeichenDream/SharpToken

Usage:

SharpToken COMMAND arguments

COMMANDS:

	list_token [process pid]	

	list_all_token [process pid]

	add_user    <username> <password> [group] [domain]

	enableUser <username> <NewPassword> [NewGroup]

	delete_user <username> [domain]
    
	execute <tokenUser> <commandLine> [Interactive]

	enableRDP

	tscon <targetSessionId> [sourceSessionId]


example:
    SharpToken list_token
    SharpToken list_token 6543
    SharpToken add_user admin Abcd1234! Administrators
    SharpToken enableUser Guest Abcd1234! Administrators
    SharpToken delete_user admin
    SharpToken execute "NT AUTHORITY\SYSTEM" "cmd /c whoami"
    SharpToken execute "NT AUTHORITY\SYSTEM" cmd true
    SharpToken tscon 1


枚举Token

枚举的信息包括SID,LogonDomain,UserName,Session,LogonType,TokenType,TokenHandle(Duplicate后的Token句柄),TargetProcessId(Token来源的进程),TargetProcessToken(Token在源进程的句柄),Groups(Token用户所在组)

image

从指定进程枚举Token

SharpToken list_token 468

image

获得交互式shell

execute "NT AUTHORITY\SYSTEM" cmd true

image

获取命令执行结果(webshell下执行)

SharpToken execute "NT AUTHORITY\SYSTEM" "cmd /c whoami"

image


文章来源: https://github.com/BeichenDream/SharpToken
如有侵权请联系:admin#unsafe.sh