← Back to Academy

Academy Node

SQL Injection Checks

SQLi checks test whether user-controlled input reaches backend SQL queries unsafely.

Beginner100 XPWeb

Why it matters

SQLi can expose creds, files, hashes, or command execution depending on DBMS.

How to identify it

  • Error-based behavior
  • Boolean differences
  • Time delays

Linux commands

sqlmap -u 'http://TARGET/item.php?id=1' --batch --risk 2 --level 3
sqlmap -r request.txt --batch --risk 2 --level 3
curl 'http://TARGET/item.php?id=1\''

Expected output

  • SQL error
  • Boolean-based injectable
  • DBMS fingerprint

Success looks like

  • Dumped creds or file read/write
  • Auth bypass
  • RCE path

Failure looks like

  • No behavioral difference

Troubleshooting

  • Use Burp request file
  • Include session cookie
  • Test manually first

Common mistakes

  • Not saving request with cookies
  • Not testing POST bodies
  • Not checking stacked queries where relevant

Alternative attacks

  • Default creds
  • File upload
  • LFI

What to try next

  • Dump users
  • Crack hashes
  • Try password reuse against SMB/WinRM/MSSQL

Recommended next lessons