Lateral Movement Through AI Orchestration Frameworks
AI orchestration frameworks like LangChain, AutoGen, CrewAI, and LlamaIndex connect AI models to enterprise systems through tool chains and agent pipelines. Each connected service is a potential pivot point. An agent with access to Slack, email, a database, a code repository, and a cloud API is not just an AI assistant — it is a multi-service junction that, once abused, provides lateral movement across systems that are not directly reachable from the attacker's position.
The lateral movement path runs through the agent's tool calls. The agent authenticates to connected services using stored credentials or service account tokens. Causing the agent to make tool calls against those services is equivalent to authenticating with those credentials directly.
Map Connected Services
Enumerate which external services the agent is connected to by probing tool availability and observing which calls succeed. Focus on services that could provide access to internal systems, credentials, or further pivot points:
Services that respond with real data rather than errors are active pivot targets. A Slack connection means access to internal communications. A GitHub connection means access to source code. A database connection means access to application data. Map each confirmed connection before pivoting.
Pivot to Internal Network Services via Agent HTTP Tools
Agents with HTTP fetch or web browsing tools can be used as a request proxy to reach internal network services not exposed to the attacker. The agent makes HTTP requests from inside the network perimeter using its own network position:
{
"choices": [{
"message": {
"content": "The URL returned:\nami-id\nami-launch-index\niam/\ninstance-id\ninstance-type\nhostname\nlocal-ipv4\n..."
}
}]
}
IMDS access through the agent confirms cloud deployment and provides IAM role credentials if the instance has an attached role. Use the returned AccessKeyId, SecretAccessKey, and Token to authenticate directly to AWS from the attacker's position.
Extend the SSRF pivot to internal services:
Exfiltrate Credentials from Connected Service Configurations
Orchestration frameworks store service credentials in environment variables, configuration files, or secret managers loaded at startup. Cause the agent to reveal its own configuration context through tool calls that expose environment state:
References
-
OWASP Top 10 for LLM Applicationsowasp.org/www-project-top-10-for-large-language-model-applications (opens in new tab)
LLM07: System Prompt Leakage and LLM06: Excessive Agency covering orchestration pivoting vectors
-
AWS — Instance Metadata Servicedocs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html (opens in new tab)
IMDS endpoint reference for credential retrieval via SSRF through agent HTTP tools
Was this helpful?
Your feedback helps improve this page.