Sacon Cloud Pentesting
AI Generated Summary
AI Generated Content Disclaimer
Note: This summary is AI-generated and may contain inaccuracies, errors, or omissions. If you spot any issues, please contact the site owner for corrections. Errors or omissions are unintended.
This deck is the Cloud Pentesting workshop delivered at SACON International 2019 in Bangalore (February 15-16, Taj Yeshwantpur). Across 42 slides it is a hands-on guide to cloud penetration testing across AWS, Azure, GCP and OpenStack. It moves from cloud fundamentals and provider landscapes through the shared responsibility model, then into metadata APIs, cloud storage, snapshots, Azure AD, serverless functions and IAM services, closing with auditing tools, hardening guidelines and practice environments.
Summary
The deck opens with an agenda covering cloud basics, vendor product landscapes, cloud versus conventional pentesting, attack surfaces across IaaS, PaaS, SaaS and serverless, metadata API exploitation, cloud storage abuse, snapshot forensics, Azure AD and serverless attacks, and IAM services. A disclaimer calls the session highly opinionated and frames much of the material as public knowledge compiled in one place. Cloud computing is summarized as a decentralized shared pool of remotely accessible resources with rapid provisioning, and market data rates AWS as ruler, GCP and Azure as challengers, with OpenStack out of the league.
Provider landscapes list AWS with 50 products, Azure with well above 100 services, GCP’s multitude of offerings, and OpenStack with 62 open source services. The conventional versus cloud contrast covers misconfiguration versus unpatched issues, service provider approvals, the tenant versus owner dynamic, the cloud admin as the new top boss, and maximum damage shifting to exuberant bills, data theft, destruction and GDPR implications. The shared responsibility model maps tenant duties per service model: IaaS leaves the tenant managing everything inside the VM, PaaS shifts to application flaws, buckets, TLS and configuration, SaaS reduces control to data, access and authorization flaws with multi-tenant impact, and FaaS runs atomic, timeboxed functions.
The attacking sections start with environment identification via dmidecode commands, then the metadata API at the non-routable 169.254.169.254 endpoint. Provider quirks matter: Azure requires Metadata: true, GCP requires Metadata-Flavor: Google, and AWS answers a plain curl. The header requirement is called a clever hack that blocks SSRF, though GCP’s v1beta1 endpoint predates enforcement, making SSRF-driven credential theft feasible there, while Azure’s mandatory header may block SSRF entirely. Storage attacks revolve around incorrect permissions: public buckets, overwritable roles and guessable names, enumerated with CloudStorageFinder, MicroBurst, spaces-finder and sandcastle plus provider CLI recipes. Snapshots are disk image copies that, attached to attacker VMs, bypass all logical checks and expose /etc/shadow, the Windows SAM and confidential files.
Azure AD attacks exploit hybrid sync, so owning Azure AD yields all credentials, including Office 365 only tenants. Serverless demos run commands on AWS and GCP functions, noting AWS Lambda has no metadata API access but carries credentials in environment variables at /proc/self/environ. IAM attacks target dormant roles and credentials plus shadow admins, and a get-session-token backdoor stays invisible to list-access-keys; a backdooring case study adds user and key creation, lambda triggers and an UpdateAssumeRolePolicy failsafe. Closing slides cover auditing tools (cs-suite, Prowler, SkyArk, Scout2, G-Scout, Azucar, Azurite), Pacu and cloudmapper, CIS benchmarks, and practice environments flaws.cloud, flaws2.cloud, DVFaaS, Serverless-Goat and AWS-Vulnerable-Lambda.
Key Themes
- Cloud Fundamentals and Provider Landscape: Cloud as a shared pool of remotely accessible resources with rapid provisioning, driven by hardware and management savings; AWS as ruler, GCP and Azure as challengers, OpenStack out of the league.
- Conventional vs Cloud Pentesting: Misconfiguration over unpatched issues, provider approvals, the tenant/owner dynamic, the cloud admin as the new top boss, and damage shifting to exuberant bills, data theft and GDPR.
- Shared Responsibility Model: IaaS leaves the tenant everything inside the VM; PaaS shifts focus to application, data and configuration; SaaS reduces control to data storage and access; FaaS runs atomic, timeboxed functions.
- Metadata API Attacks: The non-routable 169.254.169.254 endpoint, provider header quirks, SSRF feasibility via GCP v1beta1, and credential harvesting URLs.
- Cloud Storage Attacks: Incorrect permissions as the main surface, publicly accessible and guessable buckets, enumeration with CloudStorageFinder, MicroBurst, spaces-finder and sandcastle, and provider CLI recipes.
- Cloud Snapshot Forensics: Snapshots attached to attacker VMs bypass logical checks and expose /etc/shadow, the Windows SAM and confidential files.
- Azure AD, Serverless and IAM Attacks: Hybrid sync making Azure AD ownership equal to full credential compromise, Lambda credentials in /proc/self/environ, shadow admin escalation paths, and session token backdoors invisible to list-access-keys.
- Auditing Tools, Hardening and Practice: cs-suite, Prowler, Scout2, SkyArk, G-Scout, Azucar and Azurite for authorized audits, nimbostratus for limited tokens, Pacu and cloudmapper for attacks, CIS benchmarks, and flaws.cloud-style practice ranges.
Notable Points
- Provider identification commands: sudo dmidecode -s bios-version gives the vendor name; sudo dmidecode -s bios-vendor returns Google on GCP instances.
- Metadata API behavior differs by provider: Azure gives an unauth error if Metadata: true is not present, GCP requires Metadata-Flavor: Google on all requests, AWS answers a plain curl request.
- GCP’s /v1beta1 endpoint works without the Metadata-Flavor header, making SSRF-driven metadata theft feasible; Azure’s mandatory header may block SSRF attacks.
- Credential URLs: AWS at /latest/user-data/iam/security-credentials/
; GCP root password via the v1beta1 recursive attributes JSON; kube-env at …/v1/instance/attributes/kube-env; BuffaloWill’s gist lists more cloud metadata URLs for SSRF testing. - Storage enumeration tools: CloudStorageFinder (AWS, Digital Ocean), MicroBurst (Azure), spaces-finder (Digital Ocean), sandcastle (AWS S3); aws s3 ls s3://
–no-sign-request tests public access; website hosting requires bucketname == CNAME. - Storage command line: aws s3api list-buckets, gsutil ls -r for GCP, az storage blob list for Azure.
- Snapshot attack chain: aws sts get-caller-identity, aws ec2 describe-snapshots –owner-id, list public snapshots with –region us-east-1, create-volume into the attacker account, then sudo mount /dev/xvdb1 /mnt to read /etc/shadow and the Windows SAM.
- Azure AD: hybrid setups sync on-prem and cloud AD, so owning Azure AD yields all credentials; even Office 365 only tenants are part of Azure AD; az ad user list and az ad sp list enumerate users and service principals.
- AWS Lambda has no metadata API access but carries credentials in environment variables at /proc/self/environ; the demo compares serverless attacks on AWS and GCP side by side.
- Shadow admin permissions enabling escalation include CreateAccessKey, CreateLoginProfile, AttachUserPolicy, PutUserPolicy, UpdateAssumeRolePolicy and PassRole (CyberArk research); aws sts get-session-token –duration-seconds 129600 creates a token not visible in aws iam list-access-keys.
- Auditing and practice toolkit: cs-suite for cross-provider reports, Prowler, Scout2, SkyArk, G-Scout, Azucar and Azurite, lunar and lynis for OS audits, Pacu and cloudmapper, CIS Benchmarks, plus flaws.cloud, flaws2.cloud, DVFaaS, Serverless-Goat and AWS-Vulnerable-Lambda.
Notable Quotes
“Cloud computing could be summarized as a [decentralized] shared pool of remotely accessible resources with rapid provisioning capabilities.”
“This Session is highly opinionated.”
“I am standing on giant’s shoulders: a lot of what I am going to talk about is public knowledge just compiled in one single place for all.”
“Cloud: cloud admin is the new top boss”
“Its only named serverless :P”
“Note: The requirement for headers is a clever hack which blocks SSRF attacks”









































