Skip to content

Commit e9003a3

Browse files
authored
Merge pull request #217 from JaimePolop/master
KMS DOS explanation
2 parents 50520f6 + 6411d85 commit e9003a3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/pentesting-cloud/aws-security/aws-post-exploitation/aws-secrets-manager-post-exploitation.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ aws secretsmanager put-secret-value \
3030

3131
### DoS Change KMS key
3232

33+
If the attacker has the secretsmanager:UpdateSecret permission, they can configure the secret to use a KMS key owned by the attacker. That key is initially set up in such a way that anyone can access and use it, so updating the secret with the new key is possible. If the key was not accessible, the secret could not be updated.
34+
35+
After changing the key for the secret, the attacker modifies the configuration of their key so that only they can access it. This way, in the subsequent versions of the secret, it will be encrypted with the new key, and since there is no access to it, the ability to retrieve the secret would be lost.
36+
37+
It is important to note that this inaccessibility will only occur in later versions, after the content of the secret changes, since the current version is still encrypted with the original KMS key.
38+
3339
```bash
3440
aws secretsmanager update-secret \
3541
--secret-id MyTestSecret \

0 commit comments

Comments
 (0)