Skip to content

Commit

Permalink
new modules aroung aws s3 buckets
Browse files Browse the repository at this point in the history
  • Loading branch information
htrgouvea committed Jan 16, 2024
1 parent 2632442 commit 32dc439
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 7 deletions.
36 changes: 30 additions & 6 deletions .config/modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@
},
{
"id": "0035",
"category": "exploit",
"module": "S3_Misconfig",
"description": "Upload files into AWS S3 Buckets with weak security policies"
"category": "parser",
"module": "S3_Bucket",
"description": "Extract the path of files from a S3 Bucket with object listing"
},
{
"id": "0036",
Expand Down Expand Up @@ -238,7 +238,7 @@
"id": "0040",
"category": "exploit",
"module": "Reflected_XSS",
"description": ""
"description": "PoC"
},
{
"id": "0041",
Expand Down Expand Up @@ -268,13 +268,13 @@
"id": "0045",
"category": "recon",
"module": "Detect_Error",
"description": ""
"description": "PoC"
},
{
"id": "0046",
"category": "exploit",
"module": "DataBreach",
"description": ""
"description": "PoC"
},
{
"id": "0047",
Expand All @@ -299,6 +299,30 @@
"category": "exploit",
"module": "S3_Bucket_Takeover",
"description": "Detection possible of takeover on AWS S3 Bucket resource"
},
{
"id": "0051",
"category": "exploit",
"module": "Upload_Via_PUT",
"description": ""
},
{
"id": "0052",
"category": "exploit",
"module": "Open_Redirect",
"description": "Detect application vulnerable"
},
{
"id": "0053",
"category": "exploit",
"module": "Dependency_Confusion",
"description": ""
},
{
"id": "0054",
"category": "parser",
"module": "Nozaki",
"description": ""
}
]
}
File renamed without changes.
46 changes: 46 additions & 0 deletions lib/Spellbook/Exploit/Upload_Via_PUT.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package Spellbook::Exploit::Upload_Via_PUT {
use strict;
use warnings;
use Spellbook::Core::UserAgent;
use Spellbook::Helper::Generate_UUID;

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

Getopt::Long::GetOptionsFromArray (
$parameters,
"h|help" => \$help,
"t|target=s" => \$target
);

if ($target) {
if ($target !~ /^http(s)?:\/\//) {
$target = "https://$target";
}

my $userAgent = Spellbook::Core::UserAgent -> new();
my @uuid = Spellbook::Helper::Generate_UUID -> new(["--version" => 4]);
my $upload = $userAgent -> put("$target/$uuid[0].txt", Content => "$uuid[0]");
my $request = $userAgent -> get("$target/$uuid[0].txt");

if (($request -> code() == 200) && ($request -> content() eq "$uuid[0]")) {
push @result, "$target/$uuid[0].txt\n";
}

return @result;
}

if ($help) {
return "
\rRecon::Explioit
\r=====================
\r-h, --help See this menu
\r-t, --target Define\n\n";
}

return 0;
}
}

1;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package Spellbook::Parser::Bucket {
package Spellbook::Parser::S3_Bucket {
use strict;
use warnings;
use XML::Simple;
Expand Down

0 comments on commit 32dc439

Please sign in to comment.