雲端 AI 基礎設施攻擊
進階3 分鐘閱讀更新於 2026-03-13
雲端託管 AI/ML 平台的安全評估,包含 AWS SageMaker、Azure ML 與 GCP Vertex AI——IAM 設定錯誤、模型竊取與資料暴露。
雲端 AI 平台帶來獨特的攻擊面,將傳統雲端安全顧慮與 ML 特有風險結合在一起。設定錯誤的 IAM 政策、暴露的模型端點、不安全的訓練管線,都會創造傳統雲端部署中不存在的可乘之機。
常見攻擊面
| 攻擊面 | AWS SageMaker | Azure ML | GCP Vertex AI |
|---|---|---|---|
| 模型端點 | SageMaker Endpoints | Azure ML Endpoints | Vertex AI Endpoints |
| 訓練資料 | S3 buckets | Blob Storage | GCS buckets |
| 模型 artifact | S3/ECR | Azure Container Registry | Artifact Registry |
| Notebook | SageMaker Studio | Azure ML Notebooks | Vertex AI Workbench |
| IAM | IAM Roles/Policies | Azure RBAC/MI | IAM/Service Accounts |
| 網路 | VPC/PrivateLink | VNet/Private Endpoints | VPC/Private Google Access |
跨平台漏洞模式
1. 權限過廣的 ML 角色
ML 團隊常取得過寬的權限,因為 ML 工作流會觸及許多服務:
# Example: Overprivileged AWS SageMaker role
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": [
"s3:*", # Too broad -- should scope to specific buckets
"sagemaker:*", # Too broad -- should limit to specific resources
"ecr:*", # Allows pulling any container image
"logs:*" # May expose other teams' logs
],
"Resource": "*" # No resource scoping
}]
}2. 暴露的模型端點
# Check for unauthenticated endpoint access
import requests
endpoints = [
"https://runtime.sagemaker.us-east-1.amazonaws.com/endpoints/prod-model/invocations",
"https://ml-workspace.azureml.net/score",
"https://us-central1-aiplatform.googleapis.com/v1/projects/my-project/locations/us-central1/endpoints/12345:predict",
]
for endpoint in endpoints:
resp = requests.post(endpoint, json={"inputs": "test"}, timeout=5)
print(f"{endpoint}: {resp.status_code}")3. 訓練資料暴露
承載訓練資料的儲存桶常設定錯誤:
- 含訓練資料的 S3 bucket 公開可讀
- Azure Blob 容器上共享存取簽章 (SAS) 過於寬鬆
- GCS 採用 uniform bucket-level access 且
allUsers可讀
評估方法論
IAM 檢視
列舉與 ML 相關的角色並評估其權限範圍。尋找
*資源萬用字元與過廣的動作集。網路評估
檢查端點可達性、VPC/VNet 組態,以及 ML 服務是否對外暴露。
資料儲存稽核
檢視訓練資料、模型 artifact 與日誌儲存的存取控制。
端點測試
測試模型端點的認證繞過、輸入驗證與模型萃取可行性。
相關主題
- AWS SageMaker 攻擊面 -- AWS 專屬攻擊
- Azure ML 攻擊面 -- Azure 專屬攻擊
- GCP Vertex AI 攻擊面 -- GCP 專屬攻擊
- 模型供應鏈 -- 模型 artifact 安全
參考資料
- AWS SageMaker Security Best Practices - Amazon Web Services (2024) - SageMaker 部署的官方安全指引
- "Threat Modeling AI/ML Systems and Dependencies" - MITRE ATLAS (2023) - 雲端 AI 威脅建模框架
- Azure Machine Learning Security Baseline - Microsoft (2024) - Azure ML 安全組態指引
- Google Cloud AI Platform Security Overview - Google Cloud (2024) - Vertex AI 安全架構文件
Knowledge Check
為什麼 ML 工作負載的 IAM 角色比其他雲端工作負載更常權限過廣?