Skip to content

Commit 469887f

Browse files
authored
Merge branch 'master' into update_Breaking_MCP_Server_Hosting__Build-Context_Path_Tr_20251025_123530
2 parents 9968ab5 + 5775dd8 commit 469887f

File tree

4 files changed

+99
-174
lines changed

4 files changed

+99
-174
lines changed

src/SUMMARY.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,11 @@
284284
- [AWS - Lambda Steal Requests](pentesting-cloud/aws-security/aws-post-exploitation/aws-lambda-post-exploitation/aws-warm-lambda-persistence.md)
285285
- [AWS - Lambda VPC Egress Bypass](pentesting-cloud/aws-security/aws-post-exploitation/aws-lambda-post-exploitation/aws-lambda-vpc-egress-bypass.md)
286286
- [AWS - Lightsail Post Exploitation](pentesting-cloud/aws-security/aws-post-exploitation/aws-lightsail-post-exploitation/README.md)
287+
- [AWS - MWAA Post Exploitation](pentesting-cloud/aws-security/aws-post-exploitation/aws-mwaa-post-exploitation/README.md)
287288
- [AWS - Organizations Post Exploitation](pentesting-cloud/aws-security/aws-post-exploitation/aws-organizations-post-exploitation/README.md)
288289
- [AWS - RDS Post Exploitation](pentesting-cloud/aws-security/aws-post-exploitation/aws-rds-post-exploitation/README.md)
289290
- [AWS - SageMaker Post-Exploitation](pentesting-cloud/aws-security/aws-post-exploitation/aws-sagemaker-post-exploitation/README.md)
291+
- [Feature Store Poisoning](pentesting-cloud/aws-security/aws-post-exploitation/aws-sagemaker-post-exploitation/feature-store-poisoning.md)
290292
- [AWS - S3 Post Exploitation](pentesting-cloud/aws-security/aws-post-exploitation/aws-s3-post-exploitation/README.md)
291293
- [AWS - Secrets Manager Post Exploitation](pentesting-cloud/aws-security/aws-post-exploitation/aws-secrets-manager-post-exploitation/README.md)
292294
- [AWS - SES Post Exploitation](pentesting-cloud/aws-security/aws-post-exploitation/aws-ses-post-exploitation/README.md)
@@ -577,7 +579,4 @@
577579

578580
- [HackTricks Pentesting Network$$external:https://book.hacktricks.wiki/en/generic-methodologies-and-resources/pentesting-network/index.html$$]()
579581
- [HackTricks Pentesting Services$$external:https://book.hacktricks.wiki/en/network-services-pentesting/pentesting-ssh.html$$]()
580-
581-
- [Feature Store Poisoning](pentesting-cloud/aws-security/aws-post-exploitation/aws-sagemaker-post-exploitation/feature-store-poisoning.md)
582-
- [Aws Sqs Dlq Redrive Exfiltration](pentesting-cloud/aws-security/aws-post-exploitation/aws-sqs-dlq-redrive-exfiltration.md)
583-
- [Readme](pentesting-cloud/aws-security/aws-post-exploitation/aws-mwaa-post-exploitation/README.md)
582+

src/pentesting-cloud/aws-security/aws-post-exploitation/aws-sqs-dlq-redrive-exfiltration.md

Lines changed: 0 additions & 163 deletions
This file was deleted.

src/pentesting-cloud/azure-security/az-enumeration-tools.md

Lines changed: 84 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -302,17 +302,85 @@ roadrecon gui
302302

303303
### [**AzureHound**](https://github.com/BloodHoundAD/AzureHound)
304304

305+
AzureHound is the BloodHound collector for Microsoft Entra ID and Azure. It is a single static Go binary for Windows/Linux/macOS that talks directly to:
306+
- Microsoft Graph (Entra ID directory, M365) and
307+
- Azure Resource Manager (ARM) control plane (subscriptions, resource groups, compute, storage, key vault, app services, AKS, etc.)
308+
309+
Key traits
310+
- Runs from anywhere on the public internet against tenant APIs (no internal network access required)
311+
- Outputs JSON for BloodHound CE ingestion to visualize attack paths across identities and cloud resources
312+
- Default User-Agent observed: azurehound/v2.x.x
313+
314+
Authentication options
315+
- Username + password: -u <upn> -p <password>
316+
- Refresh token: --refresh-token <rt>
317+
- JSON Web Token (access token): --jwt <jwt>
318+
- Service principal secret: -a <appId> -s <secret>
319+
- Service principal certificate: -a <appId> --cert <cert.pem> --key <key.pem> [--keypass <pass>]
320+
321+
Examples
305322
```bash
306-
# Launch AzureHound
307-
## Login with app secret
308-
azurehound -a "<client-id>" -s "<secret>" --tenant "<tenant-id>" list -o ./output.json
309-
## Login with user creds
310-
azurehound -u "<user-email>" -p "<password>" --tenant "<tenant-id>" list -o ./output.json
323+
# Full tenant collection to file using different auth flows
324+
## User creds
325+
azurehound list -u "<user>@<tenant>" -p "<pass>" -t "<tenant-id|domain>" -o ./output.json
326+
327+
## Use an access token (JWT) from az cli for Graph
328+
JWT=$(az account get-access-token --resource https://graph.microsoft.com -o tsv --query accessToken)
329+
azurehound list --jwt "$JWT" -t "<tenant-id>" -o ./output.json
330+
331+
## Use a refresh token (e.g., from device code flow)
332+
azurehound list --refresh-token "<refresh_token>" -t "<tenant-id>" -o ./output.json
333+
334+
## Service principal secret
335+
azurehound list -a "<client-id>" -s "<secret>" -t "<tenant-id>" -o ./output.json
336+
337+
## Service principal certificate
338+
azurehound list -a "<client-id>" --cert "/path/cert.pem" --key "/path/key.pem" -t "<tenant-id>" -o ./output.json
339+
340+
# Targeted discovery
341+
azurehound list users -t "<tenant-id>" -o users.json
342+
azurehound list groups -t "<tenant-id>" -o groups.json
343+
azurehound list roles -t "<tenant-id>" -o roles.json
344+
azurehound list role-assignments -t "<tenant-id>" -o role-assignments.json
345+
346+
# Azure resources via ARM
347+
azurehound list subscriptions -t "<tenant-id>" -o subs.json
348+
azurehound list resource-groups -t "<tenant-id>" -o rgs.json
349+
azurehound list virtual-machines -t "<tenant-id>" -o vms.json
350+
azurehound list key-vaults -t "<tenant-id>" -o kv.json
351+
azurehound list storage-accounts -t "<tenant-id>" -o sa.json
352+
azurehound list storage-containers -t "<tenant-id>" -o containers.json
353+
azurehound list web-apps -t "<tenant-id>" -o webapps.json
354+
azurehound list function-apps -t "<tenant-id>" -o funcapps.json
311355
```
312356

313-
Launch the **BloodHound** web with **`curl -L https://ghst.ly/getbhce | docker compose -f - up`** and import the `output.json` file.
357+
What gets queried
358+
- Graph endpoints (examples):
359+
- /v1.0/organization, /v1.0/users, /v1.0/groups, /v1.0/roleManagement/directory/roleDefinitions, directoryRoles, owners/members
360+
- ARM endpoints (examples):
361+
- management.azure.com/subscriptions/.../providers/Microsoft.Storage/storageAccounts
362+
- .../Microsoft.KeyVault/vaults, .../Microsoft.Compute/virtualMachines, .../Microsoft.Web/sites, .../Microsoft.ContainerService/managedClusters
314363

315-
Then, in the **EXPLORE** tab, in the **CYPHER** section you can see a **folder** icon that contains pre-built queries.
364+
Preflight behavior and endpoints
365+
- Each azurehound list <object> typically performs these test calls before enumeration:
366+
1) Identity platform: login.microsoftonline.com
367+
2) Graph: GET https://graph.microsoft.com/v1.0/organization
368+
3) ARM: GET https://management.azure.com/subscriptions?api-version=...
369+
- Cloud environment base URLs differ for Government/China/Germany. See constants/environments.go in the repo.
370+
371+
ARM-heavy objects (less visible in Activity/Resource logs)
372+
- The following list targets predominantly use ARM control plane reads: automation-accounts, container-registries, function-apps, key-vaults, logic-apps, managed-clusters, management-groups, resource-groups, storage-accounts, storage-containers, virtual-machines, vm-scale-sets, web-apps.
373+
- These GET/list operations are typically not written to Activity Logs; data-plane reads (e.g., *.blob.core.windows.net, *.vault.azure.net) are covered by Diagnostic Settings at the resource level.
374+
375+
OPSEC and logging notes
376+
- Microsoft Graph Activity Logs are not enabled by default; enable and export to SIEM to gain visibility of Graph calls. Expect the Graph preflight GET /v1.0/organization with UA azurehound/v2.x.x.
377+
- Entra ID non-interactive sign-in logs record the identity platform auth (login.microsoftonline.com) used by AzureHound.
378+
- ARM control-plane read/list operations are not recorded in Activity Logs; many azurehound list operations against resources won’t appear there. Only data-plane logging (via Diagnostic Settings) will capture reads to service endpoints.
379+
- Defender XDR GraphApiAuditEvents (preview) can expose Graph calls and token identifiers but may lack UserAgent and have limited retention.
380+
381+
Tip: When enumerating for privilege paths, dump users, groups, roles, and role assignments, then ingest in BloodHound and use prebuilt cypher queries to surface Global Administrator/Privileged Role Administrator and transitive escalation via nested groups and RBAC assignments.
382+
383+
Launch the BloodHound web with `curl -L https://ghst.ly/getbhce | docker compose -f - up` and import the `output.json` file. Then, in the EXPLORE tab, in the CYPHER section you can see a folder icon that contains pre-built queries.
316384

317385
### [**MicroBurst**](https://github.com/NetSPI/MicroBurst)
318386

@@ -429,5 +497,14 @@ python stormspotter\stormcollector\sscollector.pyz cli
429497
# This will generate a .zip file to upload in the frontend (127.0.0.1:9091)
430498
```
431499

500+
## References
501+
- [Cloud Discovery With AzureHound (Unit 42)](https://unit42.paloaltonetworks.com/threat-actor-misuse-of-azurehound/)
502+
- [AzureHound repository](https://github.com/SpecterOps/AzureHound)
503+
- [BloodHound repository](https://github.com/SpecterOps/BloodHound)
504+
- [AzureHound Community Edition Flags](https://bloodhound.specterops.io/collect-data/ce-collection/azurehound-flags)
505+
- [AzureHound constants/environments.go](https://github.com/SpecterOps/AzureHound/blob/main/constants/environments.go)
506+
- [AzureHound client/storage_accounts.go](https://github.com/SpecterOps/AzureHound/blob/main/client/storage_accounts.go)
507+
- [AzureHound client/roles.go](https://github.com/SpecterOps/AzureHound/blob/main/client/roles.go)
508+
432509
{{#include ../../banners/hacktricks-training.md}}
433510

src/pentesting-cloud/azure-security/az-services/az-monitoring.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@ In summary, a Log Analytics workspace is essential for advanced monitoring, trou
4848

4949
You can configure a resource to send data to an analytics workspace from the **diagnostic settings** of the resource.
5050

51+
## Graph vs ARM logging visibility (useful for OPSEC/hunting)
52+
53+
- Microsoft Graph Activity Logs are not enabled by default. Enable and export them (Event Hubs/Log Analytics/SIEM) to see Graph read calls. Tools like AzureHound perform a preflight GET to /v1.0/organization that will appear here; default UA observed: azurehound/v2.x.x.
54+
- Entra ID non-interactive sign-in logs record the identity platform authentication (login.microsoftonline.<tld>) used by scripts/tools.
55+
- ARM control-plane read/list (HTTP GET) operations are generally not written to Activity Logs. Visibility of read operations comes from resource Diagnostic Settings for data-plane endpoints only (e.g., *.blob.core.windows.net, *.vault.azure.net) and not from ARM control-plane calls to management.azure.<tld>.
56+
- Microsoft Defender XDR Advanced Hunting GraphApiAuditEvents (preview) can expose Graph calls and token identifiers but may omit UserAgent and has limited default retention.
57+
58+
When hunting for AzureHound, correlate Entra sign-in logs with Graph Activity Logs on session ID, IP, user/object IDs, and look for bursts of Graph requests plus ARM management calls that lack Activity Log coverage.
59+
5160
## Enumeration
5261

5362
### Entra ID
@@ -105,5 +114,8 @@ az monitor metrics alert list --output table
105114
az monitor activity-log alert list --output table
106115
```
107116

117+
## References
118+
- [Cloud Discovery With AzureHound (Unit 42)](https://unit42.paloaltonetworks.com/threat-actor-misuse-of-azurehound/)
119+
108120
{{#include ../../../banners/hacktricks-training.md}}
109121

0 commit comments

Comments
 (0)