Skip to content

Conversation

@bountyyfi
Copy link
Owner

Key improvements:

  • Added attribute breakout + tag injection payloads to priority list
    (e.g., "> which is the most common
    real-world XSS pattern)
  • Improved check_executable_context() to detect more event handler
    patterns beyond just 'alert' - now detects onerror, onload, onfocus,
    etc. with various JS functions
  • Added ~50 new attribute breakout payloads to generate_waf_bypass()
    covering img, svg, body, input, details, video, audio, iframe,
    marquee, object, and embed tags
  • Better HTML encoding detection to distinguish between safe
    (encoded) reflections and exploitable (unencoded) reflections

This addresses missing detection for basic reflected XSS like:

  • ">

https://claude.ai/code/session_01MZUkP14R3DpPRXkze1HZRg

Key improvements:
- Added attribute breakout + tag injection payloads to priority list
  (e.g., "><img src=x onerror=alert(1)> which is the most common
  real-world XSS pattern)
- Improved check_executable_context() to detect more event handler
  patterns beyond just 'alert' - now detects onerror, onload, onfocus,
  etc. with various JS functions
- Added ~50 new attribute breakout payloads to generate_waf_bypass()
  covering img, svg, body, input, details, video, audio, iframe,
  marquee, object, and embed tags
- Better HTML encoding detection to distinguish between safe
  (encoded) reflections and exploitable (unencoded) reflections

This addresses missing detection for basic reflected XSS like:
- "><img src=x onerror=alert(1)>
- <img src=x onerror="window.location='...'">

https://claude.ai/code/session_01MZUkP14R3DpPRXkze1HZRg
Split SQL error detection into high-confidence and medium-confidence tiers:

HIGH-CONFIDENCE (report immediately):
- Database-specific error patterns (MySQL, PostgreSQL, Oracle, MSSQL, SQLite)
- PDO/ODBC exceptions
- Very specific SQL syntax errors

MEDIUM-CONFIDENCE (require context validation):
- Generic patterns like "sql error", "database error", "query failed"
- These now require BOTH:
  1. Error context indicators (exception, stack trace, warning:, etc.)
  2. NOT being in false-positive contexts (tutorials, documentation,
     code examples, StackOverflow content)

Removed overly broad patterns:
- "syntax error" (could be JavaScript/CSS errors)
- "near \"" (too generic)
- "at line " (too generic)

This prevents XSS payloads from triggering false positive SQLi reports
when the response contains generic error text that isn't actually SQL-related.

https://claude.ai/code/session_01MZUkP14R3DpPRXkze1HZRg
Replaced overly broad SQL error patterns with database-specific ones:

REMOVED patterns (too broad, can match non-SQL errors):
- "syntax error" (could be JS/CSS/template errors)
- "mysql" (could be in documentation/tutorials)
- "postgresql" (could be in documentation)
- "sqlite" (could be in documentation)
- "sql server" (could be in product descriptions)

REPLACED with specific patterns:
- "mysql_fetch", "mysql_query", "mysqli_" (PHP functions)
- "pg_query", "pg_exec" (PostgreSQL functions)
- "sqlite3_", "sqlite3::" (SQLite functions/exceptions)
- "you have an error in your sql" (MySQL-specific error)
- "syntax error at or near" (PostgreSQL-specific)
- "incorrect syntax near" (MSSQL-specific)
- "sqlstate[" (PDO error format)
- "ora-0", "ora-1" (Oracle error codes)

Files updated:
- src/scanners/sqli_enhanced.rs (collect_evidence function)
- src/scanners/websocket.rs (WebSocket SQLi detection)
- src/scanners/graphql_security.rs (GraphQL injection detection)
- src/scanners/second_order_injection.rs (second-order SQLi)
- src/inference/signals.rs (signal analysis patterns)

https://claude.ai/code/session_01MZUkP14R3DpPRXkze1HZRg
@bountyyfi bountyyfi closed this Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants