AWS - EC2 Unauthenticated Enum

Support HackTricks

Angalia katika ukurasa huu maelezo zaidi kuhusu hii:

Public Ports

Inawezekana kufichua bandari yoyote ya mashine za virtual kwa mtandao. Kulingana na kitu kinachotendeka katika bandari iliyofichuliwa, mshambuliaji anaweza kuitumia vibaya.

SSRF

Public AMIs & EBS Snapshots

AWS inaruhusu kutoa ufikiaji kwa mtu yeyote kupakua AMIs na Snapshots. Unaweza kuorodhesha rasilimali hizi kwa urahisi kutoka kwa akaunti yako mwenyewe:

# Public AMIs
aws ec2 describe-images --executable-users all

## Search AMI by ownerID
aws ec2 describe-images --executable-users all --query 'Images[?contains(ImageLocation, `967541184254/`) == `true`]'

## Search AMI by substr ("shared" in the example)
aws ec2 describe-images --executable-users all --query 'Images[?contains(ImageLocation, `shared`) == `true`]'

# Public EBS snapshots (hard-drive copies)
aws ec2 describe-snapshots --restorable-by-user-ids all
aws ec2 describe-snapshots --restorable-by-user-ids all | jq '.Snapshots[] | select(.OwnerId == "099720109477")'

Ikiwa unapata snapshot ambayo inaweza kurejeshwa na mtu yeyote, hakikisha kuangalia AWS - EBS Snapshot Dump kwa maelekezo ya kupakua na kuiba snapshot hiyo.

Kiolezo cha URL ya Umma

# EC2
ec2-{ip-seperated}.compute-1.amazonaws.com
# ELB
http://{user_provided}-{random_id}.{region}.elb.amazonaws.com:80/443
https://{user_provided}-{random_id}.{region}.elb.amazonaws.com

Kuorodhesha EC2 instances zenye IP ya umma

aws ec2 describe-instances --query "Reservations[].Instances[?PublicIpAddress!=null].PublicIpAddress" --output text
Support HackTricks

Last updated