GCP - Vertex AI Enum
Tip
AWS 해킹 학습 및 실습:
HackTricks Training AWS Red Team Expert (ARTE)
GCP 해킹 학습 및 실습:HackTricks Training GCP Red Team Expert (GRTE)
Az 해킹 학습 및 실습:HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks 지원하기
- 구독 플랜을 확인하세요!
- 참여하세요 💬 Discord group 또는 telegram group에 참여하거나 Twitter 🐦 @hacktricks_live를 팔로우하세요.
- PR을 제출하여 해킹 트릭을 공유하세요: HackTricks 및 HackTricks Cloud github repos.
Vertex AI
Vertex AI는 대규모로 AI 모델을 구축, 배포 및 관리하기 위한 Google Cloud의 통합 머신러닝 플랫폼입니다. 다양한 AI/ML 서비스를 단일 통합 플랫폼으로 결합하여 데이터 과학자와 ML 엔지니어가 다음을 수행할 수 있게 합니다:
- 커스텀 모델 학습 AutoML 또는 사용자 정의 학습을 사용하여
- 모델 배포 예측을 위한 확장 가능한 endpoints에 모델 배포
- ML 라이프사이클 관리 실험부터 프로덕션까지
- 사전학습 모델 접근 Model Garden에서 제공되는 모델 사용
- 모델 모니터링 및 최적화 성능 관찰 및 개선
Agent Engine / Reasoning Engine
For Agent Engine / Reasoning Engine specific enumeration and post-exploitation paths involving metadata credential theft, P4SA abuse, and producer/tenant project pivoting, check:
GCP - Vertex AI Post Exploitation
Key Components
Models
Vertex AI의 models는 예측 서비스를 위해 endpoints에 배포할 수 있는 학습된 머신러닝 모델을 나타냅니다. Models는 다음과 같을 수 있습니다:
- 업로드된 custom containers 또는 모델 아티팩트
- AutoML 학습을 통해 생성
- Model Garden에서 가져온 사전학습 모델
- 모델당 여러 버전으로 버전 관리
각 모델은 프레임워크, container image URI, 아티팩트 위치 및 서빙 구성 등 메타데이터를 포함합니다.
Endpoints
Endpoints는 배포된 모델을 호스팅하고 온라인 예측을 제공하는 리소스입니다. 주요 기능:
- 여러 배포된 모델 호스팅 가능(트래픽 분할 지원)
- 실시간 예측을 위한 HTTPS endpoints 제공
- 트래픽 기반 autoscaling 지원
- private 또는 public 접근 사용 가능
- 트래픽 분할을 통한 A/B testing 지원
Custom Jobs
Custom jobs는 자체 컨테이너나 Python 패키지를 사용하여 사용자 정의 학습 코드를 실행할 수 있게 합니다. 기능:
- 여러 워커 풀을 통한 분산 학습 지원
- 구성 가능한 machine types 및 accelerators(GPUs/TPUs)
- 다른 GCP 리소스 접근을 위한 서비스 계정 연결
- 시각화를 위한 Vertex AI Tensorboard 통합
- VPC 연결성 옵션
Hyperparameter Tuning Jobs
이 작업들은 서로 다른 파라미터 조합으로 여러 학습 시도를 실행하여 최적의 하이퍼파라미터를 자동으로 탐색합니다.
Model Garden
Model Garden은 다음에 접근할 수 있게 합니다:
- Google의 사전학습 모델
- 오픈소스 모델(예: Hugging Face 포함)
- 서드파티 모델
- 원클릭 배포 기능
Tensorboards
Tensorboards는 ML 실험의 시각화 및 모니터링을 제공하며, 지표, 모델 그래프 및 학습 진행을 추적합니다.
Service Accounts & Permissions
기본적으로 Vertex AI 서비스는 Compute Engine default service account (PROJECT_NUMBER-compute@developer.gserviceaccount.com)를 사용하며, 이 계정은 프로젝트에서 Editor 권한을 갖습니다. 그러나 다음 작업 시 커스텀 서비스 계정을 지정할 수 있습니다:
- Custom jobs 생성
- Models 업로드
- Models를 endpoints에 배포
이 서비스 계정은 다음 용도로 사용됩니다:
- Cloud Storage에 있는 학습 데이터 접근
- Cloud Logging에 로그 작성
- Secret Manager에서 시크릿 접근
- 다른 GCP 서비스와의 상호작용
Data Storage
- Model artifacts는 Cloud Storage 버킷에 저장
- Training data는 일반적으로 Cloud Storage 또는 BigQuery에 저장
- Container images는 Artifact Registry 또는 Container Registry에 저장
- Logs는 Cloud Logging으로 전송
- Metrics는 Cloud Monitoring으로 전송
Encryption
기본적으로 Vertex AI는 Google-managed encryption keys를 사용합니다. 또한 다음을 구성할 수 있습니다:
- Customer-managed encryption keys (CMEK) from Cloud KMS
- 암호화는 모델 아티팩트, 학습 데이터 및 endpoints에 적용
Networking
Vertex AI 리소스는 다음과 같이 구성할 수 있습니다:
- Public internet access (기본)
- VPC peering을 통한 private 접근
- Private Service Connect를 통한 보안 연결
- Shared VPC 지원
Enumeration
# List models
gcloud ai models list --region=<region>
gcloud ai models describe <model-id> --region=<region>
gcloud ai models list-version <model-id> --region=<region>
# List endpoints
gcloud ai endpoints list --region=<region>
gcloud ai endpoints describe <endpoint-id> --region=<region>
gcloud ai endpoints list --list-model-garden-endpoints-only --region=<region>
# List custom jobs
gcloud ai custom-jobs list --region=<region>
gcloud ai custom-jobs describe <job-id> --region=<region>
# Stream logs from a running job
gcloud ai custom-jobs stream-logs <job-id> --region=<region>
# List hyperparameter tuning jobs
gcloud ai hp-tuning-jobs list --region=<region>
gcloud ai hp-tuning-jobs describe <job-id> --region=<region>
# List model monitoring jobs
gcloud ai model-monitoring-jobs list --region=<region>
gcloud ai model-monitoring-jobs describe <job-id> --region=<region>
# List Tensorboards
gcloud ai tensorboards list --region=<region>
gcloud ai tensorboards describe <tensorboard-id> --region=<region>
# List indexes (for vector search)
gcloud ai indexes list --region=<region>
gcloud ai indexes describe <index-id> --region=<region>
# List index endpoints
gcloud ai index-endpoints list --region=<region>
gcloud ai index-endpoints describe <index-endpoint-id> --region=<region>
# Get operations (long-running operations status)
gcloud ai operations describe <operation-id> --region=<region>
# Test endpoint predictions (if you have access)
gcloud ai endpoints predict <endpoint-id> \
--region=<region> \
--json-request=request.json
# Make direct predictions (newer API)
gcloud ai endpoints direct-predict <endpoint-id> \
--region=<region> \
--json-request=request.json
모델 정보 수집
# Get detailed model information including versions
gcloud ai models describe <model-id> --region=<region>
# Check specific model version
gcloud ai models describe <model-id>@<version> --region=<region>
# List all versions of a model
gcloud ai models list-version <model-id> --region=<region>
# Get model artifact location (usually a GCS bucket)
gcloud ai models describe <model-id> --region=<region> --format="value(artifactUri)"
# Get container image URI
gcloud ai models describe <model-id> --region=<region> --format="value(containerSpec.imageUri)"
엔드포인트 세부 정보
# Get endpoint details including deployed models
gcloud ai endpoints describe <endpoint-id> --region=<region>
# Get endpoint URL
gcloud ai endpoints describe <endpoint-id> --region=<region> --format="value(deployedModels[0].displayName)"
# Get service account used by endpoint
gcloud ai endpoints describe <endpoint-id> --region=<region> --format="value(deployedModels[0].serviceAccount)"
# Check traffic split between models
gcloud ai endpoints describe <endpoint-id> --region=<region> --format="value(trafficSplit)"
사용자 지정 작업 정보
# Get job details including command, args, and service account
gcloud ai custom-jobs describe <job-id> --region=<region>
# Get service account used by job
gcloud ai custom-jobs describe <job-id> --region=<region> --format="value(jobSpec.workerPoolSpecs[0].serviceAccount)"
# Get container image used
gcloud ai custom-jobs describe <job-id> --region=<region> --format="value(jobSpec.workerPoolSpecs[0].containerSpec.imageUri)"
# Check environment variables (may contain secrets)
gcloud ai custom-jobs describe <job-id> --region=<region> --format="value(jobSpec.workerPoolSpecs[0].containerSpec.env)"
# Get network configuration
gcloud ai custom-jobs describe <job-id> --region=<region> --format="value(jobSpec.network)"
액세스 제어
# Note: IAM policies for individual Vertex AI resources are managed at the project level
# Check project-level permissions
gcloud projects get-iam-policy <project-id>
# Check service account permissions
gcloud iam service-accounts get-iam-policy <service-account-email>
# Check if endpoints allow unauthenticated access
# This is controlled by IAM bindings on the endpoint
gcloud projects get-iam-policy <project-id> \
--flatten="bindings[].members" \
--filter="bindings.role:aiplatform.user"
스토리지 및 아티팩트
# Models and training jobs often store artifacts in GCS
# List buckets that might contain model artifacts
gsutil ls
# Common artifact locations:
# gs://<project>-aiplatform-<region>/
# gs://<project>-vertex-ai/
# gs://<custom-bucket>/vertex-ai/
# Download model artifacts if accessible
gsutil -m cp -r gs://<bucket>/path/to/artifacts ./artifacts/
# Check for notebooks in AI Platform Notebooks
gcloud notebooks instances list --location=<location>
gcloud notebooks instances describe <instance-name> --location=<location>
모델 가든
# List Model Garden endpoints
gcloud ai endpoints list --list-model-garden-endpoints-only --region=<region>
# Model Garden models are often deployed with default configurations
# Check for publicly accessible endpoints
Privilege Escalation
다음 페이지에서 abuse Vertex AI permissions to escalate privileges 방법을 확인할 수 있습니다:
Post Exploitation
GCP - Vertex AI Post Exploitation
참고자료
Tip
AWS 해킹 학습 및 실습:
HackTricks Training AWS Red Team Expert (ARTE)
GCP 해킹 학습 및 실습:HackTricks Training GCP Red Team Expert (GRTE)
Az 해킹 학습 및 실습:HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks 지원하기
- 구독 플랜을 확인하세요!
- 참여하세요 💬 Discord group 또는 telegram group에 참여하거나 Twitter 🐦 @hacktricks_live를 팔로우하세요.
- PR을 제출하여 해킹 트릭을 공유하세요: HackTricks 및 HackTricks Cloud github repos.
HackTricks Cloud

