mirror of
https://github.com/usestrix/strix.git
synced 2026-11-09 18:08:59 -10:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ffc6c66c3 | ||
|
|
3d7fa144d5 |
No files matched your search
@@ -64,6 +64,8 @@ Test every input vector with every applicable technique.
|
||||
|
||||
**Input Handling**
|
||||
- Multiple injection types: SQL, NoSQL, LDAP, XPath, command, template
|
||||
- For scalar search/filter/selector fields—including authorization fields—the delegated task must list each field and preload `query_language_injection`. One owner must run its matrix before `exact match` or `ruled out`
|
||||
- Where different components validate and consume structured input, preload `idor`. Test raw parser differentials (duplicate members, type/number boundaries) and compare the checked identity with the acted-on identity
|
||||
- Encoding bypasses: double encoding, unicode, null bytes
|
||||
- Boundary conditions and type confusion
|
||||
- Large payloads and buffer-related issues
|
||||
|
||||
@@ -50,6 +50,8 @@ Test each attack surface methodically. Spawn focused subagents for different are
|
||||
- Injection testing on all input fields (SQL, XSS, command, template)
|
||||
- File upload bypass attempts
|
||||
- Search and filter parameter manipulation
|
||||
- For every scalar search/filter/selector field, the delegated task must name it, preload `query_language_injection`, and require that skill's per-field matrix. Sibling-field probes or standalone metacharacters cannot justify `exact match`
|
||||
- For structured authorization/object identifiers, preload `idor` and require raw duplicate-member permutations plus safe-number boundaries, comparing the checked identity with the read/changed/exported identity
|
||||
- Redirect and URL parameter handling
|
||||
|
||||
**Authentication & Session**
|
||||
|
||||
@@ -53,11 +53,13 @@ Object-level authorization failures (BOLA/IDOR) lead to cross-account data expos
|
||||
|
||||
**Enumeration Techniques**
|
||||
- Alternate types: `{"id":123}` vs `{"id":"123"}`, arrays vs scalars, objects vs scalars
|
||||
- Edge values: null/empty/0/-1/MAX_INT, scientific notation, overflows
|
||||
- Duplicate keys/parameter pollution: `id=1&id=2`, JSON duplicate keys `{"id":1,"id":2}` (parser precedence)
|
||||
- Edge and numeric boundaries: null, empty, 0, -1, MAX_INT, and exact and adjacent values around each runtime's safe-integer and overflow limits, including decimal and exponent forms
|
||||
- Duplicate keys/parameter pollution: send raw query strings such as `id=1&id=2` and raw JSON such as `{"id":1,"id":2}` so serializers cannot collapse duplicates. Use conflicting values in both orders to determine parser precedence
|
||||
- Case/aliasing: userId vs userid vs USER_ID; alt names like resourceId, targetId, account
|
||||
- Path traversal-like in virtual file systems: `/files/user_123/../../user_456/report.csv`
|
||||
|
||||
For gateways, workers, and multi-service APIs, treat authorization as an identity invariant: the object authorized must equal the object read, changed, or exported. Run the representation and duplicate-member matrix even after one variant succeeds. Compare response identity/content, not status alone.
|
||||
|
||||
**UUID/Opaque ID Sources**
|
||||
- Logs, exports, JS bundles, analytics endpoints, emails, public activity
|
||||
- Time-based IDs (UUIDv1, ULID) may be guessable within a window
|
||||
|
||||
@@ -14,6 +14,7 @@ NoSQL injection exploits the mismatch between how applications pass user input t
|
||||
- Form fields with bracket notation (`field[$ne]=`) coerced into operator objects by Express, PHP, and similar middleware
|
||||
- URL-encoded JSON in query strings, headers, and cookies
|
||||
- GraphQL variables passed directly into resolver-level NoSQL filters
|
||||
- Scalar strings compiled into expression languages are a separate construction class. Load `query_language_injection`
|
||||
|
||||
**Code patterns that enable injection**
|
||||
- Raw filter dicts/objects from user input handed to `find`/`findOne`/`aggregate`
|
||||
@@ -241,7 +242,7 @@ DoS surface (use only with explicit authorization scope):
|
||||
|
||||
1. **Identify query-receiving endpoints** — login, search, filter, lookup
|
||||
2. **Determine input format** — JSON body vs form fields vs URL params
|
||||
3. **Send error-probing payloads** — malformed operator objects; watch for MongoDB/driver errors
|
||||
3. **Send error-probing payloads** — test malformed operator objects and watch for MongoDB/driver errors. For scalar expression construction, load `query_language_injection`
|
||||
4. **Attempt operator injection** — `$ne`, `$gt`, `$regex` against login endpoint
|
||||
5. **Confirm boolean oracle** — response, status, redirect differs between true/false predicates
|
||||
6. **Extract data blindly** — character-by-character `$regex` on sensitive fields (token, reset code)
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: query-language-injection
|
||||
description: Scalar injection into embedded query languages, especially apparent exact-match authorization filters compiled as JSONPath, JMESPath, OData, Lucene, LDAP, Cypher, or XPath
|
||||
---
|
||||
|
||||
# Query-Language Injection
|
||||
|
||||
An HTTP string can become syntax when a downstream component builds a query or policy expression. Treat every accepted search, filter, selector, and authorization scalar as an independent sink.
|
||||
|
||||
## Mandatory Matrix
|
||||
|
||||
For each named scalar field:
|
||||
|
||||
1. Establish known-match and known-no-match controls while all sibling fields stay fixed.
|
||||
2. With known match `V`, execute these four JSONPath-style closure cells on the field itself: `V' || @.<field> == @.<field> || 'V`, `V' && @.<field> != @.<field> && 'V`, `V" || @.<field> == @.<field> || "V`, and `V" && @.<field> != @.<field> && "V`. Balance the expected suffix and adapt field and operator syntax for other grammars. Constant-only expressions may be rejected.
|
||||
3. Do not substitute standalone metacharacters, generic SQL probes, object payloads, or tests of a sibling field for any cell.
|
||||
4. Repeat across plausible grammars inferred from behavior or errors. An empty result may represent a swallowed parser exception.
|
||||
5. Confirm impact through broadened, cross-tenant, privileged, or otherwise forbidden results—not a parser error alone.
|
||||
|
||||
Do not conclude `exact match`, `safe`, or `ruled out` until this matrix ran on every scalar sink, or a specific non-concatenating control was identified.
|
||||
Reference in new issue
Block a user