Try it using Invoke-Atomic

Valid Accounts: Cloud Accounts

Description from ATT&CK

Adversaries may obtain and abuse credentials of a cloud account as a means of gaining Initial Access, Persistence, Privilege Escalation, or Defense Evasion. Cloud accounts are those created and configured by an organization for use by users, remote support, services, or for administration of resources within a cloud service provider or SaaS application. In some cases, cloud accounts may be federated with traditional identity management system, such as Window Active Directory.(Citation: AWS Identity Federation)(Citation: Google Federating GC)(Citation: Microsoft Deploying AD Federation)

Compromised credentials for cloud accounts can be used to harvest sensitive data from online storage accounts and databases. Access to cloud accounts can also be abused to gain Initial Access to a network by abusing a Trusted Relationship. Similar to Domain Accounts, compromise of federated cloud accounts may allow adversaries to more easily move laterally within an environment.

Once a cloud account is compromised, an adversary may perform Account Manipulation - for example, by adding Additional Cloud Roles - to maintain persistence and potentially escalate their privileges.

Atomic Tests

Atomic Test #1 - Creating GCP Service Account and Service Account Key

GCP Service Accounts can be used to gain intial access as well as maintain persistence inside Google Cloud.

Supported Platforms: google-workspace,iaas:gcp

auto_generated_guid: 9fdd83fd-bd53-46e5-a716-9dec89c8ae8e


Name Description Type Default Value
project-id ID of the project, you want to create service account as well as service account key for String art-project-1
service-account-name Name of the service account String gcp-art-service-account-1
service-account-email Email of the service account String
output-key-file Email of the service account String gcp-art-service-account-1.json

Attack Commands: Run with sh!

gcloud auth login --no-launch-browser
gcloud config set project #{project-id}
gcloud iam service-accounts create #{service-account-name}
gcloud iam service-accounts keys create #{output-key-file} --iam-account=#{service-account-email}

Cleanup Commands:

gcloud iam service-accounts delete #{service-account-email} --quiet

Dependencies: Run with sh!

Description: Requires gcloud

Check Prereq Commands:

if [ -x "$(command -v gcloud)" ]; then exit 0; else exit 1; fi;

Get Prereq Commands:

echo "Please Install Google Cloud SDK before running this atomic test :"