安全矩阵

 找回密码
 立即注册
搜索
查看: 2185|回复: 0

SharpStrike:基于C#实现的后渗透漏洞利用研究工具

[复制链接]

221

主题

233

帖子

792

积分

高级会员

Rank: 4

积分
792
发表于 2021-9-22 13:47:23 | 显示全部楼层 |阅读模式
https://mp.weixin.qq.com/s?__biz ... 8a1fcbc183d841c4#rd

SharpStrike:基于C#实现的后渗透漏洞利用研究工具原创 Alpha_h4ck [url=]FreeBuf[/url] 4天前

关于SharpStrikeSharpStrike是一款基于C#开发的后渗透工具,该工具可以使用CIM或WMI来查询远程系统。除此之外,该工具还可以使用研究人员提供的凭证信息或使用当前的用户会话。
注意:SharpStrike中的某些命令将使用PowerShell结合WMI以实现其功能。
SharpStrike可以帮助广大研究人员收集关于目标远程系统的数据、执行命令以及提取数据等等。该工具允许使用WMI或CIM来跟远程系统进行连接,而CIM的使用则需要我们获取到目标系统的管理员权限。
解决方案架构SharpStrike由三个主组件构成:
服务层:提供核心功能并由UI层使用(cs、ExecuteWMI.cs、ExecuteCIM.cs);
模型:包含整个项目所有共享的数据类型;
用户接口:GUI/命令行终端;
工具安装我们可以选择直接使用该项目【Releases页面】所提供的预构建版本,不过这个版本是在调式模式下构建的。
手动构建首先,我们需要使用下列命令将该项目源码克隆至本地:

           

git clone https://github.com/iomoath/SharpStrike.git
接下来,在Visual Studio中加载项目中的SharpStrike.sln文件。
选择顶部菜单中的“构建”项,然后构建解决方案。
此时将会生成两个版本的SharpStrike,即带有GUI界面的WinForms和命令行终端应用程序,每一个版本都实现的是相同的功能。
工具使用命令行终端版本
  1. SharpStrike.exe --help

  2. SharpStrike.exe --show-commands

  3. SharpStrike.exe --show-examples

  4. SharpStrike.exe -c ls_domain_admins

  5. SharpStrike.exe -c ls_domain_users_list

  6. SharpStrike.exe -c cat -f "c:\users\user\desktop\file.txt" -s [remote IP address]

  7. SharpStrike.exe -c cat -f "c:\users\user\desktop\file.txt" -s [remote IP address] -u [username] -d [domain] -p [password] -c

  8. SharpStrike.exe -c command_exec -e "quser" -s [remote IP address] -u [username] -d [domain] -p [password]
复制代码
GUI版本
  1. show-commands

  2. show-examples

  3. ls_domain_admins

  4. ls_domain_users_list

  5. cat -f "c:\users\user\desktop\file.txt" -s [remote IP address]

  6. cat -f "c:\users\user\desktop\file.txt" -s [remote IP address] -u [username] -d [domain] -p [password]

  7. command_exec -e "quser" [remote IP address] -u [username] -d [domain] -p [password]
复制代码
功能介绍文件操作
  1. cat                          -  Reads the contents of a file

  2. copy                         -  Copies a file from one location to another

  3. download**                   -  Download a file from the targeted machine

  4. ls                           -  File/Directory listing of a specific directory

  5. search                       -  Search for a file on a user

  6. upload**                     -  Upload a file to the targeted machine
复制代码
横向活动
  1. command_exec**               -  Run a command line command and receive the output. Run with nops flag to disable PowerShell

  2. disable_wdigest              -  Sets the registry value for UseLogonCredential to zero

  3. enable_wdigest               -  Adds registry value UseLogonCredential

  4. disable_winrm**              -  Disables WinRM on the targeted system

  5. enable_winrm**               -  Enables WinRM on the targeted system

  6. reg_mod                      -  Modify the registry on the targeted machine

  7. reg_create                   -  Create the registry value on the targeted machine

  8. reg_delete                   -  Delete the registry on the targeted machine

  9. remote_posh**                -  Run a PowerShell script on a remote machine and receive the output

  10. sched_job                    -  Not implimented due to the Win32_ScheduledJobs accessing an outdated API

  11. service_mod                  -  Create, delete, or modify system services

  12. ls_domain_users***           - List domain users

  13. ls_domain_users_list***      - List domain users sAMAccountName

  14. ls_domain_users_email***     - List domain users email address

  15. ls_domain_groups***          - List domain user groups

  16. ls_domain_admins***          - List domain admin users

  17. ls_user_groups***            - List domain user with their associated groups

  18. ls_computers***              - List computers on current domain
复制代码
进程操作
  1. process_kill                 -  Kill a process via name or process id on the targeted machine

  2. process_start                -  Start a process on the targeted machine

  3. ps                           -  Process listing
复制代码
系统操作

  1. active_users                 -  List domain users with active processes on the targeted system

  2. basic_info                   -  Used to enumerate basic metadata about the targeted system

  3. drive_list                   -  List local and network drives

  4. share_list                   -  List network shares

  5. ifconfig                     -  Receive IP info from NICs with active network connections

  6. installed_programs           -  Receive a list of the installed programs on the targeted machine

  7. logoff                       -  Log users off the targeted machine

  8. reboot (or restart)          -  Reboot the targeted machine

  9. power_off (or shutdown)      -  Power off the targeted machine

  10. vacant_system                -  Determine if a user is away from the system

  11. edr_query                    -  Query the local or remote system for EDR vendors
复制代码
日志操作
  1. logon_events                 -  Identify users that have logged onto a system



  2. * All PowerShell can be disabled by using the --nops flag, although some commands will not execute (upload/download, enable/disable WinRM)

  3. ** Denotes PowerShell usage (either using a PowerShell Runspace or through Win32_Process::Create method)

  4. *** Denotes LDAP usage - "root\directory\ldap" namespace
复制代码
工具使用演示GUI版本使用

命令行终端版本使用【GIF】
项目地址SharpStrike:【点击阅读原文获取】
参考资料https://fortynorthsecurity.com/blog/cimplant-part-1-detections/
https://www.fireeye.com/blog/thr ... plant_a_wmi_ba.html
https://c99.sh/sharpstrike-post-exploitation-tool-cim-wmi-inside/













回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|安全矩阵

GMT+8, 2024-4-19 05:29 , Processed in 0.013717 second(s), 18 queries .

Powered by Discuz! X4.0

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表