mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2026-01-10 12:13:17 -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は、AWS Cloudでディレクトリを**設定、運用、スケール**するのを簡単にするマネージドサービスです。これは実際の**Microsoft Active Directory**に基づいており、他のAWSサービスと密接に統合されているため、ディレクトリ対応のワークロードとAWSリソースを簡単に管理できます。AWS Managed Microsoft ADを使用すると、既存のActive Directoryユーザー、グループ、およびポリシーを使用してAWSリソースへのアクセスを管理できます。これにより、アイデンティティ管理が簡素化され、追加のアイデンティティソリューションの必要性が減少します。AWS Managed Microsoft ADは、自動バックアップと災害復旧機能も提供し、ディレクトリの可用性と耐久性を確保します。全体として、AWS Directory Service for Microsoft Active Directoryは、AWS Cloudでマネージドで高可用性かつスケーラブルなActive Directoryサービスを提供することで、時間とリソースを節約するのに役立ちます。
|
||||
|
||||
### Options
|
||||
|
||||
Directory Services allows to create 5 types of directories:
|
||||
Directory Servicesでは、5種類のディレクトリを作成できます:
|
||||
|
||||
- **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**: 新しい**Microsoft ADをAWSで実行**します。管理者パスワードを設定し、VPC内のDCにアクセスできます。
|
||||
- **Simple AD**: **Linux-Samba** Active Directory互換サーバーです。管理者パスワードを設定し、VPC内のDCにアクセスできます。
|
||||
- **AD Connector**: **既存のMicrosoft Active Directoryへのディレクトリリクエストをリダイレクトするためのプロキシ**で、クラウドに情報をキャッシュしません。**VPC**内でリスニングし、**既存のADにアクセスするための資格情報を提供する必要があります**。
|
||||
- **Amazon Cognito User Pools**: これはCognito User Poolsと同じです。
|
||||
- **Cloud Directory**: これは**最もシンプル**なものです。**サーバーレス**ディレクトリで、使用する**スキーマ**を指定し、**使用量に応じて請求されます**。
|
||||
|
||||
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**.
|
||||
AWS Directory servicesは、既存の**オンプレミス** Microsoft ADと**同期**したり、AWSで独自のものを**実行**したり、**他のディレクトリタイプ**と同期したりすることができます。
|
||||
|
||||
### 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)
|
||||
ここでは、AWSで独自のMicrosoft ADを作成するための素晴らしいチュートリアルを見つけることができます: [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:**
|
||||
ディレクトリの**説明**に**`AccessUrl`**フィールドに**ドメイン**が含まれている場合、それは**ユーザー**がいくつかの**AWSサービス**で**AD資格情報**を使用して**ログイン**できる可能性があるためです:
|
||||
|
||||
- `<name>.awsapps.com/connect` (Amazon Connect)
|
||||
- `<name>.awsapps.com/workdocs` (Amazon WorkDocs)
|
||||
@@ -47,40 +45,39 @@ Note that if the **description** of the directory contained a **domain** in the
|
||||
- `<name>.awsapps.com/console` (Amazon Management Console)
|
||||
- `<name>.awsapps.com/start` (IAM Identity Center)
|
||||
|
||||
### Privilege Escalation
|
||||
### 権限昇格
|
||||
|
||||
{{#ref}}
|
||||
../aws-privilege-escalation/aws-directory-services-privesc.md
|
||||
{{#endref}}
|
||||
|
||||
## Persistence
|
||||
## 永続性
|
||||
|
||||
### Using an AD user
|
||||
### ADユーザーを使用する
|
||||
|
||||
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.
|
||||
**ADユーザー**は、引き受けるロールを介して**AWS管理コンソールへのアクセス**を与えられることがあります。**デフォルトのユーザー名はAdmin**で、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).
|
||||
したがって、**Adminのパスワードを変更**したり、**新しいユーザーを作成**したり、**ユーザーのパスワードを変更**して、そのユーザーにロールを付与してアクセスを維持することが可能です。\
|
||||
また、**AD内のグループにユーザーを追加**し、その**ADグループにロールへのアクセスを与える**ことも可能です(この永続性をよりステルスにするために)。
|
||||
|
||||
### Sharing AD (from victim to attacker)
|
||||
### ADの共有(被害者から攻撃者へ)
|
||||
|
||||
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.
|
||||
被害者から攻撃者にAD環境を共有することが可能です。この方法で、攻撃者はAD環境へのアクセスを継続できるようになります。\
|
||||
ただし、これは管理されたADを共有し、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)
|
||||
ガイドはこちらで見つけることができます: [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)~~
|
||||
### ~~ADの共有(攻撃者から被害者へ)~~
|
||||
|
||||
It doesn't look like possible to grant AWS access to users from a different AD env to one AWS account.
|
||||
異なるAD環境のユーザーにAWSアクセスを付与することは、1つの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は、クラウドベースの**ファイルストレージおよび共有サービス**です。これはAWSのクラウドコンピューティングサービスの一部であり、組織がファイルや文書を安全に保存、共有、共同作業するためのスケーラブルなソリューションを提供するように設計されています。
|
||||
|
||||
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.
|
||||
|
||||
### Enumeration
|
||||
AWS WorkDocsは、ユーザーがファイルや文書をアップロード、アクセス、管理するためのウェブベースのインターフェースを提供します。また、バージョン管理、リアルタイムコラボレーション、他のAWSサービスやサードパーティツールとの統合などの機能も提供しています。
|
||||
|
||||
### 列挙
|
||||
```bash
|
||||
# Get AD users (Admin not included)
|
||||
aws workdocs describe-users --organization-id <directory-id>
|
||||
@@ -109,15 +106,10 @@ 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}}
|
||||
../aws-privilege-escalation/aws-workdocs-privesc.md
|
||||
{{#endref}}
|
||||
|
||||
{{#include ../../../banners/hacktricks-training.md}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user