mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2026-01-04 08:47:13 -08:00
Translated ['src/README.md', 'src/banners/hacktricks-training.md', 'src/
This commit is contained in:
@@ -1,29 +1,28 @@
|
||||
# AWS - Directory Services / WorkDocs Enum
|
||||
# AWS - Services de Répertoire / Enumération WorkDocs
|
||||
|
||||
{{#include ../../../banners/hacktricks-training.md}}
|
||||
|
||||
## Directory Services
|
||||
## Services de Répertoire
|
||||
|
||||
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 est un service géré qui facilite la **configuration, l'exploitation et la mise à l'échelle d'un annuaire** dans le Cloud AWS. Il est construit sur un véritable **Microsoft Active Directory** et s'intègre étroitement avec d'autres services AWS, facilitant la gestion de vos charges de travail et ressources AWS conscientes de l'annuaire. Avec AWS Managed Microsoft AD, vous pouvez **utiliser vos utilisateurs, groupes et politiques** Active Directory existants pour gérer l'accès à vos ressources AWS. Cela peut aider à simplifier votre gestion des identités et réduire le besoin de solutions d'identité supplémentaires. AWS Managed Microsoft AD fournit également des sauvegardes automatiques et des capacités de récupération après sinistre, aidant à garantir la disponibilité et la durabilité de votre annuaire. Dans l'ensemble, AWS Directory Service for Microsoft Active Directory peut vous aider à gagner du temps et des ressources en fournissant un service Active Directory géré, hautement disponible et évolutif dans le Cloud AWS.
|
||||
|
||||
### Options
|
||||
|
||||
Directory Services allows to create 5 types of directories:
|
||||
Les Services de Répertoire permettent de créer 5 types d'annuaires :
|
||||
|
||||
- **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** : Qui exécutera un nouveau **Microsoft AD dans AWS**. Vous pourrez définir le mot de passe administrateur et accéder aux DC dans un VPC.
|
||||
- **Simple AD** : Qui sera un serveur compatible Active Directory **Linux-Samba**. Vous pourrez définir le mot de passe administrateur et accéder aux DC dans un VPC.
|
||||
- **AD Connector** : Un proxy pour **rediriger les demandes d'annuaire vers votre Microsoft Active Directory existant** sans mettre en cache d'informations dans le cloud. Il écoutera dans un **VPC** et vous devez fournir **des identifiants pour accéder à l'AD existant**.
|
||||
- **Amazon Cognito User Pools** : C'est la même chose que les Cognito User Pools.
|
||||
- **Cloud Directory** : C'est le **plus simple**. Un annuaire **sans serveur** où vous indiquez le **schéma** à utiliser et êtes **facturé en fonction de l'utilisation**.
|
||||
|
||||
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**.
|
||||
Les services de répertoire AWS permettent de **synchroniser** avec votre **Microsoft AD sur site** existant, **d'exécuter le vôtre** dans AWS ou de synchroniser avec **d'autres types d'annuaires**.
|
||||
|
||||
### 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)
|
||||
|
||||
### Enumeration
|
||||
Ici, vous pouvez trouver un joli tutoriel pour créer votre propre Microsoft AD dans 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)
|
||||
|
||||
### Énumération
|
||||
```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:**
|
||||
Notez que si la **description** du répertoire contenait un **domaine** dans le champ **`AccessUrl`**, c'est parce qu'un **utilisateur** peut probablement **se connecter** avec ses **identifiants AD** dans certains **services 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 **utilisateur AD** peut se voir accorder **l'accès à la console de gestion AWS** via un rôle à assumer. Le **nom d'utilisateur par défaut est Admin** et il est possible de **changer son mot de passe** depuis la 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).
|
||||
Par conséquent, il est possible de **changer le mot de passe d'Admin**, **de créer un nouvel utilisateur** ou **de changer le mot de passe** d'un utilisateur et d'accorder à cet utilisateur un rôle pour maintenir l'accès.\
|
||||
Il est également possible **d'ajouter un utilisateur à un groupe dans AD** et **de donner à ce groupe AD accès à un rôle** (pour rendre cette persistance plus discrète).
|
||||
|
||||
### 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.
|
||||
Il est possible de partager un environnement AD d'une victime à un attaquant. De cette manière, l'attaquant pourra continuer à accéder à l'environnement AD.\
|
||||
Cependant, cela implique de partager l'AD géré et également de créer une connexion de 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)
|
||||
Vous pouvez trouver un guide ici : [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.
|
||||
Il ne semble pas possible d'accorder l'accès AWS à des utilisateurs d'un environnement AD différent à un compte 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 est un **service de stockage et de partage de fichiers** basé sur le cloud. Il fait partie de la suite de services de cloud computing AWS et est conçu pour fournir une solution sécurisée et évolutive pour les organisations afin de stocker, partager et collaborer sur des fichiers et des documents.
|
||||
|
||||
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 fournit une interface web pour que les utilisateurs puissent télécharger, accéder et gérer leurs fichiers et documents. Il offre également des fonctionnalités telles que le contrôle de version, la collaboration en temps réel et l'intégration avec d'autres services AWS et des outils tiers.
|
||||
|
||||
### 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