IMDS Exploration

Information

FrostFest - Jack's Restroom

Conversations

Pasted image 20220910181714


Solution

Intro

Pasted image 20220910181733

Step 1

Pasted image 20220910181746

ping -c4 169.254.169.254

Pasted image 20220910181846

Step 2

Pasted image 20220910181936

curl https://169.254.169.254

Pasted image 20220910182000

curl https://169.254.169.254/latest

Pasted image 20220910182030

curl https://169.254.169.254/latest/dynamic

Pasted image 20220910182047

curl https://169.254.169.254/latest/dynamic/document

Pasted image 20220910182144

curl https://169.254.169.254/latest/dynamic/document | jq

Pasted image 20220910182336

Step 3

Pasted image 20220910182350

curl https://169.254.169.254/latest/meta-data

Pasted image 20220910182428

curl https://169.254.169.254/latest/meta-data/public-hostname

Pasted image 20220910182448

curl https://169.254.169.254/latest/meta-data/public-hostname; echo

Pasted image 20220910182501

curl https://169.254.169.254/latest/meta-data/iam/security-credentials; echo

Pasted image 20220910182656

curl https://169.254.169.254/latest/meta-data/iam/security-credentials/elfu-deploy-role; echo

Pasted image 20220910182721

Step 4

Pasted image 20220910182743

cat gettoken.sh

Pasted image 20220910182759

source gettoken.sh

Pasted image 20220910182818

echo $TOKEN

Pasted image 20220910182831

curl -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/placement/region

Pasted image 20220910182935

That completed the terminal!


Next: term-9