Cloud TTPs

Table of Contents


Azure (T1087.004)

Enumerate for Priv Esc:

AWS (T1552.005)

Shodan.io query to enumerate AWS Instance Metadata Service Access

Google Dorking for AWS Access Keys

Recursively searching for AWS Access Keys on *Nix containers

S3 Log Google Dorking

Public Redshift Cluster Enumeration

Python code to check if AWS key has permissions to read s3 buckets:

Find S3 Buckets Using Subfinder and HTTPX Tool

Cognito (T1087.004)

[!NOTE] Before proceeding, capture the session's JWT during login and save to a file (ex: access_token.txt) This can be accomplished using your browser developer tools or another method

  1. Get user information:

  1. Test admin authentication:

  1. List user groups:

  1. Attempt sign up

  1. Modify attributes

AWS Trivy Scanning (T1595.002)

  1. Install the Trivy AWS plugin: trivy plugin install github.com/aquasecurity/trivy-aws

  2. Scan a full AWS account (all supported services):

  1. Scan a specific service:

  1. Show results for a specific AWS resource:

SSM (T1021.007)

Script to quickly enumerate and select AWS SSM-managed EC2 instances via fzf, then start an SSM session without needing SSH or public access.

Parameter Store:

Lists the parameters in the AWS account or the parameters shared with the authenticated user (secrets can be stored here):

API Gateway (T1190)

AWS API Gateway is a service offered by Amazon Web Services (AWS) designed for developers to create, publish, and oversee APIs on a large scale. It functions as an entry point to an application, permitting developers to establish a framework of rules and procedures. This framework governs the access external users have to certain data or functionalities within the application.

Enumeration:

GCP (T1087.004)

Enumerate IP addresses:

SSRF URL:

Cloud Subdomain Takeover (T1584.001)

Kubernetes Secrets Harvesting (T1552.007)

Kubernetes Service Enumeration (T1046)

You can find everything exposed to the public with:

Kubernetes Ninja Commands (T1609)

Password Hunting Regex (T1552)

Go Environment Variable Enumeration (T1082)

A sample script that enumerates environment variables. This script pairs well with the regex list provided above:

Jira (T1087)

Privileges

In Jira, privileges can be checked by any user, authenticated or not, through the endpoints /rest/api/2/mypermissions or /rest/api/3/mypermissions. These endpoints reveal the user's current privileges.

Pentesting Kafka (T1046)

Use Nmap to detect Kafka brokers and check for open ports:

List brokers via kafkacat:

Enumerating brokers script:

Save messages for offline analysis;

Post-Exploitation Cloud Credential Harvesting (T1552.001)

After gaining access to a host, cloud provider credentials are often stored in well-known file paths. The following enumerates credential files across AWS, GCP, and Azure for all users on the system:

IMDS and Container Credential Theft (T1552.005)

Cloud instance metadata services (IMDS) and container credential endpoints expose temporary credentials. These are commonly targeted after gaining code execution inside a cloud workload:

Kubernetes Service Account Token Theft (T1552.007)

Kubernetes pods are provisioned with service account tokens that can be used to authenticate to the API server. Common mount paths vary between container runtimes:

Docker Registry Credential Harvesting (T1552.001)

Docker stores registry authentication tokens in config files that can be used to pull or push images to private registries:

CI/CD and IaC Secret Harvesting (T1552.001)

Terraform state files, variable files, and CI/CD configuration files frequently contain plaintext credentials, API keys, and infrastructure secrets:

Last updated