SQL Injection
Pentesting-Web
SQL injection
A SQL injection attack consists of insertion or "injection" of a SQL query via the input data from the client to the application.
Entry point detection
Detection of an SQL injection entry point Simple characters
Multiple encoding
Merging characters
Logic Testing
Weird characters
DBMS Identification
SQL injection using SQLmap
Basic arguments for SQLmap
Load a request file and use mobile user-agent
Custom injection in UserAgent/Header/Referer/Cookie
Second order injection
Shell
Crawl a website with SQLmap and auto-exploit
Using TOR with SQLmap
Using a proxy with SQLmap
Using Chrome cookie and a Proxy
Using suffix to tamper the injection
General tamper option and tamper's list
SQLmap without SQL injection
You can use SQLmap to access a database via its port instead of a URL.
Authentication bypass
Authentication Bypass (Raw MD5 SHA1)
When a raw md5 is used, the pass will be queried as a simple string, not a hexstring.
Allowing an attacker to craft a string with a true
statement such as ' or 'SOMETHING
Challenge demo available at http://web.jarvisoj.com:32772
Polyglot injection (multicontext)
Routed injection
Insert Statement - ON DUPLICATE KEY UPDATE
ON DUPLICATE KEY UPDATE keywords is used to tell MySQL what to do when the application tries to insert a row that already exists in the table. We can use this to change the admin password by:
WAF Bypass
No Space (%20) - bypass using whitespace alternatives
No Whitespace - bypass using comments
No Whitespace - bypass using parenthesis
No Comma - bypass using OFFSET, FROM and JOIN
No Equal - bypass using LIKE/NOT IN/IN/BETWEEN
Blacklist using keywords - bypass using uppercase/lowercase
Blacklist using keywords case insensitive - bypass using an equivalent operator
Information_schema.tables Alternative
Version Alternative