AWS Security Masterclass
Riyaz Walikar ● Chief Hacker ● riyaz@kloudle.com
22nd July 2023
Session 9 - AWS RDS
Misconfigurations
Riyaz Walikar
2
Co-founder & Chief Hacker @ Kloudle
KLOUDLE Online - Code of Conduct
Please read and understand the Kloudle Code of Conduct
https://bit.ly/kloudle-online-code-of-conduct
3
Today’s Agenda
4
Session 9
AWS RDS (and Aurora)
5
Session 9
Setup the lab - Scenario 1 - Public RDS Snapshots
6
Session 9
Scenario 1 - Public RDS Snapshots
7
Session 9
Scenario 1 - Public RDS Snapshot - Finding the Snapshot
Find the snapshot based on the information
Is the snapshot encrypted?
Using the Console
8
Session 9
Scenario 1 - Public RDS Snapshot - Creating the DB
Using the Console
9
Session 9
The restore process can take some time as a new DB instance is being created.
Let’s look at how we can find RDS instances of other users on the Internet.
10
Scenario 1 - Public RDS Snapshot - Creating the DB
Using the Console
Once the DB instance is created, we need to modify the DB to change the admin password
mysql -u admin -p -h <RDS_HOSTNAME>
11
Session 9
Scenario 1 - Public RDS Snapshot - Accessing the DB
Using the CLI
In the mysql session
12
Session 9
Scenario 2 - Finding Public RDS Instances
All RDS hostnames are DNS compliant
masterclass-acme-prod.cio3jjxaatse.us-east-1.rds.amazonaws.com
Some places you can find RDS instances (with credentials sometimes!!!)
13
Session 9
14
Session 3
15
Session 3
Scenario 3 - Parameter Group configurations - Demo
RDS Parameter groups are configuration profiles for a given DB software type
16
Session 9
Scenario 3 - Parameter Group configurations - Demo
All modifiable parameters are marked as ‘true’. You can change these to modify the configuration of the DB.
Interestingly (and very obviously so), no parameter that uses a file system path is modifiable, as RDS is a managed service. Examples are shown on the next slide.
The Kloudle Security Research team had identified that AWS RDS does not by default enforce/enable TLS for endpoints. This means clients can connect to the endpoint over plain text!
mysql -u admin -p -h masterclass-acme-prod.cio3jjxaatse.us-east-1.rds.amazonaws.com --ssl-mode=DISABLED
Full research is published on the Kloudle blog, added to references.
17
Session 9
18
Undo AWS Changes
19
Session 9
Short Feedback!
20
That’s all for today!
21
Questions?
Sign up for a free trial: https://app.kloudle.com/signup
Academy: https://kloudle.com/academy
Twitter: @kloudleinc and @riyazwalikar
Reach us at: riyaz@kloudle.com
Riyaz ● Chief Hacker ● riyaz@kloudle.com
Make Users ❤️ Kloudle