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

This commit is contained in:
Translator
2024-12-31 20:20:29 +00:00
parent 77a009d308
commit 4bcd54c1b6
245 changed files with 9959 additions and 12700 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 ist AWS's **Content Delivery Network, die die Verteilung** Ihrer statischen und dynamischen Inhalte über ihr weltweites Netzwerk von Edge-Standorten beschleunigt. Wenn Sie eine Anfrage für Inhalte stellen, die Sie über Amazon CloudFront hosten, wird die Anfrage an den nächstgelegenen Edge-Standort weitergeleitet, der die niedrigste Latenz bietet, um die beste Leistung zu gewährleisten. Wenn **CloudFront-Zugriffsprotokolle** aktiviert sind, können Sie die Anfragen von jedem Benutzer aufzeichnen, der Zugriff auf Ihre Website und Verteilung anfordert. Wie bei S3-Zugriffsprotokollen werden diese Protokolle ebenfalls **auf Amazon S3 für dauerhafte und persistente Speicherung** gespeichert. Es fallen keine Gebühren für die Aktivierung des Protokollierens selbst an, jedoch werden Ihnen die Kosten für den von S3 genutzten Speicher in Rechnung gestellt.
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**.
Die Protokolldateien erfassen Daten über einen bestimmten Zeitraum, und die Anzahl der Protokolldateien, die generiert werden, hängt von der Anzahl der Anfragen ab, die Amazon CloudFront für diese Verteilung erhält. Es ist wichtig zu wissen, dass diese Protokolldateien nicht auf S3 erstellt oder geschrieben werden. S3 ist einfach der Ort, an den sie geliefert werden, sobald die Protokolldatei voll ist. **Amazon CloudFront behält diese Protokolle, bis sie bereit sind, an S3 geliefert zu werden**. Je nach Größe dieser Protokolldateien kann diese Lieferung **zwischen ein und 24 Stunden** dauern.
**By default cookie logging is disabled** but you can enable it.
**Standardmäßig ist das Cookie-Protokollieren deaktiviert**, aber Sie können es aktivieren.
### Functions
### Funktionen
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).
Sie können Funktionen in CloudFront erstellen. Diese Funktionen haben ihren **Endpunkt in CloudFront** definiert und führen einen deklarierten **NodeJS-Code** aus. Dieser Code wird in einer **Sandbox** auf einer unter AWS verwalteten Maschine ausgeführt (Sie benötigen einen Sandbox-Umgehung, um auf das zugrunde liegende Betriebssystem zuzugreifen).
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.
Da die Funktionen nicht im AWS-Konto der Benutzer ausgeführt werden, ist keine IAM-Rolle angehängt, sodass kein direkter Privilegienausbau durch den Missbrauch dieser Funktion möglich ist.
### Enumeration
```bash
aws cloudfront list-distributions
aws cloudfront get-distribution --id <id> # Just get 1
@@ -28,7 +27,6 @@ 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
{{#ref}}
@@ -42,7 +40,3 @@ aws cloudfront list-distributions | jq ".DistributionList.Items[] | .Id, .Origin
{{#endref}}
{{#include ../../../banners/hacktricks-training.md}}