Principle exploitable issues with SQL Servers
SQL injection result
- SQL server performs unauthorized functions
Forensic examination of SQL injection should involve:
SQL over TCP Port
TCP 1433
SQL Probe
UDP 1434
DMZ Firewall - protection?
s
DMZ Firewall - protection?
firewalls don’t protect against SQL injection
SQL injection result
- SQL server performs unauthorized functions (run commands)
SQL Server Account
Service account - when compromise, take on same permissions as service account. Can run commands from SQL Server.
SQL xp_cmdshell
SQL xp_cmdshell
SQL Injection Input
GET or POST commands
Forms can be ASP, PHP, CGI, etc. (no requirement)
GETS vs. POSTS
as
GETS vs. POSTS
difference in the artifacts we see
Artifacts for SQL Injections (4)
Web Server logs
firewalls
ids
SQL server
SQL value examples
‘or’1’=’1’–’
‘or’1’=’1’({‘
‘or’1’=’1’/*’
Keywords in Log Files
keyword or reps
-- execute select * @@version varchar char exec execute cast declare
Keywords in Log Files
keyword or greps:
-- execute select * @@version varchar char exec execute cast declare