AWS - Elastic Beanstalk Persistence
Last updated
Last updated
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE) Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
For more information check:
AWS - Elastic Beanstalk EnumIn order to maintain persistence inside the AWS account, some persistence mechanism could be introduced inside the instance (cron job, ssh key...) so the attacker will be able to access it and steal IAM role credentials from the metadata service.
An attacker could backdoor the code inside the S3 repo so it always execute its backdoor and the expected code.
Instead of changing the code on the actual version, the attacker could deploy a new backdoored version of the application.
TODO: Test
Elastic Beanstalk provides lifecycle hooks that allow you to run custom scripts during instance provisioning and termination. An attacker could configure a lifecycle hook to periodically execute a script that exfiltrates data or maintains access to the AWS account.
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE) Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)