SharPyShell
v1.3.0

SharpyShell是一个微小且混淆的ASP.NET Webshell,执行由加密的通道收到的命令,可在运行时记忆中编译它们。
SharpyShell仅支持在.NET框架上运行的C#Web应用程序> = 2.0
VB不支持ATM。
python3 SharPyShell.py generate -p somepassword
python3 SharPyShell.py interact -u http://target.url/sharpyshell.aspx -p somepassword
Python版本> = 3.6
和
pip3 install -r requirements.txt
Sharpyshell是用Python编写的爆炸后框架,其能够:
该框架的主要目的是为渗透测试仪提供一系列工具,以简化后剥削阶段,一旦对IIS Weberver进行了成功的剥削。
该工具不是作为替代C2服务器的框架(IE MeterPreter,Empire,ECC ..)的替代,但是当您降落到完全受限的服务器时,应使用此工具,该服务器非常有限。
在此框架中,当您在目标服务器的CMD后面打字时,您将拥有PRIVESC,NETDISCOVERY和横向移动所需的所有工具。
此外,该框架的目的是在内存执行C#代码和PowerShell模块中尽可能地偷偷摸摸。
Sharpyshell实施的混淆旨在逃避文件签名和网络签名ID。
对于逃避网络签名,已经开发了一个完全加密的通道,以发送命令和接收输出。
使用对运行时编译C#代码的预编译的DLL上的反射,已经实现了文件签名的逃避。
由asciiflow.com生成
+-------------------------------------------+ +--------------------------------------------+
| SharPyShell Client (Local) | | Target Server (Remote) |
+-------------------------------------------+ +--------------+ +--------------------------------------------+
| | | Encrypted | | |
| +--------+-----------------^-----------<----> HTTP <---->-----------+-----------------^--------+ |
| | | | | Channel | | | | |
| |4-Receive |1-Send | +--------------+ | |2-Receive |3-Send |
| | | | | | | |
| +--------v-----------------+--------+ | | +--------v-----------------+--------+ |
| | Module | | | | Webshell URL | |
| +--------+-----------------^--------+ | | +--------+-----------------^--------+ |
| | |Parse |Generate| | | | |Parse |Generate| |
| | +------v------+ +------+------+ | | | | +------v------+ +------+------+ | |
| | |Base64 Resp | |Base64 Req | | | | | |Base64 Req | |Base64 Resp | | |
| | +------+------+ +------^------+ | | | | +------+------+ +------^------+ | |
| | |Decode |Encode | | | | |Decode |Encode | |
| | +------v------+ +------+------+ | | | | +------v------+ +------+------+ | |
| | |Xor/Aes Data | |Xor/Aes Data | | | | | |Xor/Aes Data | |Xor/Aes Data | | |
| | +------+------+ +------^------+ | | | | +------+------+ +------^------+ | |
| | |Decrypt |Encrypt | | | | |Decrypt |Encrypt | |
| | +------v------+ +------+------+ | | | | +------v------+ +------+------+ | |
| | |Response | |C# Code | | | | | |C# Code | |Output | | |
| | +------+------+ +------+------+ | | | | +------+------+ +------+------+ | |
| | | ^ | | | | | ^ | |
| | v | | | | | v | | |
| | +--------+--------+ | | | | +--------+--------+ | |
| | | | | | | | | |
| +---------------- ^ ----------------+ | | +---------------- ^ ----------------+ |
| | | | | |
| |Run&Parse | | |Compile&Run |
| | | | | |
| +------ v ------+ | | +------ v ------+ |
| |Terminal | | | |csc.exe | |
| +---------------+ | | +---------------+ |
| |Modules: | | | |System.dll | |
| |#exec_cmd | | | |Compile in Mem | |
| |#exec_ps | | | |No exe output | |
| |#runas | | | | | |
| |..... | | | | | |
| | | | | | | |
| +---------------+ | | +---------------+ |
| | | |
+-------------------------------------------+ +--------------------------------------------+
#download Download a file from the server
#exec_cmd Run a cmd.exe /c command on the server
#exec_ps Run a powershell.exe -nop -noni -enc 'base64command' on the server
#inject_dll_reflective Inject a reflective DLL in a new (or existing) process
#inject_dll_srdi Inject a generic DLL in a new (or existing) process
#inject_shellcode Inject shellcode in a new (or existing) process
#invoke_ps_module Run a ps1 script on the target server
#invoke_ps_module_as Run a ps1 script on the target server as a specific user
#lateral_psexec Run psexec binary to move laterally
#lateral_wmi Run builtin WMI command to move laterally
#mimikatz Run an offline version of mimikatz directly in memory
#net_portscan Run a port scan using regular sockets, based (pretty) loosely on nmap
#privesc_juicy_potato Launch InMem Juicy Potato attack trying to impersonate NT AUTHORITYSYSTEM
#privesc_powerup Run Powerup module to assess all misconfiguration for privesc
#runas Run a cmd.exe /c command spawning a new process as a specific user
#runas_ps Run a powershell.exe -enc spawning a new process as a specific user
#upload Upload a file to the server
Windows Server> = 2008标准X64