AWS - RDS Unauthenticated Enum

Reading time: 2 minutes

tip

AWS 해킹 배우기 및 연습하기:HackTricks Training AWS Red Team Expert (ARTE)
GCP 해킹 배우기 및 연습하기: HackTricks Training GCP Red Team Expert (GRTE) Azure 해킹 배우기 및 연습하기: HackTricks Training Azure Red Team Expert (AzRTE)

HackTricks 지원하기

RDS

자세한 정보는 다음을 확인하세요:

AWS - Relational Database (RDS) Enum

공개 포트

인터넷에서 데이터베이스에 대한 공개 접근을 허용할 수 있습니다. 공격자는 데이터베이스에 접근하기 위해 여전히 사용자명과 비밀번호를 알아야 하며, IAM 접근 권한, 또는 exploit이 필요합니다.

공개 RDS Snapshots

AWS는 누구나 RDS snapshots를 다운로드할 수 있도록 접근을 허용할 수 있습니다. 이러한 public RDS snapshots는 자신의 계정에서 매우 쉽게 나열할 수 있습니다:

bash
# Public RDS snapshots
aws rds describe-db-snapshots --include-public

## Search by account ID
aws rds describe-db-snapshots --include-public --query 'DBSnapshots[?contains(DBSnapshotIdentifier, `284546856933:`) == `true`]'
## To share a RDS snapshot with everybody the RDS DB cannot be encrypted (so the snapshot won't be encryted)
## To share a RDS encrypted snapshot you need to share the KMS key also with the account


# From the own account you can check if there is any public snapshot with:
aws rds describe-db-snapshots --snapshot-type public [--region us-west-2]
## Even if in the console appear as there are public snapshot it might be public
## snapshots from other accounts used by the current account

공개 URL 템플릿

mysql://{user_provided}.{random_id}.{region}.rds.amazonaws.com:3306
postgres://{user_provided}.{random_id}.{region}.rds.amazonaws.com:5432

tip

AWS 해킹 배우기 및 연습하기:HackTricks Training AWS Red Team Expert (ARTE)
GCP 해킹 배우기 및 연습하기: HackTricks Training GCP Red Team Expert (GRTE) Azure 해킹 배우기 및 연습하기: HackTricks Training Azure Red Team Expert (AzRTE)

HackTricks 지원하기