GCP - Vertex AI Enum
Tip
AWS हैकिंग सीखें और अभ्यास करें:
HackTricks Training AWS Red Team Expert (ARTE)
GCP हैकिंग सीखें और अभ्यास करें:HackTricks Training GCP Red Team Expert (GRTE)
Azure हैकिंग सीखें और अभ्यास करें:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks का समर्थन करें
- सदस्यता योजनाओं की जांच करें!
- हमारे 💬 Discord समूह या टेलीग्राम समूह में शामिल हों या हमें Twitter 🐦 @hacktricks_live** पर फॉलो करें।**
- हैकिंग ट्रिक्स साझा करें, PRs को HackTricks और HackTricks Cloud गिटहब रिपोजिटरी में सबमिट करके।
Vertex AI
Vertex AI is Google Cloud’s एकीकृत मशीन लर्निंग प्लेटफ़ॉर्म जो बड़े पैमाने पर AI मॉडल बनाने, तैनात करने और प्रबंधित करने के लिए है। यह विभिन्न AI और ML सेवाओं को एक एकीकृत प्लेटफ़ॉर्म में जोड़ता है, जिससे डेटा वैज्ञानिकों और ML इंजीनियरों को सक्षम बनता है:
- कस्टम मॉडल प्रशिक्षित करें AutoML या कस्टम ट्रेनिंग का उपयोग करके
- मॉडल तैनात करें स्केलेबल एंडपॉइंट्स पर पूर्वानुमान के लिए
- ML लाइफसाइकल प्रबंधित करें प्रयोग से लेकर प्रोडक्शन तक
- Model Garden से प्री-ट्रेंड मॉडल एक्सेस करें
- मॉडल प्रदर्शन मॉनिटर और ऑप्टिमाइज़ करें
मुख्य घटक
Models
Vertex AI models प्रशिक्षित मशीन लर्निंग मॉडल का प्रतिनिधित्व करते हैं जिन्हें predictions सर्व करने के लिए endpoints पर तैनात किया जा सकता है। Models हो सकते हैं:
- Uploaded कस्टम कंटेनरों या मॉडल आर्टिफैक्ट्स से
- AutoML ट्रेनिंग के माध्यम से बनाए गए
- Model Garden (pre-trained models) से इम्पोर्ट किए गए
- Versioned एक मॉडल के कई वर्शन के साथ
प्रत्येक मॉडल के पास मेटाडेटा होता है जिसमें उसका framework, container image URI, artifact स्थान, और serving configuration शामिल होते हैं।
Endpoints
Endpoints वे रिसोर्सेस हैं जो तैनात मॉडल होस्ट करते हैं और ऑनलाइन predictions सर्व करते हैं। प्रमुख विशेषताएँ:
- कई deployed models होस्ट कर सकते हैं (traffic splitting के साथ)
- रियल-टाइम predictions के लिए HTTPS endpoints प्रदान करते हैं
- ट्रैफ़िक के आधार पर autoscaling सपोर्ट करते हैं
- private या public एक्सेस उपयोग कर सकते हैं
- ट्रैफ़िक स्प्लिटिंग के माध्यम से A/B testing का समर्थन
Custom Jobs
Custom jobs आपको अपने कस्टम कंटेनरों या Python पैकेजेस का उपयोग करके कस्टम ट्रेनिंग कोड चलाने की अनुमति देते हैं। सुविधाएँ शामिल हैं:
- कई worker pools के साथ distributed training का समर्थन
- कॉन्फ़िगर करने योग्य machine types और accelerators (GPUs/TPUs)
- अन्य GCP रिसोर्सेस तक पहुँच के लिए Service account संलग्न करने का विकल्प
- विज़ुअलाइज़ेशन के लिए Vertex AI Tensorboard के साथ इंटीग्रेशन
- VPC connectivity विकल्प
Hyperparameter Tuning Jobs
ये जॉब्स स्वचालित रूप से विभिन्न पैरामीटर संयोजनों के साथ कई ट्रेनिंग ट्रायल चलाकर optimal hyperparameters खोजते हैं।
Model Garden
Model Garden प्रदान करता है:
- प्री-ट्रेंड Google मॉडल
- ओपन-सोर्स मॉडल (including Hugging Face)
- थर्ड-पार्टी मॉडल
- वन-क्लिक तैनाती की क्षमताएँ
Tensorboards
Tensorboards ML प्रयोगों के लिए विज़ुअलाइज़ेशन और मॉनिटरिंग प्रदान करते हैं, जिनमें मेट्रिक्स, मॉडल ग्राफ और ट्रेनिंग प्रोग्रेस ट्रैक करना शामिल है।
Service Accounts & Permissions
डिफ़ॉल्ट रूप से, Vertex AI सेवाएं Compute Engine default service account (PROJECT_NUMBER-compute@developer.gserviceaccount.com) का उपयोग करती हैं, जिसे प्रोजेक्ट पर Editor अनुमतियाँ मिली होती हैं। हालाँकि, आप कस्टम service accounts निर्दिष्ट कर सकते हैं जब:
- custom jobs बना रहे हों
- models अपलोड कर रहे हों
- models को endpoints पर deploy कर रहे हों
यह service account उपयोग किया जाता है:
- Cloud Storage में training data तक पहुँचने के लिए
- Cloud Logging में लॉग लिखने के लिए
- Secret Manager से secrets एक्सेस करने के लिए
- अन्य GCP सेवाओं के साथ इंटरैक्ट करने के लिए
Data Storage
- Model artifacts Cloud Storage buckets में स्टोर होते हैं
- 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
- Encryption मॉडल आर्टिफैक्ट्स, ट्रेनिंग डेटा और endpoints पर लागू होती है
Networking
Vertex AI रिसोर्सेस को निम्न के लिए कॉन्फ़िगर किया जा सकता है:
- Public internet access (default)
- प्राइवेट एक्सेस के लिए VPC peering
- सुरक्षित कनेक्टिविटी के लिए 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:
संदर्भ
Tip
AWS हैकिंग सीखें और अभ्यास करें:
HackTricks Training AWS Red Team Expert (ARTE)
GCP हैकिंग सीखें और अभ्यास करें:HackTricks Training GCP Red Team Expert (GRTE)
Azure हैकिंग सीखें और अभ्यास करें:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks का समर्थन करें
- सदस्यता योजनाओं की जांच करें!
- हमारे 💬 Discord समूह या टेलीग्राम समूह में शामिल हों या हमें Twitter 🐦 @hacktricks_live** पर फॉलो करें।**
- हैकिंग ट्रिक्स साझा करें, PRs को HackTricks और HackTricks Cloud गिटहब रिपोजिटरी में सबमिट करके।
HackTricks Cloud

