Vulnerability scanning and application exploitation in an EC2 instance
The first step is to equip our Kali Linux to install the AWS client by running sudo apt install awscli
from the terminal, and then we can leverage the tools to understand what permissions we have with the current API and secret keys.
Configure the AWS profile by running sudo aws configure --profile <profilename>
in the terminal.
In this case, we will configure the two profiles within our Kali Linux:
- For demonstration purposes, we will change the suggested
Lara
profile name (see Figure 8.4) to RCE (Remote Code Execution) with the access key and secret key. - We will create a
mcduck
profile as suggested by CloudGoat with the keys generated during the CloudGoat scenario deployment.sudo aws configure –-profile <profilename>
To confirm that our profiles are working, we can list down the S3 (which is Amazon’s Simple Storage Service) buckets...