cloud_enum
Multi-cloud OSINT tool. Enumerate public resources in AWS, Azure, and Google Cloud.
Top Related Projects
Multi-Cloud Security Auditing Tool
Cloud Security Posture Management (CSPM)
Prowler is an Open Source Security tool for AWS, Azure, GCP and Kubernetes to do security assessments, audits, incident response, compliance, continuous monitoring, hardening and forensics readiness. Includes CIS, NIST 800, NIST CSF, CISA, FedRAMP, PCI-DSS, GDPR, HIPAA, FFIEC, SOC2, GXP, Well-Architected Security, ENS and more
CloudMapper helps you analyze your Amazon Web Services (AWS) environments.
The AWS exploitation framework, designed for testing the security of Amazon Web Services environments.
Quick Overview
Cloud_enum is a multi-cloud OSINT tool designed to enumerate public resources in AWS, Azure, and Google Cloud. It helps security professionals and penetration testers discover exposed assets and potential misconfigurations across major cloud providers, aiding in the assessment of an organization's cloud security posture.
Pros
- Supports multiple cloud providers (AWS, Azure, Google Cloud) in a single tool
- Requires no authentication, making it easy to use for external security assessments
- Customizable with options for targeted searches and output formats
- Actively maintained and regularly updated
Cons
- May produce false positives or miss some resources due to the nature of enumeration
- Limited to public-facing resources and cannot assess internal cloud configurations
- Potential for abuse if used without proper authorization
- Performance may vary depending on the scale of the target environment
Getting Started
To get started with cloud_enum:
-
Clone the repository:
git clone https://github.com/initstring/cloud_enum.git
-
Install the required dependencies:
pip3 install -r requirements.txt
-
Run the tool with a target keyword:
python3 cloud_enum.py -k <keyword>
For more advanced usage and options, refer to the project's README file on GitHub.
Competitor Comparisons
Multi-Cloud Security Auditing Tool
Pros of ScoutSuite
- Supports multiple cloud providers (AWS, Azure, GCP, Alibaba Cloud, Oracle Cloud)
- Provides a comprehensive security assessment with a web-based report
- Offers customizable rulesets for tailored security checks
Cons of ScoutSuite
- More complex setup and configuration process
- Requires more system resources due to its comprehensive nature
- Steeper learning curve for new users
Code Comparison
ScoutSuite (Python):
from ScoutSuite.core.cli_parser import ScoutSuiteArgumentParser
from ScoutSuite.core.console_manager import ConsoleManager
from ScoutSuite.core.exceptions import ScoutException
from ScoutSuite.core.processingengine import ProcessingEngine
from ScoutSuite.core.ruleset import Ruleset
Cloud_enum (Python):
import sys
import argparse
import datetime
import time
from concurrent.futures import ThreadPoolExecutor, as_completed
from modules import azure_checks, gcp_checks, aws_checks
ScoutSuite offers a more structured and modular approach, with separate components for argument parsing, console management, and rule processing. Cloud_enum has a simpler structure, focusing on specific cloud provider checks and using concurrent execution for improved performance.
Both tools are valuable for cloud security assessments, with ScoutSuite providing a more comprehensive analysis across multiple providers, while Cloud_enum offers a lightweight and focused approach for quick enumeration of common cloud resources.
Cloud Security Posture Management (CSPM)
Pros of CloudSploit
- Comprehensive cloud security scanning across multiple providers (AWS, Azure, GCP, Oracle)
- Extensive set of pre-defined security checks and best practices
- Integrates with CI/CD pipelines for automated security testing
Cons of CloudSploit
- More complex setup and configuration compared to cloud_enum
- Requires API credentials for each cloud provider to perform scans
- May have a steeper learning curve for users new to cloud security
Code Comparison
cloud_enum:
def check_storage(storage_name):
url = f"https://{storage_name}.blob.core.windows.net"
try:
response = requests.get(url, timeout=3)
if response.status_code == 404:
return False
return True
except requests.exceptions.RequestException:
return False
CloudSploit:
var async = require('async');
var helpers = require('../../../helpers/azure');
module.exports = {
title: 'Storage Account Public Access',
category: 'Storage Accounts',
description: 'Ensures that Storage Accounts do not allow public access',
more_info: 'Storage Accounts should be configured to prevent anonymous, public access to blobs or containers.',
recommended_action: 'Ensure that Storage Accounts do not allow public access to blobs or containers',
link: 'https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction',
apis: ['storageAccounts:list'],
// ... (additional code)
};
Prowler is an Open Source Security tool for AWS, Azure, GCP and Kubernetes to do security assessments, audits, incident response, compliance, continuous monitoring, hardening and forensics readiness. Includes CIS, NIST 800, NIST CSF, CISA, FedRAMP, PCI-DSS, GDPR, HIPAA, FFIEC, SOC2, GXP, Well-Architected Security, ENS and more
Pros of Prowler
- More comprehensive security assessment tool, covering a wider range of cloud services and security checks
- Regularly updated with new features and security checks, maintaining relevance with evolving cloud security best practices
- Supports multiple cloud providers (AWS, Azure, GCP) for broader applicability
Cons of Prowler
- More complex to use and configure, potentially requiring more time and expertise
- Larger codebase and dependencies, which may lead to longer execution times for scans
- May produce more verbose output, requiring additional effort to parse and prioritize findings
Code Comparison
Cloud_enum (Python):
def check_storage(self, storage_name):
url = f"https://{storage_name}.blob.core.windows.net"
response = self.client.get(url)
if response.status_code == 200:
print(f"[+] Found open Azure storage: {url}")
Prowler (Python):
def check_s3_bucket_public_access(self, bucket_name):
try:
bucket_policy = self.s3_client.get_bucket_policy(Bucket=bucket_name)
if "PublicAccessBlockConfiguration" not in bucket_policy:
print(f"[WARNING] S3 bucket {bucket_name} may have public access")
except ClientError:
pass
Both tools focus on identifying potential security issues in cloud environments, but Prowler offers a more extensive set of checks across multiple cloud providers, while Cloud_enum is more focused on enumeration and discovery of specific cloud resources.
CloudMapper helps you analyze your Amazon Web Services (AWS) environments.
Pros of CloudMapper
- More comprehensive AWS analysis, including visualization of AWS environments
- Supports multiple AWS accounts and regions
- Provides detailed security findings and recommendations
Cons of CloudMapper
- Focused solely on AWS, lacking multi-cloud support
- More complex setup and configuration process
- Requires AWS credentials and permissions to function
Code Comparison
CloudMapper (Python):
from cloudmapper.webserver import run_webserver
from cloudmapper.webserver.web_app import create_app
app = create_app()
run_webserver(app)
cloud_enum (Python):
from cloud_enum import enumerate_clouds
enumerate_clouds(args.keyword, args.disable_aws, args.disable_azure, args.disable_gcp)
Key Differences
CloudMapper is a comprehensive AWS analysis tool with visualization capabilities, while cloud_enum is a lightweight multi-cloud enumeration tool. CloudMapper offers deeper AWS insights but requires more setup, whereas cloud_enum provides quick reconnaissance across multiple cloud providers with minimal configuration.
CloudMapper is best suited for in-depth AWS security assessments, while cloud_enum excels at rapid multi-cloud asset discovery. The choice between them depends on the specific use case and target cloud environment(s).
The AWS exploitation framework, designed for testing the security of Amazon Web Services environments.
Pros of Pacu
- More comprehensive AWS security testing tool with a broader range of modules
- Interactive command-line interface for easier navigation and use
- Supports session management for multiple AWS environments
Cons of Pacu
- Focused solely on AWS, lacking support for other cloud providers
- Steeper learning curve due to its more complex feature set
- Requires more setup and configuration compared to Cloud_enum
Code Comparison
Cloud_enum:
def check_storage(storage_url):
try:
resp = requests.get(storage_url, timeout=3)
if resp.status_code == 200:
print(f"[+] Found open storage: {storage_url}")
except requests.exceptions.RequestException:
pass
Pacu:
def run_module(self, module_name, *args, **kwargs):
module = import_module(f'pacu.modules.{module_name}')
return module.main(self, *args, **kwargs)
def run(self, command):
cmd, *args = command.split()
if cmd in self.COMMANDS:
return self.COMMANDS[cmd](self, *args)
else:
print(f"Unknown command: {cmd}")
Cloud_enum is more straightforward, focusing on specific enumeration tasks, while Pacu offers a modular structure for running various AWS security checks and exploits. Cloud_enum's code is simpler and easier to understand, whereas Pacu's code demonstrates its more complex, interactive nature and module management system.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
cloud_enum
Future of cloud_enum
I built this tool in 2019 for a pentest involving Azure, as no other enumeration tools supported it at the time. It grew from there, and I learned a lot while adding features.
Building tools is fun, but maintaining tools is hard. I haven't actively used this tool myself in a while, but I've done my best to fix bugs and review pull requests.
Moving forward, it makes sense to consolidate this functionality into a well-maintained project that handles the essentials (web/dns requests, threading, I/O, logging, etc.). Nuclei is really well suited for this. You can see my first PR to migrate cloud_enum functionality to Nuclei here.
I encourage others to contribute templates to Nuclei, allowing us to focus on detecting cloud resources while leaving the groundwork to Nuclei.
I'll still try to review PRs here to address bugs as time permits, but likely won't have time for major changes.
Thanks to all the great contributors. Good luck with your recon!
Overview
Multi-cloud OSINT tool. Enumerate public resources in AWS, Azure, and Google Cloud.
Currently enumerates the following:
Amazon Web Services:
- Open / Protected S3 Buckets
- awsapps (WorkMail, WorkDocs, Connect, etc.)
Microsoft Azure:
- Storage Accounts
- Open Blob Storage Containers
- Hosted Databases
- Virtual Machines
- Web Apps
Google Cloud Platform
- Open / Protected GCP Buckets
- Open / Protected Firebase Realtime Databases
- Google App Engine sites
- Cloud Functions (enumerates project/regions with existing functions, then brute forces actual function names)
- Open Firebase Apps
See it in action in Codingo's video demo here.
Usage
Setup
Several non-standard libaries are required to support threaded HTTP requests and dns lookups. You'll need to install the requirements as follows:
pip3 install -r ./requirements.txt
Running
The only required argument is at least one keyword. You can use the built-in fuzzing strings, but you will get better results if you supply your own with -m
and/or -b
.
You can provide multiple keywords by specifying the -k
argument multiple times.
Keywords are mutated automatically using strings from enum_tools/fuzz.txt
or a file you provide with the -m
flag. Services that require a second-level of brute forcing (Azure Containers and GCP Functions) will also use fuzz.txt
by default or a file you provide with the -b
flag.
Let's say you were researching "somecompany" whose website is "somecompany.io" that makes a product called "blockchaindoohickey". You could run the tool like this:
./cloud_enum.py -k somecompany -k somecompany.io -k blockchaindoohickey
HTTP scraping and DNS lookups use 5 threads each by default. You can try increasing this, but eventually the cloud providers will rate limit you. Here is an example to increase to 10.
./cloud_enum.py -k keyword -t 10
IMPORTANT: Some resources (Azure Containers, GCP Functions) are discovered per-region. To save time scanning, there is a "REGIONS" variable defined in cloudenum/azure_regions.py and cloudenum/gcp_regions.py
that is set by default to use only 1 region. You may want to look at these files and edit them to be relevant to your own work.
Complete Usage Details
usage: cloud_enum.py [-h] -k KEYWORD [-m MUTATIONS] [-b BRUTE]
Multi-cloud enumeration utility. All hail OSINT!
optional arguments:
-h, --help show this help message and exit
-k KEYWORD, --keyword KEYWORD
Keyword. Can use argument multiple times.
-kf KEYFILE, --keyfile KEYFILE
Input file with a single keyword per line.
-m MUTATIONS, --mutations MUTATIONS
Mutations. Default: enum_tools/fuzz.txt
-b BRUTE, --brute BRUTE
List to brute-force Azure container names. Default: enum_tools/fuzz.txt
-t THREADS, --threads THREADS
Threads for HTTP brute-force. Default = 5
-ns NAMESERVER, --nameserver NAMESERVER
DNS server to use in brute-force.
-l LOGFILE, --logfile LOGFILE
Will APPEND found items to specified file.
-f FORMAT, --format FORMAT
Format for log file (text,json,csv - defaults to text)
--disable-aws Disable Amazon checks.
--disable-azure Disable Azure checks.
--disable-gcp Disable Google checks.
-qs, --quickscan Disable all mutations and second-level scans
Thanks
So far, I have borrowed from:
- Some of the permutations from GCPBucketBrute
Top Related Projects
Multi-Cloud Security Auditing Tool
Cloud Security Posture Management (CSPM)
Prowler is an Open Source Security tool for AWS, Azure, GCP and Kubernetes to do security assessments, audits, incident response, compliance, continuous monitoring, hardening and forensics readiness. Includes CIS, NIST 800, NIST CSF, CISA, FedRAMP, PCI-DSS, GDPR, HIPAA, FFIEC, SOC2, GXP, Well-Architected Security, ENS and more
CloudMapper helps you analyze your Amazon Web Services (AWS) environments.
The AWS exploitation framework, designed for testing the security of Amazon Web Services environments.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot