Translated ['src/README.md', 'src/banners/hacktricks-training.md', 'src/

This commit is contained in:
Translator
2024-12-31 20:10:24 +00:00
parent 192d97f7b7
commit 536671c61c
245 changed files with 10169 additions and 12893 deletions

View File

@@ -4,20 +4,19 @@
## CloudFront
CloudFront is AWS's **content delivery network that speeds up distribution** of your static and dynamic content through its worldwide network of edge locations. When you use a request content that you're hosting through Amazon CloudFront, the request is routed to the closest edge location which provides it the lowest latency to deliver the best performance. When **CloudFront access logs** are enabled you can record the request from each user requesting access to your website and distribution. As with S3 access logs, these logs are also **stored on Amazon S3 for durable and persistent storage**. There are no charges for enabling logging itself, however, as the logs are stored in S3 you will be stored for the storage used by S3.
CloudFront es la **red de entrega de contenido de AWS que acelera la distribución** de tu contenido estático y dinámico a través de su red mundial de ubicaciones de borde. Cuando utilizas un contenido de solicitud que estás alojando a través de Amazon CloudFront, la solicitud se enruta a la ubicación de borde más cercana, lo que proporciona la menor latencia para ofrecer el mejor rendimiento. Cuando **los registros de acceso de CloudFront** están habilitados, puedes registrar la solicitud de cada usuario que solicita acceso a tu sitio web y distribución. Al igual que con los registros de acceso de S3, estos registros también son **almacenados en Amazon S3 para un almacenamiento duradero y persistente**. No hay cargos por habilitar el registro en sí, sin embargo, como los registros se almacenan en S3, se te cobrará por el almacenamiento utilizado por S3.
The log files capture data over a period of time and depending on the amount of requests that are received by Amazon CloudFront for that distribution will depend on the amount of log fils that are generated. It's important to know that these log files are not created or written to on S3. S3 is simply where they are delivered to once the log file is full. **Amazon CloudFront retains these logs until they are ready to be delivered to S3**. Again, depending on the size of these log files this delivery can take **between one and 24 hours**.
Los archivos de registro capturan datos durante un período de tiempo y la cantidad de solicitudes que recibe Amazon CloudFront para esa distribución dependerá de la cantidad de archivos de registro que se generen. Es importante saber que estos archivos de registro no se crean ni se escriben en S3. S3 es simplemente donde se entregan una vez que el archivo de registro está completo. **Amazon CloudFront retiene estos registros hasta que están listos para ser entregados a S3**. Nuevamente, dependiendo del tamaño de estos archivos de registro, esta entrega puede tardar **entre una y 24 horas**.
**By default cookie logging is disabled** but you can enable it.
**Por defecto, el registro de cookies está deshabilitado** pero puedes habilitarlo.
### Functions
You can create functions in CloudFront. These functions will have its **endpoint in cloudfront** defined and will run a declared **NodeJS code**. This code will run inside a **sandbox** in a machine running under an AWS managed machine (you would need a sandbox bypass to manage to escape to the underlaying OS).
Puedes crear funciones en CloudFront. Estas funciones tendrán su **punto final en cloudfront** definido y ejecutarán un **código NodeJS** declarado. Este código se ejecutará dentro de un **sandbox** en una máquina que funciona bajo una máquina administrada por AWS (necesitarías un bypass de sandbox para lograr escapar al sistema operativo subyacente).
As the functions aren't run in the users AWS account. no IAM role is attached so no direct privesc is possible abusing this feature.
Como las funciones no se ejecutan en la cuenta de AWS del usuario, no se adjunta ningún rol de IAM, por lo que no es posible un privilegio de escalada directo abusando de esta función.
### Enumeration
```bash
aws cloudfront list-distributions
aws cloudfront get-distribution --id <id> # Just get 1
@@ -28,21 +27,16 @@ aws cloudfront get-function --name TestFunction function_code.js
aws cloudfront list-distributions | jq ".DistributionList.Items[] | .Id, .Origins.Items[].Id, .Origins.Items[].DomainName, .AliasICPRecordals[].CNAME"
```
## Unauthenticated Access
## Acceso No Autenticado
{{#ref}}
../aws-unauthenticated-enum-access/aws-cloudfront-unauthenticated-enum.md
{{#endref}}
## Post Exploitation
## Post Explotación
{{#ref}}
../aws-post-exploitation/aws-cloudfront-post-exploitation.md
{{#endref}}
{{#include ../../../banners/hacktricks-training.md}}