AWS - S3 Persistence

Tip

Apprenez & pratiquez AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Apprenez & pratiquez GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
Apprenez & pratiquez Az Hacking: HackTricks Training Azure Red Team Expert (AzRTE)

Soutenez HackTricks

S3

Pour plus d’informations, consultez :

AWS - S3, Athena & Glacier Enum

KMS Client-Side Encryption

When the encryption process is done the user will use the KMS API to generate a new key (aws kms generate-data-key) and he will store the generated encrypted key inside the metadata of the file (python code example) so when the decrypting occur it can decrypt it using KMS again:

Par consĂ©quent, un attaquant pourrait rĂ©cupĂ©rer cette key depuis les metadata et la decrypt avec KMS (aws kms decrypt) pour obtenir la clĂ© utilisĂ©e pour chiffrer l’information. De cette façon, l’attaquant disposera de la encryption key et, si cette key est rĂ©utilisĂ©e pour chiffrer d’autres fichiers, il pourra les utiliser.

Using S3 ACLs

Bien que les ACLs des buckets soient gĂ©nĂ©ralement dĂ©sactivĂ©es, un attaquant disposant de privilĂšges suffisants pourrait en abuser (si elles sont activĂ©es ou si l’attaquant peut les activer) pour conserver l’accĂšs au bucket S3.

Tip

Apprenez & pratiquez AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Apprenez & pratiquez GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
Apprenez & pratiquez Az Hacking: HackTricks Training Azure Red Team Expert (AzRTE)

Soutenez HackTricks