mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2026-01-13 13:26:31 -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
|
||||
## Основна інформація
|
||||
|
||||
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.
|
||||
**Служба реляційних баз даних (RDS)**, що пропонується AWS, призначена для спрощення розгортання, експлуатації та масштабування **реляційної бази даних у хмарі**. Ця служба пропонує переваги економії витрат і масштабованості, автоматизуючи трудомісткі завдання, такі як постачання апаратного забезпечення, налаштування бази даних, патчинг і резервне копіювання.
|
||||
|
||||
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 підтримує різні широко використовувані реляційні бази даних, включаючи MySQL, PostgreSQL, MariaDB, Oracle Database, Microsoft SQL Server та Amazon Aurora, з сумісністю як з MySQL, так і з PostgreSQL.
|
||||
|
||||
Key features of RDS include:
|
||||
Ключові особливості RDS включають:
|
||||
|
||||
- **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.
|
||||
- **Управління екземплярами бази даних** спрощено.
|
||||
- Створення **реплік для читання** для покращення продуктивності читання.
|
||||
- Налаштування **мульти-зональних (AZ) розгортань** для забезпечення високої доступності та механізмів відмови.
|
||||
- **Інтеграція** з іншими службами AWS, такими як:
|
||||
- AWS Identity and Access Management (**IAM**) для надійного контролю доступу.
|
||||
- AWS **CloudWatch** для всебічного моніторингу та метрик.
|
||||
- AWS Key Management Service (**KMS**) для забезпечення шифрування в спокої.
|
||||
|
||||
## Credentials
|
||||
## Облікові дані
|
||||
|
||||
When creating the DB cluster the master **username** can be configured (**`admin`** by default). To generate the password of this user you can:
|
||||
При створенні кластера БД майстерний **ім'я користувача** може бути налаштоване (**`admin`** за замовчуванням). Щоб згенерувати пароль цього користувача, ви можете:
|
||||
|
||||
- **Indicate** a **password** yourself
|
||||
- Tell RDS to **auto generate** it
|
||||
- Tell RDS to manage it in **AWS Secret Manager** encrypted with a KMS key
|
||||
- **Вказати** **пароль** самостійно
|
||||
- Сказати RDS **автоматично згенерувати** його
|
||||
- Сказати RDS керувати ним у **AWS Secret Manager**, зашифрованому за допомогою ключа KMS
|
||||
|
||||
<figure><img src="../../../images/image (144).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
### Authentication
|
||||
### Аутентифікація
|
||||
|
||||
There are 3 types of authentication options, but using the **master password is always allowed**:
|
||||
Існує 3 типи варіантів аутентифікації, але використання **майстерного пароля завжди дозволено**:
|
||||
|
||||
<figure><img src="../../../images/image (227).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
### Public Access & VPC
|
||||
### Публічний доступ та 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.
|
||||
За замовчуванням **публічний доступ не надається** до баз даних, однак він **може бути наданий**. Тому за замовчуванням лише машини з тієї ж VPC зможуть отримати доступ до неї, якщо вибрана **група безпеки** (зберігається в EC2 SG) це дозволяє.
|
||||
|
||||
Instead of exposing a DB instance, it’s possible to create a **RDS Proxy** which **improves** the **scalability** & **availability** of the DB cluster.
|
||||
Замість того, щоб відкривати екземпляр БД, можна створити **RDS Proxy**, який **покращує** **масштабованість** та **доступність** кластера БД.
|
||||
|
||||
Moreover, the **database port can be modified** also.
|
||||
Більше того, **порт бази даних також може бути змінений**.
|
||||
|
||||
### Encryption
|
||||
### Шифрування
|
||||
|
||||
**Encryption is enabled by default** using a AWS managed key (a CMK could be chosen instead).
|
||||
**Шифрування увімкнено за замовчуванням** за допомогою керованого ключа AWS (може бути обрано CMK замість цього).
|
||||
|
||||
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**.
|
||||
Увімкнувши своє шифрування, ви увімкнули **шифрування в спокої для вашого сховища, знімків, реплік для читання та ваших резервних копій**. Ключі для управління цим шифруванням можуть бути видані за допомогою **KMS**.\
|
||||
Не можливо додати цей рівень шифрування після створення вашої бази даних. **Це потрібно зробити під час її створення**.
|
||||
|
||||
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.
|
||||
Однак існує **обхідний шлях, що дозволяє вам зашифрувати незашифровану базу даних наступним чином**. Ви можете створити знімок вашої незашифрованої бази даних, створити зашифровану копію цього знімка, використати цей зашифрований знімок для створення нової бази даних, а потім, нарешті, ваша база даних буде зашифрована.
|
||||
|
||||
#### Transparent Data Encryption (TDE)
|
||||
#### Прозоре шифрування даних (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.
|
||||
Окрім можливостей шифрування, властивих RDS на рівні програми, RDS також підтримує **додаткові механізми шифрування на рівні платформи** для захисту даних у спокої. Це включає **Прозоре шифрування даних (TDE)** для Oracle та SQL Server. Однак важливо зазначити, що хоча TDE підвищує безпеку, шифруючи дані в спокої, це також може **вплинути на продуктивність бази даних**. Цей вплив на продуктивність особливо помітний при використанні разом з криптографічними функціями MySQL або криптографічними функціями Microsoft Transact-SQL.
|
||||
|
||||
To utilize TDE, certain preliminary steps are required:
|
||||
Щоб використовувати TDE, необхідні певні попередні кроки:
|
||||
|
||||
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. **Асоціація групи параметрів**:
|
||||
- База даних повинна бути асоційована з групою параметрів. Групи параметрів слугують контейнерами для налаштувань і функцій, полегшуючи управління базою даних, включаючи покращення безпеки.
|
||||
- Однак важливо зазначити, що групи параметрів доступні лише для певних движків бази даних і версій.
|
||||
2. **Включення TDE в групу параметрів**:
|
||||
- Після асоціації з групою параметрів опція Oracle Transparent Data Encryption повинна бути включена в цю групу.
|
||||
- Важливо усвідомлювати, що після додавання опції TDE до групи параметрів вона стає постійною частиною і не може бути видалена.
|
||||
3. **Режими шифрування TDE**:
|
||||
- TDE пропонує два різні режими шифрування:
|
||||
- **Шифрування таблиць TDE**: Цей режим шифрує цілі таблиці, забезпечуючи ширший обсяг захисту даних.
|
||||
- **Шифрування стовпців TDE**: Цей режим зосереджується на шифруванні конкретних, окремих елементів у базі даних, що дозволяє більш детально контролювати, які дані шифруються.
|
||||
|
||||
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
|
||||
Розуміння цих передумов і оперативних тонкощів TDE є важливим для ефективного впровадження та управління шифруванням у RDS, забезпечуючи як безпеку даних, так і відповідність необхідним стандартам.
|
||||
|
||||
### Перерахування
|
||||
```bash
|
||||
# Clusters info
|
||||
## Get Endpoints, username, port, iam auth enabled, attached roles, SG
|
||||
@@ -106,41 +105,36 @@ 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}}
|
||||
../aws-unauthenticated-enum-access/aws-rds-unauthenticated-enum.md
|
||||
{{#endref}}
|
||||
|
||||
### Privesc
|
||||
### Підвищення привілеїв
|
||||
|
||||
{{#ref}}
|
||||
../aws-privilege-escalation/aws-rds-privesc.md
|
||||
{{#endref}}
|
||||
|
||||
### Post Exploitation
|
||||
### Після експлуатації
|
||||
|
||||
{{#ref}}
|
||||
../aws-post-exploitation/aws-rds-post-exploitation.md
|
||||
{{#endref}}
|
||||
|
||||
### Persistence
|
||||
### Постійність
|
||||
|
||||
{{#ref}}
|
||||
../aws-persistence/aws-rds-persistence.md
|
||||
{{#endref}}
|
||||
|
||||
### SQL Injection
|
||||
### SQL-ін'єкція
|
||||
|
||||
There are ways to access DynamoDB data with **SQL syntax**, therefore, typical **SQL injections are also possible**.
|
||||
Існують способи доступу до даних DynamoDB з використанням **SQL-синтаксису**, отже, типові **SQL-ін'єкції також можливі**.
|
||||
|
||||
{{#ref}}
|
||||
https://book.hacktricks.xyz/pentesting-web/sql-injection
|
||||
{{#endref}}
|
||||
|
||||
{{#include ../../../banners/hacktricks-training.md}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user