<menu id="guoca"></menu>
<nav id="guoca"></nav><xmp id="guoca">
  • <xmp id="guoca">
  • <nav id="guoca"><code id="guoca"></code></nav>
  • <nav id="guoca"><code id="guoca"></code></nav>

    SharpStrike:基于C#實現的后滲透漏洞利用研究工具

    VSole2021-09-18 17:18:22

    關于SharpStrike

    SharpStrike是一款基于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和命令行終端應用程序,每一個版本都實現的是相同的功能。

    工具使用

    命令行終端版本

    SharpStrike.exe --help
    SharpStrike.exe --show-commands
    SharpStrike.exe --show-examples
    SharpStrike.exe -c ls_domain_admins
    SharpStrike.exe -c ls_domain_users_list
    SharpStrike.exe -c cat -f "c:\users\user\desktop\file.txt" -s [remote IP address]
    SharpStrike.exe -c cat -f "c:\users\user\desktop\file.txt" -s [remote IP address] -u [username] -d [domain] -p [password] -c
    SharpStrike.exe -c command_exec -e "quser" -s [remote IP address] -u [username] -d [domain] -p [password]
    

    GUI版本

    show-commands
    show-examples
    ls_domain_admins
    ls_domain_users_list
    cat -f "c:\users\user\desktop\file.txt" -s [remote IP address]
    cat -f "c:\users\user\desktop\file.txt" -s [remote IP address] -u [username] -d [domain] -p [password]
    command_exec -e "quser" [remote IP address] -u [username] -d [domain] -p [password]
    

    功能介紹

    文件操作

    cat                          -  Reads the contents of a file
    copy                         -  Copies a file from one location to another
    download**                   -  Download a file from the targeted machine
    ls                           -  File/Directory listing of a specific directory
    search                       -  Search for a file on a user
    upload**                     -  Upload a file to the targeted machine
    

    橫向活動

    command_exec**               -  Run a command line command and receive the output. Run with nops flag to disable PowerShell
    disable_wdigest              -  Sets the registry value for UseLogonCredential to zero
    enable_wdigest               -  Adds registry value UseLogonCredential
    disable_winrm**              -  Disables WinRM on the targeted system
    enable_winrm**               -  Enables WinRM on the targeted system
    reg_mod                      -  Modify the registry on the targeted machine
    reg_create                   -  Create the registry value on the targeted machine
    reg_delete                   -  Delete the registry on the targeted machine
    remote_posh**                -  Run a PowerShell script on a remote machine and receive the output
    sched_job                    -  Not implimented due to the Win32_ScheduledJobs accessing an outdated API
    service_mod                  -  Create, delete, or modify system services
    ls_domain_users***           - List domain users
    ls_domain_users_list***      - List domain users sAMAccountName
    ls_domain_users_email***     - List domain users email address
    ls_domain_groups***          - List domain user groups
    ls_domain_admins***          - List domain admin users
    ls_user_groups***            - List domain user with their associated groups
    ls_computers***              - List computers on current domain
    

    進程操作

    process_kill                 -  Kill a process via name or process id on the targeted machine
    process_start                -  Start a process on the targeted machine
    ps                           -  Process listing
    

    系統操作

    active_users                 -  List domain users with active processes on the targeted system
    basic_info                   -  Used to enumerate basic metadata about the targeted system
    drive_list                   -  List local and network drives
    share_list                   -  List network shares
    ifconfig                     -  Receive IP info from NICs with active network connections
    installed_programs           -  Receive a list of the installed programs on the targeted machine
    logoff                       -  Log users off the targeted machine
    reboot (or restart)          -  Reboot the targeted machine
    power_off (or shutdown)      -  Power off the targeted machine
    vacant_system                -  Determine if a user is away from the system
    edr_query                    -  Query the local or remote system for EDR vendors
    

    日志操作

    logon_events                 -  Identify users that have logged onto a system
    
    
    * All PowerShell can be disabled by using the --nops flag, although some commands will not execute (upload/download, enable/disable WinRM)
    ** Denotes PowerShell usage (either using a PowerShell Runspace or through Win32_Process::Create method)
    *** Denotes LDAP usage - "root\directory\ldap" namespace
    

    工具使用演示

    GUI版本使用

    命令行終端版本使用

    【GIF】

    項目地址

    SharpStrike:【點擊閱讀原文獲取】

    參考資料

    https://fortynorthsecurity.com/blog/cimplant-part-1-detections/

    https://www.fireeye.com/blog/threat-research/2017/03/wmimplant_a_wmi_ba.html

    https://c99.sh/sharpstrike-post-exploitation-tool-cim-wmi-inside/

    domaindesktop
    本作品采用《CC 協議》,轉載必須注明作者和本文鏈接
    域密碼噴灑實現
    2021-12-30 06:49:03
    域密碼噴灑實現
    證書服務發布的部分證書可用于kerberos認證,并且可以再返回的PAC中獲取NTMLhash。
    金票可以使用krbtgt的NTLM hash創建作為任何用戶的有效TGT。
    DarkBit勒索軟件分析
    2023-05-15 09:10:03
    json內容包括:文件大小限制:最小為25MB,最大為6GB,不同大小的文件被分成不同的部分,每個部分的大小也不相同。如 1000MB 到 4000MB 的大小的文件,被分為3部分,每部分大小不超過 10000 字節。DarkBit 會單獨加密這些較小的部分中的每一個,而不是一次加密整個文件。文件擴展名限制:排除特定的文件擴展名。利用 Go_Parser 解析 runtime 庫,把生成map文件導入到 x64dbg 檢測處理器是否為
    systeminfo | findstr /B /C:"OS Name" /C:"OS Version". systeminfo | findstr /B /C:"OS 名稱" /C:"OS 版本" #中文操作系統。schtasks /query /fo LIST /v #query顯示所有計劃任務。
    很早就想專門寫一篇關于內網的文章,一直沒有騰出空來,萬萬沒想到,寫下這篇文章的時候,竟然是我來某實驗室實習的時間段:)
    Detectionlab安裝及使用
    2022-04-14 14:39:16
    雷神眾測擁有對此文章的修改和解釋權。如欲轉載或傳播此文章,必須保證此文章的完整性,包括版權聲明等全部內容。未經雷神眾測允許,不得任意修改或者增減此文章內容,不得以任何方式將其用于商業目的。
    本機信息收集 查詢網絡配置信息 ipconfig /all 查詢本機的服務信息 wmic service list brief
    原理黃金票據的原理就是用krbtgt的hash來偽造TGT的內容。第四步主要是來驗證客戶端的身份。所謂的黃金票據其實就是kerberos認證的第二個階段中的tgs的ticket也就是TGT。
    VSole
    網絡安全專家
      亚洲 欧美 自拍 唯美 另类