Cloud Infrastructure Discovery

T1580

Technique.View on attack.mitre.org

About this technique

An adversary may attempt to discover infrastructure and resources that are available within an infrastructure-as-a-service (IaaS) environment. This includes compute service resources such as instances, virtual machines, and snapshots as well as resources of other services including the storage and database services.

Cloud providers offer methods such as APIs and commands issued through CLIs to serve information about infrastructure. For example, AWS provides a DescribeInstances API within the Amazon EC2 API that can return information about one or more instances within an account, the ListBuckets API that returns a list of all buckets owned by the authenticated sender of the request, the HeadBucket API to determine a bucket’s existence along with access permissions of the request sender, or the GetPublicAccessBlock API to retrieve access block configuration for a bucket. Similarly, GCP's Cloud SDK CLI provides the gcloud compute instances list command to list all Google Compute Engine instances in a project , and Azure's CLI command az vm list lists details of virtual machines. In addition to API commands, adversaries can utilize open source tools to discover cloud storage infrastructure through Wordlist Scanning.

An adversary may enumerate resources using a compromised user's access keys to determine which are available to that user. The discovery of these available resources may help adversaries determine their next steps in the Cloud environment, such as establishing Persistence.An adversary may also use this information to change the configuration to make the bucket publicly accessible, allowing data to be accessed without authentication. Adversaries have also may use infrastructure discovery APIs such as DescribeDBInstances to determine size, owner, permissions, and network ACLs of database resources. Adversaries can use this information to determine the potential value of databases and discover the requirements to access them. Unlike in Cloud Service Discovery, this technique focuses on the discovery of components of the provided services rather than the services themselves.

Detection rules6

Rules on DetectionCode tagged with T1580.

Sigma1

RuleLevelLog source
Potential Bucket Enumeration on AWSlowaws / NULL

Splunk5

RuleTypeRiskData source
ASL AWS IAM AccessDenied Discovery EventsAnomalyNULLASL AWS CloudTrail
ASL AWS IAM Assume Role Policy Brute ForceTTPNULLASL AWS CloudTrail
AWS Bedrock High Number List Foundation Model FailuresTTPNULLAWS CloudTrail
AWS IAM AccessDenied Discovery EventsAnomalyNULLAWS CloudTrail
AWS IAM Assume Role Policy Brute ForceTTPNULLAWS CloudTrail

Groups3

Software3

Campaigns0

None recorded.

Procedure examples6

Groups3

Used byProcedure example
GroupScattered Spider

Scattered Spider enumerates cloud environments including Amazon Web Services (AWS) S3 buckets to identify server and backup management infrastructure, resource access, databases and storage containers .

GroupShinyHunters

ShinyHunters has used Amazon Simple Storage Service (S3) Browser and WinSCP to collect information on S3 bucket configurations.

GroupStorm-0501

Storm-0501 has enumerated compromised cloud environments to identify critical assets, data stores, and back resources.

Software3

Used byProcedure example
ToolPacu

Pacu can enumerate AWS infrastructure, such as EC2 instances.

MalwareTeamPCP Cloud Stealer

TeamPCP Cloud Stealer has the ability to search for generic GitHub runners.

ToolTruffleHog

TruffleHog can enumerate AWS Infrastructure to include EC2 instances.

References10

  1. AWS Describe DB Instances Open source
    Amazon Web Services. (n.d.). Retrieved May 28, 2021.
  2. AWS Get Public Access Block Open source
    Amazon Web Services. (n.d.). Retrieved May 28, 2021.
  3. AWS Head Bucket Open source
    Amazon Web Services. (n.d.). AWS HeadBucket. Retrieved February 14, 2022.
  4. Amazon Describe Instance Open source
    Amazon. (n.d.). describe-instance-information. Retrieved March 3, 2020.
  5. Amazon Describe Instances API Open source
    Amazon. (n.d.). DescribeInstances. Retrieved May 26, 2020.
  6. Expel IO Evil in AWS Open source
    A. Randazzo, B. Manahan and S. Lipton. (2020, April 28). Finding Evil in AWS. Retrieved June 25, 2020.
  7. Google Compute Instances Open source
    Google. (n.d.). gcloud compute instances list. Retrieved May 26, 2020.
  8. Malwarebytes OSINT Leaky Buckets - Hioureas Open source
    Vasilios Hioureas. (2019, September 13). Hacking with AWS: incorporating leaky buckets into your OSINT workflow. Retrieved February 14, 2022.
  9. Mandiant M-Trends 2020 Open source
    Mandiant. (2020, February). M-Trends 2020. Retrieved November 17, 2024.
  10. Microsoft AZ CLI Open source
    Microsoft. (n.d.). az ad user. Retrieved October 6, 2019.

Data from MITRE ATT&CK® (Enterprise). ATT&CK® is a registered trademark of The MITRE Corporation.