Skip to content

Fix: deprecation message for Monolog-RCE{8, 9} and a few changes ... #218

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gadgetchains/Monolog/FW/1/chain.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

class FW1 extends \PHPGGC\GadgetChain\FileWrite
{
public static $version = '3.0.0 <= 3.1.0+';
public static $version = '3.0.0 <= 3.9.0+';
public static $vector = '__destruct';
public static $author = 'mir-hossein (Mirhossein Rahmani)';
public static $information = 'Please use this GC only for educational purposes or legal pentest, Thank you!';
public static $information = 'Please use this GC only for educational purposes or legal penetration testing. Thank you!';

public function generate(array $parameters)
{
Expand Down
2 changes: 1 addition & 1 deletion gadgetchains/Monolog/RCE/1/chain.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class RCE1 extends \PHPGGC\GadgetChain\RCE\FunctionCall
{
public static $version = '1.4.1 <= 1.6.0 1.17.2 <= 2.7.0+';
public static $version = '1.4.1 <= 1.6.0 1.17.2 <= 2.10.0+';
public static $vector = '__destruct';
public static $author = 'cfreal';

Expand Down
2 changes: 1 addition & 1 deletion gadgetchains/Monolog/RCE/2/chain.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class RCE2 extends \PHPGGC\GadgetChain\RCE\FunctionCall
{
public static $version = '1.4.1 <= 2.7.0+';
public static $version = '1.4.1 <= 2.10.0+';
public static $vector = '__destruct';
public static $author = 'cfreal';

Expand Down
2 changes: 1 addition & 1 deletion gadgetchains/Monolog/RCE/5/chain.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class RCE5 extends \PHPGGC\GadgetChain\RCE\FunctionCall
{
public static $version = '1.25 <= 2.7.0+';
public static $version = '1.25 <= 2.10.0+';
public static $vector = '__destruct';
public static $author = 'mayfly';

Expand Down
2 changes: 1 addition & 1 deletion gadgetchains/Monolog/RCE/6/chain.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class RCE6 extends \PHPGGC\GadgetChain\RCE\FunctionCall
{
public static $version = '1.10.0 <= 2.7.0+';
public static $version = '1.10.0 <= 2.10.0+';
public static $vector = '__destruct';
public static $author = 'mayfly';

Expand Down
6 changes: 3 additions & 3 deletions gadgetchains/Monolog/RCE/7/chain.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

class RCE7 extends \PHPGGC\GadgetChain\RCE\FunctionCall
{
public static $version = '1.10.0 <= 2.7.0+';
public static $version = '1.10.0 <= 2.10.0+';
public static $vector = '__destruct';
public static $author = 'mir-hossein';
public static $information = 'Please use this exploit only for educational purposes or legal pentest, thank you!';
public static $author = 'mir-hossein (Mirhossein Rahmani)';
public static $information = 'Please use this GC only for educational purposes or legal penetration testing. Thank you!';

public function generate(array $parameters)
{
Expand Down
4 changes: 2 additions & 2 deletions gadgetchains/Monolog/RCE/8/chain.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

class RCE8 extends \PHPGGC\GadgetChain\RCE\FunctionCall
{
public static $version = '3.0.0 <= 3.1.0+';
public static $version = '3.0.0 <= 3.9.0+';
public static $vector = '__destruct';
public static $author = 'cf (Charles Fol), mir-hossein (Mirhossein Rahmani)';
public static $information = 'Please use this exploit only for educational purposes or legal pentest, Thank you!';
public static $information = 'Please use this GC only for educational purposes or legal penetration testing. Thank you!';

public function generate(array $parameters)
{
Expand Down
2 changes: 1 addition & 1 deletion gadgetchains/Monolog/RCE/8/gadgets.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class LogRecord
function __construct($parameter)
{
$this->level = \Monolog\Level::Debug;
$this->mixed = $parameter;
$this->formatted = $parameter;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions gadgetchains/Monolog/RCE/9/chain.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

class RCE9 extends \PHPGGC\GadgetChain\RCE\FunctionCall
{
public static $version = '3.0.0 <= 3.1.0+';
public static $version = '3.0.0 <= 3.9.0+';
public static $vector = '__destruct';
public static $author = 'mir-hossein (Mirhossein Rahmani)';
public static $information = 'Please use this exploit only for educational purposes or legal pentest, Thank you!';
public static $information = 'Please use this GC only for educational purposes or legal penetration testing. Thank you!';

public function generate(array $parameters)
{
Expand Down
2 changes: 1 addition & 1 deletion gadgetchains/Monolog/RCE/9/gadgets.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class LogRecord

function __construct($parameter)
{
$this->mixed = $parameter;
$this->formatted = $parameter;
}
}
}
5 changes: 4 additions & 1 deletion lib/PHPGGC/GadgetChain/RCE.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ abstract class RCE extends \PHPGGC\GadgetChain
# TBD by subclasses
public static $parameters = [];

public $__test_rand_token;
public $__test_rand_path;

/**
* The result of the command is not necessarily visible. We write the output
* to a file instead to be able to tell if the payload worked, even if
Expand Down Expand Up @@ -39,4 +42,4 @@ public function test_cleanup($arguments)
if(file_exists($this->__test_rand_path))
unlink($this->__test_rand_path);
}
}
}