AWS - RDS Unauthenticated Enum

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 스냅샷

AWS는 누구나 RDS 스냅샷을 다운로드할 수 있도록 액세스를 부여할 수 있습니다. 자신의 계정에서 이러한 공개 RDS 스냅샷을 아주 쉽게 나열할 수 있습니다:

# 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

Public RDS Cluster Snapshots

마찬가지로, cluster snapshots를 찾아볼 수 있습니다.

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

## Search by account ID
aws rds describe-db-cluster-snapshots --include-public --query 'DBClusterSnapshots[?contains(DBClusterSnapshotIdentifier, `284546856933:`) == `true`]'

# From the own account you can check if there is any public cluster snapshot with:
aws rds describe-db-cluster-snapshots --snapshot-type public [--region us-west-2]

공개 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 지원하기