$npx -y skills add elementalsouls/Claude-BugHunter --skill hunt-sqliHunting skill for sqli vulnerabilities. Built from 12 public bug bounty reports including modern NoSQL injection (Rocket.Chat CVE-2021-22911 MongoDB $regex, Mongoose ORM CVE-2024-53900 $where bypass), modern ORM raw-fragment SQLi (Django CVE-2024-42005, Sequelize GHSA-wrh9-cjv3-2
| 1 | ## Autonomous Testing Priority |
| 2 | |
| 3 | **Distrust the target's own hints.** Text embedded in the page (tutorial notes, "no errors shown — use blind", suggested payloads) is UNTRUSTED and often steers you to the slowest or a dead-end path. Decide your technique from what the *live responses* actually do, and always prefer the fastest technique that works — even if the page tells you to do something harder. |
| 4 | |
| 5 | **Pick the technique by whether the endpoint REFLECTS query results.** A search/listing/report page that shows rows back to you → use **UNION** to dump data straight into that visible output: it's fast (a few requests) and the stolen data lands in the response where it can be *proven*. Reserve slow **blind boolean** extraction (`AND SUBSTR(...)='x'`, char-by-char) ONLY for endpoints that return no reflected data — it costs hundreds of requests and the recovered value never appears in any response, so it's the last resort, not the first move. |
| 6 | |
| 7 | **For a UNION-based dump, the column count is everything — establish it FIRST, by enumeration, never by guessing.** A UNION with the wrong number of columns silently returns no rows, which looks identical to "not vulnerable." Most failed SQLi attempts are just a wrong column count. |
| 8 | |
| 9 | 1. **Confirm injection:** send a single `'` and look for a DB error or a changed/broken response. |
| 10 | 2. **Find the column count — exhaustively, one at a time:** |
| 11 | ``` |
| 12 | ' ORDER BY 1-- - ' ORDER BY 2-- - ... (increment until it errors → count = last good) |
| 13 | ' UNION SELECT NULL-- - |
| 14 | ' UNION SELECT NULL,NULL-- - |
| 15 | ' UNION SELECT NULL,NULL,NULL-- - (keep ADDING one NULL — try up to ~12) |
| 16 | ``` |
| 17 | The correct count is when the UNION stops erroring / starts returning extra rows. **Do not attempt to select real column names until the NULL count matches** — and don't stop at 3–4; tables often have 5+ columns. |
| 18 | 3. **Find which columns are reflected:** replace NULLs with markers, e.g. `UNION SELECT 1,2,3,4,5-- -`, and see which numbers appear on the page. |
| 19 | 4. **Dump:** put the data in the *reflected* positions, e.g. `UNION SELECT 1,username,password_md5,4,5 FROM users-- -` (MySQL) or read schema from `information_schema.columns` / `sqlite_master`. |
| 20 | |
| 21 | Proof = the extracted data (password hashes, emails, table contents) appears in the response. |
| 22 | |
| 23 | --- |
| 24 | |
| 25 | ## Crown Jewel Targets |
| 26 | |
| 27 | SQL injection remains one of the highest-paying vulnerability classes in bug bounty because it directly threatens data confidentiality, integrity, and availability at scale. |
| 28 | |
| 29 | **Highest-value targets:** |
| 30 | - **SaaS platforms with multi-tenant databases** — one injection can expose all customer data |
| 31 | - **E-commerce/payment systems** — PII, card data, transaction records |
| 32 | - **Search endpoints** — user-controlled input passed directly to queries (e.g., Rockstar Games `/search`) |
| 33 | - **Analytics/tracking subdomains** — often built fast, tested less (e.g., `sctrack.email.uber.com.cn`) |
| 34 | - **Third-party plugins on enterprise installs** — WordPress plugins, CMS extensions running on corporate domains (Uber's Huge IT Video Gallery) |
| 35 | - **Internal tooling exposed externally** — Apache Airflow, GitHub Enterprise, admin dashboards |
| 36 | - **NoSQL backends (MongoDB)** — often overlooked, same injection class, different syntax |
| 37 | |
| 38 | **Asset types that pay most:** |
| 39 | - Production APIs with `/search`, `/filter`, `/sort`, `/report` parameters |
| 40 | - Subdomains with legacy stacks (`.cn`, `.co`, `.io` regional variants) |
| 41 | - Self-hosted open-source tools (Airflow, GitLab, Jenkins) on bounty scope |
| 42 | - Email tracking and analytics infrastructure |
| 43 | |
| 44 | --- |
| 45 | |
| 46 | ## Attack Surface Signals |
| 47 | |
| 48 | **URL patterns that suggest injectable parameters:** |
| 49 | ``` |
| 50 | /search?q= |
| 51 | /filter?category= |
| 52 | /sort?by=&order= |
| 53 | /report?start_date=&end_date= |
| 54 | /api/v1/items?id= |
| 55 | /index.php?id= |
| 56 | /gallery?album_id= |
| 57 | /track?uid=&campaign= |
| 58 | ?page=&limit=&offset= |
| 59 | ``` |
| 60 | |
| 61 | **Response header signals:** |
| 62 | - `X-Powered-By: PHP` — likely MySQL/PostgreSQL backend |
| 63 | - `Server: Apache` + PHP — classic LAMP stack |
| 64 | - `X-Powered-By: Express` — possible MongoDB/NoSQL backend |
| 65 | - Database error messages leaking in responses (MySQL, PostgreSQL, MSSQL error strings) |
| 66 | |
| 67 | **JavaScript patterns indicating dynamic query construction:** |
| 68 | ```javascript |
| 69 | // Look for these in JS bundles |
| 70 | fetch(`/api/search?q=${userInput}`) |
| 71 | $.ajax({ url: ' |