Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/documentation/modules/auxiliary/cloud/aws/enum_ec2.md
Views: 11655
Vulnerable Application
Amazon Web Services (AWS) resources can be managed through an API that authenticates based on an ACCESS_KEY_ID
and a SECRET_ACCESS_KEY
. With these two pieces of information, an attacker can gain privileges which may include enumerating resources within the AWS account.
This module authenticates to AWS EC2 (Elastic Compute Cloud) to identify compute instances that the credentials can see. The instances themselves may be connected to the public Internet, but are likely to be protected by security groups and subnet network ACLs. In any case, knowledge of the instances is the first step in evaluating their security.
Verification Steps
Create or acquire the credentials
(If necessary) Create an AWS account. Free trials are available.
Login to the [AWS Console](https:\console.aws.amazon.com).
Use the dropbown menu in the top-right with your username, then click on "My Security Credentials".
Expand the "Access Keys" pane and click "Create New Access Key".
Follow the steps in the AWS console, making sure to record both the 'access key ID' and 'secret access key'. (The 'secret access key' is only shown once, then can never be retrieved.)
Enumerate AWS resources using the credentials
Start msfconsole
use auxiliary/cloud/aws/enum_ec2
Set the
ACCESS_KEY_ID
andSECRET_ACCESS_KEY
options.Optionally, set the
REGION
andLIMIT
options.run
Options
ACCESS_KEY_ID
This AWS credential is like a username. It uniquely identifies the user, and is paired with a 'secret access key'. The access key ID is retrievable through the AWS console.
An example ACCESS_KEY_ID
would be AKIA5C76TR3KXHXA5CRC
SECRET_ACCESS_KEY
This AWS credential is like a password, and should be treated as such. It is paired with a 'access key ID'. The access key ID cannot be retrieved from AWS after it has been generated, but it may be discoverable through environment variables, configuration files, source code, or backups.
An example SECRET_ACCESS_KEY
would be EKfx3wOWWiGk1WgBTAZfF\2dq3SbDsQj4jdyOMOv
.