mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2026-01-13 21:36:23 -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
|
||||
## Informazioni di base
|
||||
|
||||
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.
|
||||
Il **Relational Database Service (RDS)** offerto da AWS è progettato per semplificare il deployment, l'operazione e la scalabilità di un **database relazionale nel cloud**. Questo servizio offre i vantaggi dell'efficienza dei costi e della scalabilità, automatizzando compiti laboriosi come la fornitura dell'hardware, la configurazione del database, le patch e i backup.
|
||||
|
||||
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 supporta vari motori di database relazionali ampiamente utilizzati, tra cui MySQL, PostgreSQL, MariaDB, Oracle Database, Microsoft SQL Server e Amazon Aurora, con compatibilità sia per MySQL che per PostgreSQL.
|
||||
|
||||
Key features of RDS include:
|
||||
Le caratteristiche principali di RDS includono:
|
||||
|
||||
- **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.
|
||||
- **La gestione delle istanze di database** è semplificata.
|
||||
- Creazione di **repliche di lettura** per migliorare le prestazioni di lettura.
|
||||
- Configurazione di **distribuzioni multi-Availability Zone (AZ)** per garantire alta disponibilità e meccanismi di failover.
|
||||
- **Integrazione** con altri servizi AWS, come:
|
||||
- AWS Identity and Access Management (**IAM**) per un robusto controllo degli accessi.
|
||||
- AWS **CloudWatch** per un monitoraggio e metriche completi.
|
||||
- AWS Key Management Service (**KMS**) per garantire la crittografia a riposo.
|
||||
|
||||
## Credentials
|
||||
## Credenziali
|
||||
|
||||
When creating the DB cluster the master **username** can be configured (**`admin`** by default). To generate the password of this user you can:
|
||||
Quando si crea il cluster DB, il **nome utente** master può essere configurato (**`admin`** per impostazione predefinita). Per generare la password di questo utente puoi:
|
||||
|
||||
- **Indicate** a **password** yourself
|
||||
- Tell RDS to **auto generate** it
|
||||
- Tell RDS to manage it in **AWS Secret Manager** encrypted with a KMS key
|
||||
- **Indicare** una **password** tu stesso
|
||||
- Dire a RDS di **generarla automaticamente**
|
||||
- Dire a RDS di gestirla in **AWS Secret Manager** crittografata con una chiave KMS
|
||||
|
||||
<figure><img src="../../../images/image (144).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
### Authentication
|
||||
### Autenticazione
|
||||
|
||||
There are 3 types of authentication options, but using the **master password is always allowed**:
|
||||
Ci sono 3 tipi di opzioni di autenticazione, ma l'uso della **password master è sempre consentito**:
|
||||
|
||||
<figure><img src="../../../images/image (227).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
### Public Access & VPC
|
||||
### Accesso pubblico e 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.
|
||||
Per impostazione predefinita **non viene concesso accesso pubblico** ai database, tuttavia **potrebbe essere concesso**. Pertanto, per impostazione predefinita solo le macchine della stessa VPC potranno accedervi se il **gruppo di sicurezza** selezionato (memorizzato in EC2 SG) lo consente.
|
||||
|
||||
Instead of exposing a DB instance, it’s possible to create a **RDS Proxy** which **improves** the **scalability** & **availability** of the DB cluster.
|
||||
Invece di esporre un'istanza DB, è possibile creare un **RDS Proxy** che **migliora** la **scalabilità** e **disponibilità** del cluster DB.
|
||||
|
||||
Moreover, the **database port can be modified** also.
|
||||
Inoltre, il **porto del database può essere modificato**.
|
||||
|
||||
### Encryption
|
||||
### Crittografia
|
||||
|
||||
**Encryption is enabled by default** using a AWS managed key (a CMK could be chosen instead).
|
||||
**La crittografia è abilitata per impostazione predefinita** utilizzando una chiave gestita da AWS (può essere scelta una CMK invece).
|
||||
|
||||
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**.
|
||||
Abilitando la tua crittografia, stai abilitando **la crittografia a riposo per il tuo storage, snapshot, repliche di lettura e i tuoi backup**. Le chiavi per gestire questa crittografia possono essere emesse utilizzando **KMS**.\
|
||||
Non è possibile aggiungere questo livello di crittografia dopo che il tuo database è stato creato. **Deve essere fatto durante la sua creazione**.
|
||||
|
||||
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.
|
||||
Tuttavia, esiste un **workaround che ti consente di crittografare un database non crittografato come segue**. Puoi creare uno snapshot del tuo database non crittografato, creare una copia crittografata di quello snapshot, utilizzare quello snapshot crittografato per creare un nuovo database e poi, infine, il tuo database sarà crittografato.
|
||||
|
||||
#### Transparent Data Encryption (TDE)
|
||||
#### Crittografia dei dati trasparente (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.
|
||||
Oltre alle capacità di crittografia intrinseche a RDS a livello di applicazione, RDS supporta anche **meccanismi di crittografia a livello di piattaforma aggiuntivi** per proteggere i dati a riposo. Questo include **Crittografia dei Dati Trasparente (TDE)** per Oracle e SQL Server. Tuttavia, è fondamentale notare che mentre TDE migliora la sicurezza crittografando i dati a riposo, potrebbe anche **influenzare le prestazioni del database**. Questo impatto sulle prestazioni è particolarmente evidente quando utilizzato in combinazione con le funzioni crittografiche di MySQL o le funzioni crittografiche di Microsoft Transact-SQL.
|
||||
|
||||
To utilize TDE, certain preliminary steps are required:
|
||||
Per utilizzare TDE, sono necessari alcuni passaggi preliminari:
|
||||
|
||||
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.
|
||||
1. **Associazione del gruppo di opzioni**:
|
||||
- Il database deve essere associato a un gruppo di opzioni. I gruppi di opzioni fungono da contenitori per impostazioni e funzionalità, facilitando la gestione del database, inclusi i miglioramenti della sicurezza.
|
||||
- Tuttavia, è importante notare che i gruppi di opzioni sono disponibili solo per specifici motori di database e versioni.
|
||||
2. **Inclusione di TDE nel gruppo di opzioni**:
|
||||
- Una volta associato a un gruppo di opzioni, l'opzione di Crittografia dei Dati Trasparente di Oracle deve essere inclusa in quel gruppo.
|
||||
- È essenziale riconoscere che una volta aggiunta l'opzione TDE a un gruppo di opzioni, diventa una caratteristica permanente e non può essere rimossa.
|
||||
3. **Modalità di crittografia TDE**:
|
||||
- TDE offre due modalità di crittografia distinte:
|
||||
- **Crittografia del Tablespace TDE**: Questa modalità crittografa intere tabelle, fornendo un ambito più ampio di protezione dei dati.
|
||||
- **Crittografia della Colonna TDE**: Questa modalità si concentra sulla crittografia di elementi specifici e individuali all'interno del database, consentendo un controllo più granulare su quali dati vengono crittografati.
|
||||
|
||||
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.
|
||||
|
||||
### Enumeration
|
||||
Comprendere questi prerequisiti e le complessità operative di TDE è cruciale per implementare e gestire efficacemente la crittografia all'interno di RDS, garantendo sia la sicurezza dei dati che la conformità agli standard necessari.
|
||||
|
||||
### Enumerazione
|
||||
```bash
|
||||
# Clusters info
|
||||
## Get Endpoints, username, port, iam auth enabled, attached roles, SG
|
||||
@@ -106,8 +105,7 @@ 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
|
||||
### Accesso Non Autenticato
|
||||
|
||||
{{#ref}}
|
||||
../aws-unauthenticated-enum-access/aws-rds-unauthenticated-enum.md
|
||||
@@ -125,7 +123,7 @@ aws rds modify-db-instance --db-instance-identifier <ID> --master-user-password
|
||||
../aws-post-exploitation/aws-rds-post-exploitation.md
|
||||
{{#endref}}
|
||||
|
||||
### Persistence
|
||||
### Persistenza
|
||||
|
||||
{{#ref}}
|
||||
../aws-persistence/aws-rds-persistence.md
|
||||
@@ -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**.
|
||||
Ci sono modi per accedere ai dati di DynamoDB con **sintassi SQL**, quindi, tipiche **SQL injection sono anche possibili**.
|
||||
|
||||
{{#ref}}
|
||||
https://book.hacktricks.xyz/pentesting-web/sql-injection
|
||||
{{#endref}}
|
||||
|
||||
{{#include ../../../banners/hacktricks-training.md}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user