AWS - EMR Privesc
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)
Više informacija o EMR u:
AWS - EMR Enumiam:PassRole
, elasticmapreduce:RunJobFlow
Napadač sa ovim dozvolama može pokrenuti novi EMR klaster povezujući EC2 uloge i pokušati da ukrade njegove akreditive.
Imajte na umu da da biste to uradili, morate znati neku ssh privatnu ključ uvezenu u nalog ili da uvezete jedan, i da možete otvoriti port 22 na glavnom čvoru (možda ćete moći to da uradite sa atributima EmrManagedMasterSecurityGroup
i/ili ServiceAccessSecurityGroup
unutar --ec2-attributes
).
Note how an EMR role is specified in --service-role
and a ec2 role is specified in --ec2-attributes
inside InstanceProfile
. However, this technique only allows to steal the EC2 role credentials (as you will connect via ssh) but no the EMR IAM Role.
Potential Impact: Privesc do EC2 servisne uloge koja je specificirana.
elasticmapreduce:CreateEditor
, iam:ListRoles
, elasticmapreduce:ListClusters
, iam:PassRole
, elasticmapreduce:DescribeEditor
, elasticmapreduce:OpenEditorInConsole
With these permissions an attacker can go to the AWS console, create a Notebook and access it to steal the IAM Role.
Čak i ako prikačite IAM ulogu na instancu beležnice, u mojim testovima sam primetio da sam mogao da ukradem AWS upravljane akreditive, a ne akreditive povezane sa IAM ulogom.
Potential Impact: Privesc do AWS upravljane uloge arn:aws:iam::420254708011:instance-profile/prod-EditorInstanceProfile
elasticmapreduce:OpenEditorInConsole
Just with this permission an attacker will be able to access the Jupyter Notebook and steal the IAM role associated to it.
The URL of the notebook is https://<notebook-id>.emrnotebooks-prod.eu-west-1.amazonaws.com/<notebook-id>/lab/
Čak i ako prikačite IAM ulogu na instancu beležnice, u mojim testovima sam primetio da sam mogao da ukradem AWS upravljane akreditive, a ne akreditive povezane sa IAM ulogom.
Potential Impact: Privesc do AWS upravljane uloge arn:aws:iam::420254708011:instance-profile/prod-EditorInstanceProfile
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE) Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)