SQL Injection Detection Payloads

Detection payloads are the first probes you send against a suspected parameter. They are low-impact: a single quote to trigger a syntax error, or a pair of true/false conditions whose responses you diff. Use them before any exploitation attempt, on both string and numeric injection points (URL query, form fields, headers, and cookies).

How to confirm: You have a confirmed injection when a quote or parenthesis produces a database syntax error, or when a logically-true probe and a logically-false probe return visibly different responses (status code, body length, or error text).

Defense

  • Use parameterized queries / prepared statements so user input never changes query structure.
  • Return generic error pages — never surface raw database errors to clients.
  • Validate and allowlist input types (e.g. numeric IDs) at the edge.