实验准备:
- 皮卡丘靶场—SQL Injection—数值型注入(POST)
实验步骤:
-
先查询一下下拉框的功能:
-
查看此时的URL:http://localhost/pikaqiu.cn/vul/sqli/sqli_id.php发现是post方式提交的请求,因为没有使用URL传参。
-
后端数据库查询逻辑:select name, email from table where id = n(1,2,3,4…)
-
使用Burpsuite抓包,并发送到repeater中:
-
探测该页面是否存在注入点,将id =1改成id=1 or 1=1; (1=1永远为真,因此’or 1=1’会将数据库的内容遍历出来)
-
查看响应报文,返回200,并且返回数据库内容: