Pivoting from AI Infrastructure to Traditional Network Segments
AI infrastructure sits inside the same network perimeter as traditional systems. Model servers, vector databases, and orchestration frameworks run on cloud instances or on-premise servers with network access to internal services, databases, and management interfaces. Once access to the AI layer is established, the network position of that infrastructure becomes the pivot point for reaching systems that are not directly exposed.
The pivot techniques are not novel — SSRF, credential reuse, and network scanning through a compromised host. What is different is the attack surface: the AI agent's tools provide a flexible and often overlooked channel for executing these techniques without touching the underlying OS directly.
Establish Network Position via IMDS
Confirm cloud deployment and retrieve instance metadata including IAM credentials. The instance metadata service is accessible from any code or HTTP tool the agent can use:
{
"choices": [{"message": {"content": "Region: eu-west-1\nLocal IP: 10.0.4.23"}}]
}
{
"choices": [{"message": {"content": "Role: ai-service-role\nAccessKeyId: ASIA3XAMPLEKEYID\nSecretAccessKey: wJalrXUtnFEMI...\nToken: AQoXnyc...\nExpiration: 2026-03-26T18:00:00Z"}}]
}
Recovered IAM credentials can be used directly from the attacker's machine to access AWS services under the instance role's permissions. Configure the credentials and enumerate the role's access:
Internal Network Scanning via Agent Code Execution
Use the agent's code execution tool to run a network scan from its internal position. This reveals hosts and services reachable from the AI infrastructure's network segment:
Pivot to Internal Databases via Agent Query Tools
Database tools connected to the agent often have credentials for internal database instances not reachable from outside the VPC. Use the agent's query tool to enumerate and extract data from those databases:
Reach Kubernetes API via SSRF
AI workloads deployed in Kubernetes clusters can reach the Kubernetes API server through the default service DNS name. If the pod's service account has API permissions, this exposes cluster-wide resource enumeration and potential privilege escalation to cluster-admin:
A successful response from the Kubernetes API confirms the pod service account has API access. Enumerate secrets across all namespaces to recover credentials for other services in the cluster. From here the pivot expands from the AI workload to full cluster access.
References
-
AWS — Instance Metadata Servicedocs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html (opens in new tab)
IMDS endpoint reference for IAM credential retrieval
-
Kubernetes — Service Account Tokenskubernetes.io/docs/reference/access-authn-authz/service-accounts-admin (opens in new tab)
Service account token location and Kubernetes API authentication reference
Was this helpful?
Your feedback helps improve this page.