Files
sif/modules/http/nosql-injection-error.yaml
TigahandGitHub f8f3b8cca6 feat(modules): add active web-vuln probe modules (#271)
* feat(modules): add active web-vuln probe modules

Add five active-probe modules to modules/http: ssti-reflected (arithmetic
eval proof), command-injection (id output, not payload echo), and error-based
xpath, nosql, and ldap injection. Each keys on a transformed response the
payload cannot produce by reflection, so a benign echo cannot trigger it.

* chore(modules): trim redundant module header comments

drop top-line comments that just restate the id/name fields already
present in the same file
2026-07-22 12:35:27 -07:00

52 lines
1.1 KiB
YAML

id: nosql-injection-error
info:
name: NoSQL Injection (Error-Based)
author: sif
severity: high
description: Detects NoSQL injection via MongoDB driver error messages
tags: [nosql, injection, mongodb, database, owasp-top10]
type: http
http:
method: GET
paths:
- "{{BaseURL}}/?id={{payload}}"
- "{{BaseURL}}/?user={{payload}}"
- "{{BaseURL}}/?username={{payload}}"
- "{{BaseURL}}/?search={{payload}}"
- "{{BaseURL}}/?q={{payload}}"
- "{{BaseURL}}/?filter={{payload}}"
payloads:
- "'"
- "\""
- "\\"
- "';return true;var x='"
- "{\"$gt\":\"\"}"
- "[$ne]=1"
threads: 10
matchers:
- type: regex
part: body
regex:
- "MongoError"
- "MongoServerError"
- "MongoParseError"
- "E11000 duplicate key"
- "CastError"
- "BSONError"
- "BSONTypeError"
- "MongoNetworkError"
condition: or
extractors:
- type: regex
name: nosql_error
part: body
regex:
- "(Mongo[A-Za-z]*Error|E11000 duplicate key|CastError|BSON[A-Za-z]*Error)"
group: 1