From 1bb51e4c2492cac7d3b0e29bc49ecc080d50d82a Mon Sep 17 00:00:00 2001 From: Translator Date: Sun, 21 Jun 2026 13:54:03 +0000 Subject: [PATCH] Translated ['src/pentesting-cloud/azure-security/az-unauthenticated-enum --- .../az-monitor-alert-phishing.md | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src/pentesting-cloud/azure-security/az-unauthenticated-enum-and-initial-entry/az-monitor-alert-phishing.md diff --git a/src/pentesting-cloud/azure-security/az-unauthenticated-enum-and-initial-entry/az-monitor-alert-phishing.md b/src/pentesting-cloud/azure-security/az-unauthenticated-enum-and-initial-entry/az-monitor-alert-phishing.md new file mode 100644 index 000000000..fe13e2949 --- /dev/null +++ b/src/pentesting-cloud/azure-security/az-unauthenticated-enum-and-initial-entry/az-monitor-alert-phishing.md @@ -0,0 +1,62 @@ +# Az - Monitor Alert Phishing + +{{#include ../../../banners/hacktricks-training.md}} + +## Monitor Alert Phishing + +현재[^disclosure] Azure Monitoring Action Group 알림에서 사용자가 monitoring group에 추가되었다는 통지를 우회하는 것이 가능하며, 이를 통해 공격자는 부분적으로 custom monitoring 메시지와 제목을 가진 이메일을 `azure-monitor@microsoft.com`에서 임의의 주소로 보낼 수 있고, full DMARC validation까지 완료된다. + +[^disclosure]: 이 취약점은 2026/3/17에 Microsoft에 보고되었다. 이를 읽는 시점에는 해결되었을 수도 있고 아닐 수도 있다. + +이 공격을 수행하려면 Azure subscription과 대상 목록이 필요하다. + +### Setup +#### Entra ID +대상으로 삼을 각 사용자에 대해, tenant에 Entra ID user를 생성한다. 모든 설정은 default로 두고 username은 아무거나 사용해도 된다. +중요한 유일한 설정은 `Contact Information` 아래의 `Email` property이다. 여기에 실제 target email address를 설정한다. + +사용자 생성이 끝나면, 각 사용자에게 ***SUBSCRIPTION***에 대한 `Monitoring Reader`를 할당한다. + +그 다음, permissions가 전파되도록 24시간을 기다린다[^slow]. 실제로는 몇 시간 정도만 걸리는 것 같지만, Microsoft는 늘 Microsoft답게 동작한다. + +[^slow]: [네, 실제로 그렇게 느리다](https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/action-groups#email-azure-resource-manager) + +#### Azure Monitor Action Group +`Name`과 `Display Name`은 피해자에게 보이므로, 적절한 것으로 선택한다. +피해자가 구독 중인 Action Group의 이름을 알고 있다면, 그것을 사용하는 것도 좋은 선택일 수 있다. + +notification type을 `Email Azure Resource Manager`로 설정하고, target을 `Monitoring Reader`로 설정한다. `Common Alert Schema`는 활성화하지 않는다. +활성화해도 attack은 여전히 "작동"하지만, custom 가능한 필드가 더 깊은 곳에 숨겨지고 이메일 앞부분에 더 많은 context가 포함되어, 설득력이 조금 떨어질 수 있다. + + +#### Azure Monitor Alert Rule +가장 중요한 customization이 이루어지는 부분이다! + +name은 이메일 subject와 이메일 상단 근처에 포함된다. 이것도 기존 alert를 cloning하면 유용할 수 있는 지점이다. +description은 "payload"를 넣을 위치다. 이 부분의 formatting은 바꿀 수 없지만, 예를 들어 [OAuth App Phish](./az-oauth-apps-phishing.md) 링크처럼 content는 완전히 custom할 수 있다. + + +마지막으로, 언제 trigger될지 제어할 수 있는 trigger condition을 설정한다. 예를 들면 특정 resource에 scope된 `ServiceApiHit`일 수 있다. + +Entra Role assignment가 아직 전파되는 중이라면, rule을 ready할 때까지 비활성화해 두는 것을 고려하라. 실수로 trigger되어 이메일이 여러 번 발송되는 것을 막을 수 있다. + +### Execution + +사용한 metric을 그냥 trigger하면 된다. `ServiceApiHit`를 keyvault resource와 "greater than zero" threshold로 사용했다면, +`az keyvault show --name $VAULT`를 사용해 alert가 trigger되게 할 수 있다. + +Alert Rule을 어떻게 설정했는지에 따라, alert가 "Resolved"될 때 두 번째 이메일이 전송되는 것을 막기 위해 Alert Rule이 아직 Alert state에 있는 동안 Action Group을 비활성화하고 싶을 수 있다. + +
이 공격을 실제로 악용한 사례.
+ + + +### OPSEC Considerations +이 공격으로는 일부 identifying information을 숨길 수 없다. +특히 subscription ID가 포함되며, 이는 tenant ID, tenant domains, ect.로 역변환될 수 있다. +자신의 Azure account를 이 용도로 사용한다면, Microsoft가 알아차렸을 때 flag될 수 있는 것에 괜찮은 계정인지 확인하라. + +## References +- [https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/action-groups#email-azure-resource-manager](https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/action-groups#email-azure-resource-manager) + +{{#include ../../../banners/hacktricks-training.md}}