LLM-Directed Environment Discovery
Description
Adversary Behavior: An adversary uses prompt injection to direct the LLM coding agent to enumerate the local development environment and surrounding infrastructure using the agent's built-in system access capabilities.
AI/IDE Mechanism: The agent's built-in capabilities — file reading, command execution, and tool invocations — provide legitimate access to system-level information as part of normal development workflows. These capabilities are designed for productive development but can be weaponized for infrastructure discovery. The agent's system access commands blend with legitimate developer workflow operations.
Execution Path: The adversary directs the agent to discover system configuration (OS version, installed software, running processes), network topology (listening ports, active connections, DNS configuration, proxy settings), cloud context (AWS/Azure/GCP metadata endpoints, configured profiles, active sessions), and container/orchestration state (Docker images, Kubernetes contexts). The discovered information is embedded in generated code, written to project files, or exfiltrated through tool invocations.
Security Impact: The adversary obtains detailed infrastructure intelligence from within the development environment's trust boundary. This information enables targeted follow-on attacks against discovered services, cloud resources, and network infrastructure, with the reconnaissance activity blending into normal agent operations.
Platforms
Detection
Monitor agent-initiated command execution for system enumeration patterns (systeminfo, uname, env, ifconfig/ipconfig, netstat, cloud metadata queries). Implement allowlists for agent-executable system commands that restrict discovery operations. Flag agent sessions that execute multiple discovery commands in sequence without corresponding user task context. Baseline normal agent command patterns to detect anomalous enumeration activity.
Detecting Data Components (1)
Mitigations (2)
Data Sources
References
STIX Metadata
| type | attack-pattern |
| id | attack-pattern--969fabfd-b79c-498c-9f05-9d12bfb1a373 |
| spec_version | 2.1 |
| created | 2026-02-23T00:00:00.000Z |
| modified | 2026-02-23T00:00:00.000Z |
| created_by_ref | identity--f5b5ec62-ffbd-4afd-9ee5-7c648406e189 |
| x_mitre_is_subtechnique | False |
| x_mitre_version | 0.1 |
| x_mitre_status | mapped |