handouts/student-learning-guide.md

Student Learning Guide

這份 handout 給學生上課時跟著投影片使用。它不是作業、不是 CTF 題目,也不要求提交任何截圖、log、token、tool output 或檔案。

學習目標是:看到一個 Entra ID / Azure 狀態時,能說清楚「我看到了什麼、它代表什麼、下一步要查什麼」。

使用方式

課程地圖

Phase你要帶走的問題
Foundations這是 identity plane、resource plane,還是 token / API boundary 的問題?
Initial Access這個流程取得的是使用者上下文、app 授權,還是 session/token?
Recon目前身份看得到什麼?看不到什麼?這代表權限不足還是環境真的乾淨?
Lateral Movement哪個 identity 可以改 owner、credential、permission 或 role assignment?
Persistence哪些 grant、credential、device 或 assignment 會留下持續存取?
Azure Resource Abuse這是 management plane 還是 data plane?scope 在哪裡?
Security Boundary哪個控制改變攻擊鏈的哪一步?還剩下什麼殘餘風險?

Foundations

關鍵詞

觀察問題

Initial Access

本課範圍

觀察問題

Recon and Discovery

觀察問題

判斷句型

Lateral Movement and Persistence

觀察問題

Persistence 候選比較

Candidate要問的問題
Service principal credential誰可以新增 credential?credential age 與 owner 是否合理?
OAuth consent grantgrant 仍有效嗎?誰能撤銷?scope 是否過寬?
Device registrationdevice state 如何影響 Conditional Access?
Malicious device join是否需要高權限或特殊 tenant 設定?

Azure Resource Abuse

觀察問題

判斷句型

Security Boundary

觀察問題

課末自我檢查

你不需要提交答案,但應該能用自己的話回答:

不要記錄的東西

Original Markdown source
# Student Learning Guide

這份 handout 給學生上課時跟著投影片使用。它不是作業、不是 CTF 題目,也不要求提交任何截圖、log、token、tool output 或檔案。

學習目標是:看到一個 Entra ID / Azure 狀態時,能說清楚「我看到了什麼、它代表什麼、下一步要查什麼」。

## 使用方式

- 上課時用這份文件記自己的判斷,不需要交回。
- 遇到工具輸出或 portal 畫面時,先回答觀察問題,再討論攻擊或防禦意義。
- 如果某段沒有實驗環境,仍可以用講師提供的 sanitized example 討論。
- 不記錄真實 tenant ID、帳號、token、secret、private key、session cookie 或 production log。

## 課程地圖

| Phase | 你要帶走的問題 |
| --- | --- |
| Foundations | 這是 identity plane、resource plane,還是 token / API boundary 的問題? |
| Initial Access | 這個流程取得的是使用者上下文、app 授權,還是 session/token? |
| Recon | 目前身份看得到什麼?看不到什麼?這代表權限不足還是環境真的乾淨? |
| Lateral Movement | 哪個 identity 可以改 owner、credential、permission 或 role assignment? |
| Persistence | 哪些 grant、credential、device 或 assignment 會留下持續存取? |
| Azure Resource Abuse | 這是 management plane 還是 data plane?scope 在哪裡? |
| Security Boundary | 哪個控制改變攻擊鏈的哪一步?還剩下什麼殘餘風險? |

## Foundations

### 關鍵詞

- Tenant
- User / Group / Role
- Application object
- Service principal
- Access token / refresh token / PRT
- Azure subscription / resource group / resource
- Azure RBAC
- Management plane / data plane

### 觀察問題

- 這個物件存在於 Entra directory 還是 Azure resource hierarchy?
- 這個權限是 directory role、Graph permission、Azure role,還是 resource data role?
- 這個 token 發給哪個 resource audience?
- 這個 app 是 application object,還是 tenant-local service principal?
- 如果一個 identity 能管理 resource,它是否也能讀到 resource 裡的資料?

## Initial Access

### 本課範圍

- Password spraying:只討論風險、偵測與控制,不做大量登入嘗試。
- Device code:作為 threat context 或講師示範候選。
- OAuth consent:用 controlled app 觀察 consent 與 delegated permission。
- AitM / Evilginx:預設 lecture-only。

### 觀察問題

- 使用者看到的 prompt 是否清楚顯示 app / publisher / permissions?
- 這是 delegated permission 還是 application permission?
- User consent 與 admin consent 的風險差在哪裡?
- 如果 consent 已存在,撤銷點在哪裡?
- Defender 可以在哪裡看到 sign-in、consent、app activity?

## Recon and Discovery

### 觀察問題

- 目前 token 允許查詢哪些 Graph / directory objects?
- ROADtools / ROADrecon 收集到的是 users、groups、apps、service principals、roles,還是 Azure role assignments?
- 某個結果看不到,是因為權限不足、工具限制、tenant policy,還是環境真的沒有?
- 哪些 objects 需要回頭確認 owner、credential、app role assignment?
- 哪些候選路徑值得帶到 lateral movement 章節?

### 判斷句型

- 「我現在能看到 X,但不能確認 Y,所以下一步要查 Z。」
- 「這個結果代表可見度,不代表可濫用性。」
- 「圖上沒有路徑不等於環境安全,可能只是 collection scope 不夠。」

## Lateral Movement and Persistence

### 觀察問題

- 誰是 app / service principal 的 owner?
- Owner 可以改哪些敏感設定?
- 這個 app 是否有高權限 application permission / app role?
- 這個 assignment 是 delegated 還是 app-only?
- 哪些 credential、grant、device、role assignment 可能形成持續存取?
- 這個路徑是否需要 Global Administrator?如果需要,本課是否應改成講師示範或 lecture-only?

### Persistence 候選比較

| Candidate | 要問的問題 |
| --- | --- |
| Service principal credential | 誰可以新增 credential?credential age 與 owner 是否合理? |
| OAuth consent grant | grant 仍有效嗎?誰能撤銷?scope 是否過寬? |
| Device registration | device state 如何影響 Conditional Access? |
| Malicious device join | 是否需要高權限或特殊 tenant 設定? |

## Azure Resource Abuse

### 觀察問題

- 這個 identity 的 Azure role assignment 在哪個 scope?
- Role 是 management plane 權限還是 data plane 權限?
- Storage Blob data access 需要哪種角色或授權?
- Key Vault 目前使用 RBAC model 還是 access policy model?
- Managed Identity 屬於哪個 resource?它被授予哪些 resource permissions?
- Deployment history 能說明什麼?不能直接推論什麼?

### 判斷句型

- 「我可以管理這個 resource,但還不能直接推論我能讀 data plane。」
- 「我看到 role assignment 在 resource group scope,所以要檢查繼承到哪些 resource。」
- 「Managed Identity 的風險取決於它被授權到哪裡,不是 identity 存在本身。」

## Security Boundary

### 觀察問題

- Conditional Access policy scope 是否包含這個 user、app、platform、location?
- Grant control 是 require MFA、authentication strength、compliant device,還是 block?
- MFA 類型是否 phishing-resistant?
- Device compliance 依賴哪些 device registration / join / management 條件?
- Token protection 作用在哪種 token 與哪段 flow?
- 控制改變了攻擊鏈哪一步?還剩下哪條路徑?

## 課末自我檢查

你不需要提交答案,但應該能用自己的話回答:

- identity plane 與 resource plane 的邊界差在哪裡?
- delegated permission 與 app-only permission 差在哪裡?
- app registration 與 service principal 差在哪裡?
- Azure RBAC management plane 與 Storage / Key Vault data plane 差在哪裡?
- Recon 結果如何轉成下一步問題,而不是只看資料量?
- 哪些 persistence candidate 適合 hands-on,哪些應該 lecture-only?
- Conditional Access、MFA、device compliance 各自改變攻擊鏈哪一步?

## 不要記錄的東西

- 真實 tenant ID、subscription ID、object ID。
- 真實使用者 email 或姓名。
- Access token、refresh token、PRT、session cookie。
- Client secret、private key、certificate private material。
- Production logs or screenshots.
- 任何你沒有被授權保留的資料。