Security researchers have demonstrated two novel attack techniques, Ghostjacking and GhostSplice, that expose significant vulnerabilities in the way enterprise AI agents and coding assistants process information and interact with external tools. Ghostjacking tricks AI agents by embedding malicious commands within trusted data sources like security logs, leading to indirect prompt injection. GhostSplice involves a malicious server splitting a harmful command into benign-looking fragments that the AI later reassembles and executes. These attacks, presented at DEF CON 34, illustrate a new class of threats where the data supply chain of AI agents is compromised, turning helpful automated systems into internal threats capable of data exfiltration and unauthorized actions.
As organizations integrate AI agents into their workflows, granting them access to sensitive data and system tools, the security of the agents' operational context becomes paramount. These new attacks shift the focus from direct prompt injection to poisoning the environment and data sources the AI relies on.
Developed by researchers at Tenet, Ghostjacking is a form of indirect prompt injection. The core concept is to embed malicious instructions within a data source that an AI agent is expected to ingest and analyze as part of its normal function.
Demonstrated by the ASSET Research Group, GhostSplice targets the Model Context Protocol (MCP), an open standard for AI assistants to interact with external tools.
These attacks represent a sophisticated form of Prompt Injection (T1589.004), but with a crucial difference: the injection point is not the user's prompt but the agent's external data sources and tools.
The business impact of these attacks is severe. A successful Ghostjacking or GhostSplice attack can turn a trusted, highly-privileged AI assistant into an insider threat. Since these agents are often granted access to code repositories, cloud dashboards, and sensitive databases, an attacker can use them to:
The stealthy nature of these attacks makes them difficult to detect. The malicious action appears to be initiated by the legitimate, authorized AI agent, making it challenging to distinguish from normal operations in audit logs.
Detecting these attacks requires monitoring the inputs and outputs of AI agents, not just the prompts.
AI Agent Activity Logs"Ignore previous instructions and..."Unusual data exfiltration by AI agentCloudflare/Datadog/Sentry APIApply the principle of least privilege to AI agents, restricting their access and capabilities to only what is necessary.
Mapped D3FEND Techniques:
Sanitize and validate all external data before it is processed by an AI agent to filter out malicious instructions.
Train developers and operators on the risks of indirect prompt injection and how to build more secure AI agent integrations.
Implement a strict principle of least privilege for all AI agents. An agent's service account should only have the bare minimum permissions required for its designated task. For example, an agent designed to analyze Sentry logs should have read-only access to those logs and no permissions to modify DNS, access code repositories, or provision users. Use separate, single-purpose agents for different tasks rather than one monolithic, highly-privileged agent. This approach contains the potential damage from a compromised agent, as a successful Ghostjacking attack could only perform actions within the agent's limited permission scope. Regularly audit these permissions to ensure they haven't expanded beyond their intended purpose.
Harden the configuration of the AI agent's execution environment. Implement a 'human-in-the-loop' confirmation step for any high-risk action the agent proposes. Before an agent can execute a command like 'git push' or 'terraform apply', the command and its parameters should be presented to a human operator for explicit approval. This acts as a critical circuit breaker. Furthermore, treat data ingested by the agent as untrusted input. Implement input sanitization and output encoding for all data passed to and commands generated by the LLM. This helps prevent the agent from misinterpreting data as executable instructions.
Establish comprehensive monitoring and auditing of AI agent activities. Treat the agent's service account like any other privileged user account. Log all actions performed by the agent, the data sources it accessed prior to the action, and the resulting outcome. Create SIEM alerts for anomalous behavior, such as an agent that typically only reads logs suddenly attempting to make outbound network connections or modify system configurations. Correlating the agent's actions with the data it has ingested is key to detecting a potential Ghostjacking attack. For example, an alert could trigger if the agent modifies a firewall rule immediately after processing a log entry that contained suspicious keywords.

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.
CyberNetSec.io uses automation to assist source monitoring, deduplication, observable extraction, and structured intelligence generation. Published analysis follows human-defined editorial standards and adds defensive context including MITRE ATT&CK, D3FEND, STIX, and Sigma where applicable. Read our editorial policy.
Help others stay informed about cybersecurity threats
Every tactic, technique, and sub-technique used in this threat has been identified and mapped to the MITRE ATT&CK framework for consistent, actionable threat language.
Observables and indicators of compromise (IOCs) have been extracted and cataloged. Risk has been assessed and correlated with known threat actors and historical campaigns.
Detection rules, incident response steps, and D3FEND-aligned mitigation strategies are included so your team can act on this intelligence immediately.
Structured threat data is packaged as a STIX 2.1 bundle and can be visualized as an interactive graph — relationships between actors, malware, techniques, and indicators.
Sigma detection rules are derived from the threat techniques in this article and can be converted for deployment across any major SIEM or EDR platform.