Detection
Mostly SQL injection vulnerabilities can be found using modern scanners. However, for more complex scenarios such as second-order SQLi, manual testing can also be used.
The goal with many of these tests is to invoke some behaviour change in the application. Be sure to closely monitor for:
Test cases:
Test with out-of-band (OOB) or out-of-band application security testing (OAST) techniques
Test for stacked queries
Test for
UNIONkeywordSELECT username,password FROM users UNION SELECT null,nullTest for the number of columns using
null,nullorORDER BY 1,ORDER BY 2Test the data types with
'a',1etc
Test with different encoding techniques
Test evasion techniques
Test with encoded payloads
Test with builting functions
E.g.
CHAR()
Test ways to bypass commonly filtered characters
E.g. replacing space with
/**/
Detection syntax
General
MySQL
PostgeSQL
Oracle
MSSQL
Other Payloads
Tools:
SQLmap
The easiest way to get started with SQLmap is to either save a request to a file or copy a request as curl and change the curl command to sqlmap.

Last updated
Was this helpful?