mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2026-01-10 04:05:09 -08:00
Translated ['src/README.md', 'src/banners/hacktricks-training.md', 'src/
This commit is contained in:
@@ -2,76 +2,75 @@
|
||||
|
||||
{{#include ../../../banners/hacktricks-training.md}}
|
||||
|
||||
## Basic Information
|
||||
## Grundinformationen
|
||||
|
||||
The **Relational Database Service (RDS)** offered by AWS is designed to streamline the deployment, operation, and scaling of a **relational database in the cloud**. This service offers the advantages of cost efficiency and scalability while automating labor-intensive tasks like hardware provisioning, database configuration, patching, and backups.
|
||||
Der **Relational Database Service (RDS)**, der von AWS angeboten wird, ist darauf ausgelegt, die Bereitstellung, den Betrieb und die Skalierung einer **relationalen Datenbank in der Cloud** zu optimieren. Dieser Dienst bietet die Vorteile von Kosteneffizienz und Skalierbarkeit, während arbeitsintensive Aufgaben wie Hardwarebereitstellung, Datenbankkonfiguration, Patching und Backups automatisiert werden.
|
||||
|
||||
AWS RDS supports various widely-used relational database engines including MySQL, PostgreSQL, MariaDB, Oracle Database, Microsoft SQL Server, and Amazon Aurora, with compatibility for both MySQL and PostgreSQL.
|
||||
AWS RDS unterstützt verschiedene weit verbreitete relationale Datenbank-Engines, darunter MySQL, PostgreSQL, MariaDB, Oracle Database, Microsoft SQL Server und Amazon Aurora, mit Kompatibilität für sowohl MySQL als auch PostgreSQL.
|
||||
|
||||
Key features of RDS include:
|
||||
Wichtige Funktionen von RDS sind:
|
||||
|
||||
- **Management of database instances** is simplified.
|
||||
- Creation of **read replicas** to enhance read performance.
|
||||
- Configuration of **multi-Availability Zone (AZ) deployments** to ensure high availability and failover mechanisms.
|
||||
- **Integration** with other AWS services, such as:
|
||||
- AWS Identity and Access Management (**IAM**) for robust access control.
|
||||
- AWS **CloudWatch** for comprehensive monitoring and metrics.
|
||||
- AWS Key Management Service (**KMS**) for ensuring encryption at rest.
|
||||
- **Verwaltung von Datenbankinstanzen** ist vereinfacht.
|
||||
- Erstellung von **Read Replicas**, um die Leseleistung zu verbessern.
|
||||
- Konfiguration von **Multi-Availability Zone (AZ) Bereitstellungen**, um hohe Verfügbarkeit und Failover-Mechanismen sicherzustellen.
|
||||
- **Integration** mit anderen AWS-Diensten, wie:
|
||||
- AWS Identity and Access Management (**IAM**) für robuste Zugriffskontrolle.
|
||||
- AWS **CloudWatch** für umfassende Überwachung und Metriken.
|
||||
- AWS Key Management Service (**KMS**) zur Gewährleistung der Verschlüsselung im Ruhezustand.
|
||||
|
||||
## Credentials
|
||||
## Anmeldeinformationen
|
||||
|
||||
When creating the DB cluster the master **username** can be configured (**`admin`** by default). To generate the password of this user you can:
|
||||
Beim Erstellen des DB-Clusters kann der Master-**Benutzername** konfiguriert werden (**`admin`** standardmäßig). Um das Passwort dieses Benutzers zu generieren, können Sie:
|
||||
|
||||
- **Indicate** a **password** yourself
|
||||
- Tell RDS to **auto generate** it
|
||||
- Tell RDS to manage it in **AWS Secret Manager** encrypted with a KMS key
|
||||
- **Ein Passwort** selbst angeben
|
||||
- RDS anweisen, es **automatisch zu generieren**
|
||||
- RDS anweisen, es im **AWS Secret Manager** zu verwalten, verschlüsselt mit einem KMS-Schlüssel
|
||||
|
||||
<figure><img src="../../../images/image (144).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
### Authentication
|
||||
### Authentifizierung
|
||||
|
||||
There are 3 types of authentication options, but using the **master password is always allowed**:
|
||||
Es gibt 3 Arten von Authentifizierungsoptionen, aber die Verwendung des **Master-Passworts ist immer erlaubt**:
|
||||
|
||||
<figure><img src="../../../images/image (227).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
### Public Access & VPC
|
||||
### Öffentlicher Zugriff & VPC
|
||||
|
||||
By default **no public access is granted** to the databases, however it **could be granted**. Therefore, by default only machines from the same VPC will be able to access it if the selected **security group** (are stored in EC2 SG)allows it.
|
||||
Standardmäßig wird **kein öffentlicher Zugriff** auf die Datenbanken gewährt, jedoch **kann er gewährt werden**. Daher können standardmäßig nur Maschinen aus derselben VPC darauf zugreifen, wenn die ausgewählte **Sicherheitsgruppe** (die in EC2 SG gespeichert ist) dies zulässt.
|
||||
|
||||
Instead of exposing a DB instance, it’s possible to create a **RDS Proxy** which **improves** the **scalability** & **availability** of the DB cluster.
|
||||
Anstatt eine DB-Instanz exponieren, ist es möglich, einen **RDS Proxy** zu erstellen, der die **Skalierbarkeit** und **Verfügbarkeit** des DB-Clusters **verbessert**.
|
||||
|
||||
Moreover, the **database port can be modified** also.
|
||||
Darüber hinaus kann auch der **Datenbankport geändert** werden.
|
||||
|
||||
### Encryption
|
||||
### Verschlüsselung
|
||||
|
||||
**Encryption is enabled by default** using a AWS managed key (a CMK could be chosen instead).
|
||||
**Verschlüsselung ist standardmäßig aktiviert** unter Verwendung eines von AWS verwalteten Schlüssels (ein CMK könnte stattdessen gewählt werden).
|
||||
|
||||
By enabling your encryption, you are enabling **encryption at rest for your storage, snapshots, read replicas and your back-ups**. Keys to manage this encryption can be issued by using **KMS**.\
|
||||
It's not possible to add this level of encryption after your database has been created. **It has to be done during its creation**.
|
||||
Durch die Aktivierung Ihrer Verschlüsselung aktivieren Sie die **Verschlüsselung im Ruhezustand für Ihren Speicher, Snapshots, Read Replicas und Ihre Backups**. Schlüssel zur Verwaltung dieser Verschlüsselung können durch die Verwendung von **KMS** ausgegeben werden.\
|
||||
Es ist nicht möglich, dieses Niveau der Verschlüsselung hinzuzufügen, nachdem Ihre Datenbank erstellt wurde. **Es muss während ihrer Erstellung erfolgen**.
|
||||
|
||||
However, there is a **workaround allowing you to encrypt an unencrypted database as follows**. You can create a snapshot of your unencrypted database, create an encrypted copy of that snapshot, use that encrypted snapshot to create a new database, and then, finally, your database would then be encrypted.
|
||||
Es gibt jedoch einen **Workaround, der es Ihnen ermöglicht, eine unverschlüsselte Datenbank wie folgt zu verschlüsseln**. Sie können einen Snapshot Ihrer unverschlüsselten Datenbank erstellen, eine verschlüsselte Kopie dieses Snapshots erstellen, diesen verschlüsselten Snapshot verwenden, um eine neue Datenbank zu erstellen, und schließlich wäre Ihre Datenbank dann verschlüsselt.
|
||||
|
||||
#### Transparent Data Encryption (TDE)
|
||||
#### Transparente Datenverschlüsselung (TDE)
|
||||
|
||||
Alongside the encryption capabilities inherent to RDS at the application level, RDS also supports **additional platform-level encryption mechanisms** to safeguard data at rest. This includes **Transparent Data Encryption (TDE)** for Oracle and SQL Server. However, it's crucial to note that while TDE enhances security by encrypting data at rest, it may also **affect database performance**. This performance impact is especially noticeable when used in conjunction with MySQL cryptographic functions or Microsoft Transact-SQL cryptographic functions.
|
||||
Neben den Verschlüsselungsfunktionen, die RDS auf Anwendungsebene bietet, unterstützt RDS auch **zusätzliche plattformseitige Verschlüsselungsmechanismen**, um Daten im Ruhezustand zu schützen. Dazu gehört die **Transparente Datenverschlüsselung (TDE)** für Oracle und SQL Server. Es ist jedoch wichtig zu beachten, dass TDE zwar die Sicherheit erhöht, indem es Daten im Ruhezustand verschlüsselt, es jedoch auch **die Datenbankleistung beeinträchtigen kann**. Diese Leistungsbeeinträchtigung ist besonders bemerkbar, wenn sie in Verbindung mit MySQL-Kryptografiefunktionen oder Microsoft Transact-SQL-Kryptografiefunktionen verwendet wird.
|
||||
|
||||
To utilize TDE, certain preliminary steps are required:
|
||||
Um TDE zu nutzen, sind bestimmte Vorbereitungen erforderlich:
|
||||
|
||||
1. **Option Group Association**:
|
||||
- The database must be associated with an option group. Option groups serve as containers for settings and features, facilitating database management, including security enhancements.
|
||||
- However, it's important to note that option groups are only available for specific database engines and versions.
|
||||
2. **Inclusion of TDE in Option Group**:
|
||||
- Once associated with an option group, the Oracle Transparent Data Encryption option needs to be included in that group.
|
||||
- It's essential to recognize that once the TDE option is added to an option group, it becomes a permanent fixture and cannot be removed.
|
||||
3. **TDE Encryption Modes**:
|
||||
- TDE offers two distinct encryption modes:
|
||||
- **TDE Tablespace Encryption**: This mode encrypts entire tables, providing a broader scope of data protection.
|
||||
- **TDE Column Encryption**: This mode focuses on encrypting specific, individual elements within the database, allowing for more granular control over what data is encrypted.
|
||||
- Die Datenbank muss mit einer Optionsgruppe verbunden sein. Optionsgruppen dienen als Container für Einstellungen und Funktionen und erleichtern die Datenbankverwaltung, einschließlich Sicherheitsverbesserungen.
|
||||
- Es ist jedoch wichtig zu beachten, dass Optionsgruppen nur für bestimmte Datenbank-Engines und -Versionen verfügbar sind.
|
||||
2. **Einbeziehung von TDE in die Optionsgruppe**:
|
||||
- Sobald sie mit einer Optionsgruppe verbunden ist, muss die Oracle-Option für die transparente Datenverschlüsselung in diese Gruppe aufgenommen werden.
|
||||
- Es ist wichtig zu erkennen, dass die TDE-Option, sobald sie zu einer Optionsgruppe hinzugefügt wurde, ein permanentes Element wird und nicht entfernt werden kann.
|
||||
3. **TDE-Verschlüsselungsmodi**:
|
||||
- TDE bietet zwei verschiedene Verschlüsselungsmodi:
|
||||
- **TDE Tablespace Encryption**: Dieser Modus verschlüsselt gesamte Tabellen und bietet einen breiteren Schutzbereich für Daten.
|
||||
- **TDE Column Encryption**: Dieser Modus konzentriert sich auf die Verschlüsselung spezifischer, einzelner Elemente innerhalb der Datenbank und ermöglicht eine granularere Kontrolle darüber, welche Daten verschlüsselt werden.
|
||||
|
||||
Understanding these prerequisites and the operational intricacies of TDE is crucial for effectively implementing and managing encryption within RDS, ensuring both data security and compliance with necessary standards.
|
||||
Das Verständnis dieser Voraussetzungen und der betrieblichen Einzelheiten von TDE ist entscheidend für die effektive Implementierung und Verwaltung der Verschlüsselung innerhalb von RDS, um sowohl die Datensicherheit als auch die Einhaltung notwendiger Standards zu gewährleisten.
|
||||
|
||||
### Enumeration
|
||||
|
||||
```bash
|
||||
# Clusters info
|
||||
## Get Endpoints, username, port, iam auth enabled, attached roles, SG
|
||||
@@ -106,7 +105,6 @@ aws rds describe-db-proxy-targets
|
||||
## reset credentials of MasterUsername
|
||||
aws rds modify-db-instance --db-instance-identifier <ID> --master-user-password <NewPassword> --apply-immediately
|
||||
```
|
||||
|
||||
### Unauthenticated Access
|
||||
|
||||
{{#ref}}
|
||||
@@ -133,14 +131,10 @@ aws rds modify-db-instance --db-instance-identifier <ID> --master-user-password
|
||||
|
||||
### SQL Injection
|
||||
|
||||
There are ways to access DynamoDB data with **SQL syntax**, therefore, typical **SQL injections are also possible**.
|
||||
Es gibt Möglichkeiten, auf DynamoDB-Daten mit **SQL-Syntax** zuzugreifen, daher sind typische **SQL-Injektionen ebenfalls möglich**.
|
||||
|
||||
{{#ref}}
|
||||
https://book.hacktricks.xyz/pentesting-web/sql-injection
|
||||
{{#endref}}
|
||||
|
||||
{{#include ../../../banners/hacktricks-training.md}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user