mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2026-01-14 13:56:30 -08:00
Translated ['src/README.md', 'src/banners/hacktricks-training.md', 'src/
This commit is contained in:
@@ -6,49 +6,48 @@
|
||||
|
||||
### ECR
|
||||
|
||||
#### Basic Information
|
||||
#### Основна інформація
|
||||
|
||||
Amazon **Elastic Container Registry** (Amazon ECR) is a **managed container image registry service**. It is designed to provide an environment where customers can interact with their container images using well-known interfaces. Specifically, the use of the Docker CLI or any preferred client is supported, enabling activities such as pushing, pulling, and managing container images.
|
||||
Amazon **Elastic Container Registry** (Amazon ECR) є **керованим сервісом реєстрації контейнерних зображень**. Він призначений для забезпечення середовища, в якому клієнти можуть взаємодіяти зі своїми контейнерними зображеннями, використовуючи відомі інтерфейси. Зокрема, підтримується використання Docker CLI або будь-якого іншого улюбленого клієнта, що дозволяє виконувати такі дії, як завантаження, вивантаження та управління контейнерними зображеннями.
|
||||
|
||||
ECR is compose by 2 types of objects: **Registries** and **Repositories**.
|
||||
ECR складається з 2 типів об'єктів: **Реєстрації** та **Репозиторії**.
|
||||
|
||||
**Registries**
|
||||
**Реєстрації**
|
||||
|
||||
Every AWS account has 2 registries: **Private** & **Public**.
|
||||
Кожен обліковий запис AWS має 2 реєстрації: **Приватні** та **Публічні**.
|
||||
|
||||
1. **Private Registries**:
|
||||
1. **Приватні реєстрації**:
|
||||
|
||||
- **Private by default**: The container images stored in an Amazon ECR private registry are **only accessible to authorized users** within your AWS account or to those who have been granted permission.
|
||||
- The URI of a **private repository** follows the format `<account_id>.dkr.ecr.<region>.amazonaws.com/<repo-name>`
|
||||
- **Access control**: You can **control access** to your private container images using **IAM policies**, and you can configure fine-grained permissions based on users or roles.
|
||||
- **Integration with AWS services**: Amazon ECR private registries can be easily **integrated with other AWS services**, such as EKS, ECS...
|
||||
- **Other private registry options**:
|
||||
- The Tag immutability column lists its status, if tag immutability is enabled it will **prevent** image **pushes** with **pre-existing tags** from overwriting the images.
|
||||
- The **Encryption type** column lists the encryption properties of the repository, it shows the default encryption types such as AES-256, or has **KMS** enabled encryptions.
|
||||
- The **Pull through cache** column lists its status, if Pull through cache status is Active it will cache **repositories in an external public repository into your private repository**.
|
||||
- Specific **IAM policies** can be configured to grant different **permissions**.
|
||||
- The **scanning configuration** allows to scan for vulnerabilities in the images stored inside the repo.
|
||||
- **Приватні за замовчуванням**: Контейнерні зображення, збережені в приватній реєстрації Amazon ECR, **доступні лише авторизованим користувачам** у вашому обліковому записі AWS або тим, кому надано дозвіл.
|
||||
- URI **приватного репозиторію** має формат `<account_id>.dkr.ecr.<region>.amazonaws.com/<repo-name>`
|
||||
- **Контроль доступу**: Ви можете **контролювати доступ** до своїх приватних контейнерних зображень, використовуючи **IAM політики**, і ви можете налаштувати детальні дозволи на основі користувачів або ролей.
|
||||
- **Інтеграція з сервісами AWS**: Приватні реєстрації Amazon ECR можуть бути легко **інтегровані з іншими сервісами AWS**, такими як EKS, ECS...
|
||||
- **Інші варіанти приватної реєстрації**:
|
||||
- Стовпець незмінності тегів вказує на його статус, якщо незмінність тегів увімкнена, це **запобігатиме** завантаженню зображень з **існуючими тегами**.
|
||||
- Стовпець **Тип шифрування** вказує на властивості шифрування репозиторію, він показує типи шифрування за замовчуванням, такі як AES-256, або має **KMS** увімкнене шифрування.
|
||||
- Стовпець **Кеш для витягування** вказує на його статус, якщо статус кешу для витягування активний, він буде кешувати **репозиторії в зовнішньому публічному репозиторії у вашому приватному репозиторії**.
|
||||
- Специфічні **IAM політики** можуть бути налаштовані для надання різних **дозволів**.
|
||||
- **Конфігурація сканування** дозволяє сканувати на вразливості в зображеннях, збережених у репозиторії.
|
||||
|
||||
2. **Public Registries**:
|
||||
2. **Публічні реєстрації**:
|
||||
|
||||
- **Public accessibility**: Container images stored in an ECR Public registry are **accessible to anyone on the internet without authentication.**
|
||||
- The URI of a **public repository** is like `public.ecr.aws/<random>/<name>`. Although the `<random>` part can be changed by the admin to another string easier to remember.
|
||||
- **Публічна доступність**: Контейнерні зображення, збережені в публічній реєстрації ECR, **доступні будь-кому в Інтернеті без аутентифікації.**
|
||||
- URI **публічного репозиторію** виглядає як `public.ecr.aws/<random>/<name>`. Хоча частину `<random>` адміністратор може змінити на інший рядок, який легше запам'ятати.
|
||||
|
||||
**Repositories**
|
||||
**Репозиторії**
|
||||
|
||||
These are the **images** that in the **private registry** or to the **public** one.
|
||||
Це **зображення**, які знаходяться в **приватній реєстрації** або в **публічній**.
|
||||
|
||||
> [!NOTE]
|
||||
> Note that in order to upload an image to a repository, the **ECR repository need to have the same name as the image**.
|
||||
> Зверніть увагу, що для завантаження зображення в репозиторій, **репозиторій ECR повинен мати таку ж назву, як і зображення**.
|
||||
|
||||
#### Registry & Repository Policies
|
||||
#### Політики реєстрації та репозиторію
|
||||
|
||||
**Registries & repositories** also have **policies that can be used to grant permissions to other principals/accounts**. For example, in the following repository policy image you can see how any user from the whole organization will be able to access the image:
|
||||
**Реєстрації та репозиторії** також мають **політики, які можна використовувати для надання дозволів іншим принципалам/обліковим записам**. Наприклад, у наступній політиці репозиторію ви можете побачити, як будь-який користувач з усієї організації зможе отримати доступ до зображення:
|
||||
|
||||
<figure><img src="../../../images/image (280).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
#### Enumeration
|
||||
|
||||
#### Перерахування
|
||||
```bash
|
||||
# Get repos
|
||||
aws ecr describe-repositories
|
||||
@@ -68,39 +67,34 @@ aws ecr-public describe-repositories
|
||||
aws ecr get-registry-policy
|
||||
aws ecr get-repository-policy --repository-name <repo_name>
|
||||
```
|
||||
|
||||
#### Unauthenticated Enum
|
||||
#### Неавтентифіковане перерахування
|
||||
|
||||
{{#ref}}
|
||||
../aws-unauthenticated-enum-access/aws-ecr-unauthenticated-enum.md
|
||||
{{#endref}}
|
||||
|
||||
#### Privesc
|
||||
#### Підвищення привілеїв
|
||||
|
||||
In the following page you can check how to **abuse ECR permissions to escalate privileges**:
|
||||
На наступній сторінці ви можете перевірити, як **зловживати дозволами ECR для підвищення привілеїв**:
|
||||
|
||||
{{#ref}}
|
||||
../aws-privilege-escalation/aws-ecr-privesc.md
|
||||
{{#endref}}
|
||||
|
||||
#### Post Exploitation
|
||||
#### Після експлуатації
|
||||
|
||||
{{#ref}}
|
||||
../aws-post-exploitation/aws-ecr-post-exploitation.md
|
||||
{{#endref}}
|
||||
|
||||
#### Persistence
|
||||
#### Стійкість
|
||||
|
||||
{{#ref}}
|
||||
../aws-persistence/aws-ecr-persistence.md
|
||||
{{#endref}}
|
||||
|
||||
## References
|
||||
## Посилання
|
||||
|
||||
- [https://docs.aws.amazon.com/AmazonECR/latest/APIReference/Welcome.html](https://docs.aws.amazon.com/AmazonECR/latest/APIReference/Welcome.html)
|
||||
|
||||
{{#include ../../../banners/hacktricks-training.md}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user