AWS - RDS Unauthenticated Enum

Tip

Μάθετε & εξασκηθείτε στο AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Μάθετε & εξασκηθείτε στο GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
Μάθετε & εξασκηθείτε στο Az Hacking: HackTricks Training Azure Red Team Expert (AzRTE)

Υποστηρίξτε το HackTricks

RDS

Για περισσότερες πληροφορίες δείτε:

AWS - Relational Database (RDS) Enum

Δημόσια Θύρα

Είναι δυνατό να δοθεί δημόσια πρόσβαση στη βάση δεδομένων από το internet. Ο επιτιθέμενος ωστόσο θα χρειαστεί να γνωρίζει το όνομα χρήστη και τον κωδικό, IAM access, ή ένα exploit για να εισέλθει στη βάση δεδομένων.

Δημόσια RDS Snapshots

AWS επιτρέπει να δοθεί πρόσβαση σε οποιονδήποτε για να κατεβάσει RDS snapshots. Μπορείτε να απαριθμήσετε αυτά τα δημόσια RDS snapshots πολύ εύκολα από τον δικό σας λογαριασμό:

# 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

Δημόσια 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 Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Μάθετε & εξασκηθείτε στο GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
Μάθετε & εξασκηθείτε στο Az Hacking: HackTricks Training Azure Red Team Expert (AzRTE)

Υποστηρίξτε το HackTricks