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:
@@ -4,31 +4,30 @@
|
||||
|
||||
## ECS
|
||||
|
||||
### Basic Information
|
||||
### Informazioni di base
|
||||
|
||||
Amazon **Elastic Container Services** or ECS provides a platform to **host containerized applications in the cloud**. ECS has two **deployment** methods, **EC2** instance type and a **serverless** option, **Fargate**. The service **makes running containers in the cloud very easy and pain free**.
|
||||
Amazon **Elastic Container Services** o ECS fornisce una piattaforma per **ospitare applicazioni containerizzate nel cloud**. ECS ha due metodi di **distribuzione**, tipo di istanza **EC2** e un'opzione **serverless**, **Fargate**. Il servizio **rende molto facile e senza problemi eseguire container nel cloud**.
|
||||
|
||||
ECS operates using the following three building blocks: **Clusters**, **Services**, and **Task Definitions**.
|
||||
ECS opera utilizzando i seguenti tre elementi fondamentali: **Cluster**, **Servizi** e **Definizioni di Task**.
|
||||
|
||||
- **Clusters** are **groups of containers** that are running in the cloud. As previously mentioned, there are two launch types for containers, EC2 and Fargate. AWS defines the **EC2** launch type as allowing customers “to run \[their] containerized applications on a cluster of Amazon EC2 instances that \[they] **manage**”. **Fargate** is similar and is defined as “\[allowing] you to run your containerized applications **without the need to provision and manage** the backend infrastructure”.
|
||||
- **Services** are created inside a cluster and responsible for **running the tasks**. Inside a service definition **you define the number of tasks to run, auto scaling, capacity provider (Fargate/EC2/External),** **networking** information such as VPC’s, subnets, and security groups.
|
||||
- There **2 types of applications**:
|
||||
- **Service**: A group of tasks handling a long-running computing work that can be stopped and restarted. For example, a web application.
|
||||
- **Task**: A standalone task that runs and terminates. For example, a batch job.
|
||||
- Among the service applications, there are **2 types of service schedulers**:
|
||||
- [**REPLICA**](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html): The replica scheduling strategy places and **maintains the desired number** of tasks across your cluster. If for some reason a task shut down, a new one is launched in the same or different node.
|
||||
- [**DAEMON**](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html): Deploys exactly one task on each active container instance that has the needed requirements. There is no need to specify a desired number of tasks, a task placement strategy, or use Service Auto Scaling policies.
|
||||
- **Task Definitions** are responsible for **defining what containers will run** and the various parameters that will be configured with the containers such as **port mappings** with the host, **env variables**, Docker **entrypoint**...
|
||||
- Check **env variables for sensitive info**!
|
||||
- **Cluster** sono **gruppi di container** che stanno girando nel cloud. Come già accennato, ci sono due tipi di avvio per i container, EC2 e Fargate. AWS definisce il tipo di avvio **EC2** come che consente ai clienti “di eseguire \[le loro\] applicazioni containerizzate su un cluster di istanze Amazon EC2 che \[essi\] **gestiscono**”. **Fargate** è simile ed è definito come “\[consentendo\] di eseguire le proprie applicazioni containerizzate **senza la necessità di provisionare e gestire** l'infrastruttura di backend”.
|
||||
- **Servizi** vengono creati all'interno di un cluster e sono responsabili per **eseguire i task**. All'interno di una definizione di servizio **si definisce il numero di task da eseguire, l'auto scaling, il fornitore di capacità (Fargate/EC2/Esterno),** informazioni di **networking** come VPC, subnet e gruppi di sicurezza.
|
||||
- Ci sono **2 tipi di applicazioni**:
|
||||
- **Servizio**: Un gruppo di task che gestisce un lavoro di calcolo a lungo termine che può essere interrotto e riavviato. Ad esempio, un'applicazione web.
|
||||
- **Task**: Un task autonomo che viene eseguito e termina. Ad esempio, un lavoro batch.
|
||||
- Tra le applicazioni di servizio, ci sono **2 tipi di pianificatori di servizio**:
|
||||
- [**REPLICA**](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html): La strategia di pianificazione replica posiziona e **mantiene il numero desiderato** di task nel tuo cluster. Se per qualche motivo un task si spegne, ne viene avviato uno nuovo nello stesso o in un nodo diverso.
|
||||
- [**DAEMON**](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html): Distribuisce esattamente un task su ogni istanza di container attiva che ha i requisiti necessari. Non è necessario specificare un numero desiderato di task, una strategia di posizionamento dei task o utilizzare le politiche di Auto Scaling del Servizio.
|
||||
- **Definizioni di Task** sono responsabili per **definire quali container verranno eseguiti** e i vari parametri che verranno configurati con i container come **mappature delle porte** con l'host, **variabili d'ambiente**, **entrypoint** di Docker...
|
||||
- Controlla **le variabili d'ambiente per informazioni sensibili**!
|
||||
|
||||
### Sensitive Data In Task Definitions
|
||||
### Dati sensibili nelle Definizioni di Task
|
||||
|
||||
Task definitions are responsible for **configuring the actual containers that will be running in ECS**. Since task definitions define how containers will run, a plethora of information can be found within.
|
||||
Le definizioni di task sono responsabili per **configurare i container effettivi che verranno eseguiti in ECS**. Poiché le definizioni di task definiscono come verranno eseguiti i container, una miriade di informazioni può essere trovata al loro interno.
|
||||
|
||||
Pacu can enumerate ECS (list-clusters, list-container-instances, list-services, list-task-definitions), it can also dump task definitions.
|
||||
|
||||
### Enumeration
|
||||
Pacu può enumerare ECS (list-clusters, list-container-instances, list-services, list-task-definitions), può anche estrarre le definizioni di task.
|
||||
|
||||
### Enumerazione
|
||||
```bash
|
||||
# Clusters info
|
||||
aws ecs list-clusters
|
||||
@@ -52,8 +51,7 @@ aws ecs describe-tasks --cluster <cluster> --tasks <tasks>
|
||||
## Look for env vars and secrets used from the task definition
|
||||
aws ecs describe-task-definition --task-definition <TASK_NAME>:<VERSION>
|
||||
```
|
||||
|
||||
### Unauthenticated Access
|
||||
### Accesso non autenticato
|
||||
|
||||
{{#ref}}
|
||||
../aws-unauthenticated-enum-access/aws-ecs-unauthenticated-enum.md
|
||||
@@ -61,7 +59,7 @@ aws ecs describe-task-definition --task-definition <TASK_NAME>:<VERSION>
|
||||
|
||||
### Privesc
|
||||
|
||||
In the following page you can check how to **abuse ECS permissions to escalate privileges**:
|
||||
Nella pagina seguente puoi controllare come **abusare dei permessi ECS per escalare i privilegi**:
|
||||
|
||||
{{#ref}}
|
||||
../aws-privilege-escalation/aws-ecs-privesc.md
|
||||
@@ -73,14 +71,10 @@ In the following page you can check how to **abuse ECS permissions to escalate p
|
||||
../aws-post-exploitation/aws-ecs-post-exploitation.md
|
||||
{{#endref}}
|
||||
|
||||
### Persistence
|
||||
### Persistenza
|
||||
|
||||
{{#ref}}
|
||||
../aws-persistence/aws-ecs-persistence.md
|
||||
{{#endref}}
|
||||
|
||||
{{#include ../../../banners/hacktricks-training.md}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user