雲端 AI 基礎設施攻擊
雲端託管 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 |
| 模型產物 | S3/ECR | Azure Container Registry | Artifact Registry |
| Notebooks | 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. 訓練資料暴露
包含訓練資料的儲存 bucket 經常設定錯誤:S3 bucket 公開讀取存取、Azure Blob 容器過度寬鬆的共享存取簽章、GCS 的 allUsers 讀取者統一 bucket 層級存取。
評估方法論
IAM 審查
列舉 ML 相關角色並評估其權限範圍。尋找
*資源萬用字元與過度廣泛的動作集。網路評估
檢查端點可存取性、VPC/VNet 設定,以及 ML 服務是否面向網際網路。
資料儲存稽核
審查訓練資料、模型產物與日誌儲存的存取控制。
端點測試
測試模型端點的認證繞過、輸入驗證與模型萃取可行性。
相關主題
- AWS SageMaker 攻擊面 — AWS 特定攻擊
- Azure ML 攻擊面 — Azure 特定攻擊
- GCP Vertex AI 攻擊面 — GCP 特定攻擊
- 模型供應鏈 — 模型產物安全
參考文獻
- AWS SageMaker Security Best Practices — Amazon Web Services (2024)
- "Threat Modeling AI/ML Systems and Dependencies" — MITRE ATLAS (2023)
- Azure Machine Learning Security Baseline — Microsoft (2024)
- Google Cloud AI Platform Security Overview — Google Cloud (2024)
為何 ML 工作負載 IAM 角色比其他雲端工作負載更常過度授權?