美文网首页
SQLi-LAB lesson1 Error based解析

SQLi-LAB lesson1 Error based解析

作者: gg大宇 | 来源:发表于2019-12-02 23:31 被阅读0次
image.png

提示ID为参数,尝试ID=1


image.png
image.png

ID改变的话就会变化,猜测select * from table where id =input
加一个单引号


image.png

your MySQL server version for the right syntax to use near ''2'' LIMIT 0,1' at line 1
所以猜测sql语句应该是select * from table where id = 'input'
order by 猜测列名长度 order by 4 --+的时候会报错,说明长度是3


image.png image.png

此时就可以使用union进行注入。
将ID=861 改为一个数据库没有的值


image.png

相关文章

网友评论

      本文标题:SQLi-LAB lesson1 Error based解析

      本文链接:https://www.haomeiwen.com/subject/ykeqgctx.html