mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2025-12-30 22:50:43 -08:00
Translated ['src/README.md', 'src/banners/hacktricks-training.md', 'src/
This commit is contained in:
@@ -4,26 +4,25 @@
|
||||
|
||||
## Directory Services
|
||||
|
||||
AWS Directory Service for Microsoft Active Directory is a managed service that makes it easy to **set up, operate, and scale a directory** in the AWS Cloud. It is built on actual **Microsoft Active Directory** and integrates tightly with other AWS services, making it easy to manage your directory-aware workloads and AWS resources. With AWS Managed Microsoft AD, you can **use your existing** Active Directory users, groups, and policies to manage access to your AWS resources. This can help simplify your identity management and reduce the need for additional identity solutions. AWS Managed Microsoft AD also provides automatic backups and disaster recovery capabilities, helping to ensure the availability and durability of your directory. Overall, AWS Directory Service for Microsoft Active Directory can help you save time and resources by providing a managed, highly available, and scalable Active Directory service in the AWS Cloud.
|
||||
AWS Directory Service for Microsoft Active Directory è un servizio gestito che semplifica la **configurazione, l'operazione e la scalabilità di un directory** nel Cloud AWS. È costruito su un vero **Microsoft Active Directory** e si integra strettamente con altri servizi AWS, rendendo facile gestire i tuoi carichi di lavoro e risorse AWS consapevoli del directory. Con AWS Managed Microsoft AD, puoi **utilizzare i tuoi esistenti** utenti, gruppi e politiche di Active Directory per gestire l'accesso alle tue risorse AWS. Questo può aiutare a semplificare la gestione dell'identità e ridurre la necessità di ulteriori soluzioni di identità. AWS Managed Microsoft AD fornisce anche backup automatici e capacità di disaster recovery, contribuendo a garantire la disponibilità e la durabilità del tuo directory. In generale, AWS Directory Service for Microsoft Active Directory può aiutarti a risparmiare tempo e risorse fornendo un servizio Active Directory gestito, altamente disponibile e scalabile nel Cloud AWS.
|
||||
|
||||
### Options
|
||||
|
||||
Directory Services allows to create 5 types of directories:
|
||||
Directory Services consente di creare 5 tipi di directory:
|
||||
|
||||
- **AWS Managed Microsoft AD**: Which will run a new **Microsoft AD in AWS**. You will be able to set the admin password and access the DCs in a VPC.
|
||||
- **Simple AD**: Which will be a **Linux-Samba** Active Directory–compatible server. You will be able to set the admin password and access the DCs in a VPC.
|
||||
- **AD Connector**: A proxy for **redirecting directory requests to your existing Microsoft Active Directory** without caching any information in the cloud. It will be listening in a **VPC** and you need to give **credentials to access the existing AD**.
|
||||
- **Amazon Cognito User Pools**: This is the same as Cognito User Pools.
|
||||
- **Cloud Directory**: This is the **simplest** one. A **serverless** directory where you indicate the **schema** to use and are **billed according to the usage**.
|
||||
- **AWS Managed Microsoft AD**: Che eseguirà un nuovo **Microsoft AD in AWS**. Sarai in grado di impostare la password di amministratore e accedere ai DC in una VPC.
|
||||
- **Simple AD**: Che sarà un server compatibile con Active Directory **Linux-Samba**. Sarai in grado di impostare la password di amministratore e accedere ai DC in una VPC.
|
||||
- **AD Connector**: Un proxy per **reindirizzare le richieste di directory al tuo esistente Microsoft Active Directory** senza memorizzare alcuna informazione nel cloud. Sarà in ascolto in una **VPC** e dovrai fornire **credenziali per accedere all'AD esistente**.
|
||||
- **Amazon Cognito User Pools**: Questo è lo stesso di Cognito User Pools.
|
||||
- **Cloud Directory**: Questo è il **più semplice**. Un directory **serverless** dove indichi lo **schema** da utilizzare e sei **fatturato in base all'uso**.
|
||||
|
||||
AWS Directory services allows to **synchronise** with your existing **on-premises** Microsoft AD, **run your own one** in AWS or synchronize with **other directory types**.
|
||||
I servizi Directory AWS consentono di **synchronizzare** con il tuo esistente **on-premises** Microsoft AD, **eseguire il tuo** in AWS o sincronizzare con **altri tipi di directory**.
|
||||
|
||||
### Lab
|
||||
|
||||
Here you can find a nice tutorial to create you own Microsoft AD in AWS: [https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_tutorial_test_lab_base.html](https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_tutorial_test_lab_base.html)
|
||||
Qui puoi trovare un bel tutorial per creare il tuo Microsoft AD in AWS: [https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_tutorial_test_lab_base.html](https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_tutorial_test_lab_base.html)
|
||||
|
||||
### Enumeration
|
||||
|
||||
```bash
|
||||
# Get directories and DCs
|
||||
aws ds describe-directories
|
||||
@@ -36,10 +35,9 @@ aws ds get-directory-limits
|
||||
aws ds list-certificates --directory-id <id>
|
||||
aws ds describe-certificate --directory-id <id> --certificate-id <id>
|
||||
```
|
||||
|
||||
### Login
|
||||
|
||||
Note that if the **description** of the directory contained a **domain** in the field **`AccessUrl`** it's because a **user** can probably **login** with its **AD credentials** in some **AWS services:**
|
||||
Nota che se la **descrizione** della directory conteneva un **dominio** nel campo **`AccessUrl`** è perché un **utente** può probabilmente **accedere** con le proprie **credenziali AD** in alcuni **servizi AWS:**
|
||||
|
||||
- `<name>.awsapps.com/connect` (Amazon Connect)
|
||||
- `<name>.awsapps.com/workdocs` (Amazon WorkDocs)
|
||||
@@ -57,30 +55,29 @@ Note that if the **description** of the directory contained a **domain** in the
|
||||
|
||||
### Using an AD user
|
||||
|
||||
An **AD user** can be given **access over the AWS management console** via a Role to assume. The **default username is Admin** and it's possible to **change its password** from AWS console.
|
||||
Un **utente AD** può ricevere **accesso alla console di gestione AWS** tramite un Ruolo da assumere. Il **nome utente predefinito è Admin** e è possibile **cambiare la sua password** dalla console AWS.
|
||||
|
||||
Therefore, it's possible to **change the password of Admin**, **create a new user** or **change the password** of a user and grant that user a Role to maintain access.\
|
||||
It's also possible to **add a user to a group inside AD** and **give that AD group access to a Role** (to make this persistence more stealth).
|
||||
Pertanto, è possibile **cambiare la password di Admin**, **creare un nuovo utente** o **cambiare la password** di un utente e concedere a quell'utente un Ruolo per mantenere l'accesso.\
|
||||
È anche possibile **aggiungere un utente a un gruppo all'interno di AD** e **dare a quel gruppo AD accesso a un Ruolo** (per rendere questa persistenza più furtiva).
|
||||
|
||||
### Sharing AD (from victim to attacker)
|
||||
|
||||
It's possible to share an AD environment from a victim to an attacker. This way the attacker will be able to continue accessing the AD env.\
|
||||
However, this implies sharing the managed AD and also creating an VPC peering connection.
|
||||
È possibile condividere un ambiente AD da una vittima a un attaccante. In questo modo l'attaccante sarà in grado di continuare ad accedere all'ambiente AD.\
|
||||
Tuttavia, ciò implica la condivisione dell'AD gestito e anche la creazione di una connessione di peering VPC.
|
||||
|
||||
You can find a guide here: [https://docs.aws.amazon.com/directoryservice/latest/admin-guide/step1_setup_networking.html](https://docs.aws.amazon.com/directoryservice/latest/admin-guide/step1_setup_networking.html)
|
||||
Puoi trovare una guida qui: [https://docs.aws.amazon.com/directoryservice/latest/admin-guide/step1_setup_networking.html](https://docs.aws.amazon.com/directoryservice/latest/admin-guide/step1_setup_networking.html)
|
||||
|
||||
### ~~Sharing AD (from attacker to victim)~~
|
||||
|
||||
It doesn't look like possible to grant AWS access to users from a different AD env to one AWS account.
|
||||
Non sembra possibile concedere accesso AWS a utenti provenienti da un ambiente AD diverso a un account AWS.
|
||||
|
||||
## WorkDocs
|
||||
|
||||
Amazon Web Services (AWS) WorkDocs is a cloud-based **file storage and sharing service**. It is part of the AWS suite of cloud computing services and is designed to provide a secure and scalable solution for organizations to store, share, and collaborate on files and documents.
|
||||
Amazon Web Services (AWS) WorkDocs è un **servizio di archiviazione e condivisione file** basato su cloud. Fa parte della suite di servizi di cloud computing di AWS ed è progettato per fornire una soluzione sicura e scalabile per le organizzazioni per archiviare, condividere e collaborare su file e documenti.
|
||||
|
||||
AWS WorkDocs provides a web-based interface for users to upload, access, and manage their files and documents. It also offers features such as version control, real-time collaboration, and integration with other AWS services and third-party tools.
|
||||
AWS WorkDocs fornisce un'interfaccia web per gli utenti per caricare, accedere e gestire i propri file e documenti. Offre anche funzionalità come il controllo delle versioni, la collaborazione in tempo reale e l'integrazione con altri servizi AWS e strumenti di terze parti.
|
||||
|
||||
### Enumeration
|
||||
|
||||
```bash
|
||||
# Get AD users (Admin not included)
|
||||
aws workdocs describe-users --organization-id <directory-id>
|
||||
@@ -109,7 +106,6 @@ aws workdocs describe-resource-permissions --resource-id <value>
|
||||
aws workdocs add-resource-permissions --resource-id <id> --principals Id=anonymous,Type=ANONYMOUS,Role=VIEWER
|
||||
## This will give an id, the file will be acesible in: https://<name>.awsapps.com/workdocs/index.html#/share/document/<id>
|
||||
```
|
||||
|
||||
### Privesc
|
||||
|
||||
{{#ref}}
|
||||
@@ -117,7 +113,3 @@ aws workdocs add-resource-permissions --resource-id <id> --principals Id=anonymo
|
||||
{{#endref}}
|
||||
|
||||
{{#include ../../../banners/hacktricks-training.md}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user