Anti-AOF Counteroffensive

There is good reason to be excited about AI agents! The possibility of giving artificial intelligence complex tasks and letting it work out how to complete it opens up new ways to build useful systems. Making that freedom reliable is a difficult engineering problem, and securing it adds another layer of complexity.

Luckily, with millions of hostile agents and AOFs attacking our systems, we can use these reliability and alignment problems to our advantage.

https://cloud.google.com/blog/topics/threat-intelligence/artex-and-friends-enter-agentic-offensive-frameworks

We need ways to reason about how these systems behave as they interact with their surroundings, especially in adversarial contexts. There is an established discipline that's off the beaten path for most security practitioners that offers both a mental model and a technical foundation for this sort of counteroffensive: cybernetics.

Its study of control and communication gives us a way to understand how autonomous systems pursue goals and respond to changing conditions. This article introduces that perspective, then uses it to examine how these systems can be attacked and what practitioners can learn from this fascinating discipline to defend and degrade hostile agents.

Robert Shala from our team along with colleagues Blerim Rexha and Kastriot Fetahaj presented research at DEF CON 34 AI Village (August 2026) on disrupting AI Agents in CTFs using these techniques.

Check out the poster here https://aivillage.org/posters/dont-block-bifurcate/

This is a cookbook we hope will help you defend better and turn you into a fellow cybernetic guerrilla! It's a little technical but it'll be a worthy read we promise!

What is cybernetics?

Cybernetics is the study of control and communication in the animal and the machine, following Norbert Wiener’s foundational formulation in Cybernetics (1948). Cybernetics studies two central components: control and communication.

Control concerns how a system’s behavior is directed or regulated while communication concerns how information is transmitted between its parts or exchanged with its environment. Cybernetics studies the relationship between to determine how information and feedback guides action, and how the consequences of action return to influence subsequent behavior. Wiener, Cybernetics.

A thermostat provides a simple way to examine this relationship. Consider one connected to a heater. You set a desired temperature of 21°C. Its sensor reports 18°C, so the thermostat turns the heater on. As the room warms, new readings bring it closer to the set temperature, and the thermostat eventually switches the heater off. The room’s changing temperature influences the next action.

That return of information is feedback, and the circular relationship is a feedback loop. Regulation is the use of actions to keep a property within acceptable bounds; here, keeping the room near 21°C. Åström and Murray, Feedback Systems, chapter 1; Ashby, An Introduction to Cybernetics, chapters 10–12.

The thermostat gives us a vocabulary for following the loop:

In an adversarial context, imagine someone cooling only the sensor. It reports a cold room, and the thermostat keeps heating even as the rest of the room becomes too warm. The objective and the controller’s rule remain intact while the attacker has made the system’s own corrective behavior produce the unwanted result. Changing the setting to 30°C would reach a similar outcome by altering the reference rather than the observation.

Now, consider a coding agent asked to fix a failing test. It edits the code and runs the test again. The result reaches the agent through a tool response: this is communication. Using that result to decide whether to revise the code or finish the task is part of control. The agent’s ability to complete the task depends on the connection between those processes. This example illustrates the use of action results in subsequent decisions that architectures such as ReAct make explicit. [Yao et al., ReAct]

I mentioned ReAct, so let's pop a little further under the hood.

ReAct as a Cybernetics for AI Agents

ReAct provides a useful starting point for understanding how contemporary LLM based agents operate. It interleaves reasoning with actions whose results inform subsequent decisions. That same broad pattern appears in the documented tool-use loops for OpenAI models, Claude, and Gemini: the model requests an operation, receives its result, and decides how to proceed. Modern implementations extend this arrangement with internal reasoning and mechanisms for preserving reasoning state across tool calls. We can therefore describe them as following a ReAct-like interaction pattern, while recognizing differences from the original method.

Viewed through cybernetics, the important feature is the closed loop between action and observation: information returned from the environment informs the system’s next action. This makes the cybernetic perspective relevant to the architectures practitioners are building and securing today. Check them out: OpenAI tool calling, Claude’s agentic loop, Gemini reasoning continuity.

Once we view an agent as a system that uses communication and control to guide its actions, we can examine how that process goes wrong. Failure modes in cybernetic systems have been studied extensively in adjacent disciplines. For security practitioners, these established failure modes offer useful models for developing attack hypotheses and designing robust defenses. During an assessment, we can look for conditions that produce or sustain a failure. The next step is to understand these failures of regulation and how they arise.

Cybernetic Failure Modes

Applying those failure modes to agents requires understanding how regulation works and checking which conditions for failure exist in a particular deployment. Let's begin by thinking about feedback!

Negative feedback is a response that counteracts a change. For example, a thermostat set to 21°C switches the heater on when the room becomes too cold. The resulting warmth brings the temperature back toward the setting. Once the room is warm enough, the thermostat switches the heater off. The response reduces the difference between the actual temperature and the desired temperature, helping keep the room near 21°C. Åström and Murray, Feedback Systems, chapter 2.

Positive feedback is a response that reinforces a change. To illustrate this with the same system, imagine changing the thermostat’s rule so that a rise in temperature makes it turn the heater up. The room gets hotter, so the thermostat increases the heat again. Each response strengthens the change that triggered it, driving the temperature upward ad infinitum (or until your house burns down!) This is amplification: the effect of an action encourages more action in the same direction.

Keep in mind that “Positive” and “Negative” describe whether the response reinforces or counteracts a change; they are not judgments about whether the outcome is desirable. Maruyama, The Second Cybernetics.

Timing affects whether correction works as intended. For example, a delayed temperature reading may keep the heater running after the room is warm enough, causing it to overshoot the target. Depending on the controller and the delay, repeated overcorrection can produce oscillation: movement back and forth around the desired state.

As such, regulation uses feedback to adjust a system toward a desired condition, with timing affecting whether those adjustments correct the problem or make it worse.

Manipulating feedback and timing can provide attack primitives for disrupting regulation. By falsifying the information a system acts on or delaying its delivery, we can disrupt agents and their regulation in creative ways.  Teixeira et al., A Secure Control Framework for Resource-Limited Adversaries.

The mechanisms below describe ways regulation can fail and give us a vocabulary for attacking hostile agents in this context.

To start thinking about adversarial contexts, it helps to connect these failure mechanisms with the access we need to cause them.

But first, let's go back to hostile AI Agents as cybernetic systems. After that we'll get more practical.

The Anatomy of Cybernetic Agents

To understand how a hostile agent can be disrupted, we need to identify the components it depends on to carry out operations. Consider an offensive agent whose operator has tasked it with obtaining restricted information from an organization’s infrastructure. Each component below describes a function within that system. Of course, keep in mind that a single tool may perform several of these functions.

With the components identified, we can examine what happens when a cybernetic guerilla (you) gains influence over them. For each counterattack, follow what you can control and how the agent uses it. The component identifies where the intervention occurs while the failure mechanism explains its effect on regulation. Several components may be involved as the counterattack develops.

The objective defines what the agent is trying to achieve; the reference specifies the condition it uses to judge success. For example, the operator might instruct the agent to obtain a particular restricted document. The agent could use the document’s contents as evidence of completion, or rely on a tool’s report that retrieval succeeded. This distinction matters to the defender: the agent’s judgment of success depends on the evidence it accepts.

[COUNTERATTACK] You can redirect an agent by altering its system instructions (objective and/or reference) . For example, our special-token injection research describes how a vulnerable pipeline can interpret reserved strings as special tokens. This allows content inside a user message or observable content to introduce a forged system-message segment containing a different objective. The resulting mechanism is misdirection: the agent may use its existing capabilities to pursue your instructions! Success depends on how the pipeline handles special tokens and how the model responds to the forged message. Sentry, Special Token Injection Attack Guide.

Sensors. Sensors obtain information about the environment and return it as observations. For example, a scanning tool can report exposed services, while a browser tool supplies page content and HTTP responses. A shell connection may return a login banner or directory listing. These observations help the agent decide where to investigate next. The defender controls some of the material those sensors encounter, including content served by decoy systems.

[COUNTERATTACK] You can influence an agent through the information its tools return. For example, Cloak, Honey, Trap demonstrates server banners containing text designed to trigger an LLM’s safety restrictions. When a hostile agent encounters the banner, the text enters its observations and can cause it to refuse further work. Since you control the banner, you can attempt to trigger a hostile agents guardrails (think strings about CSAM, FBI, Witness Protection, etc. that have a high likelihood to trigger safety guardrails and usually don't get Abliterated). In our model, this is suppression through sensor input: information gathered during the task prevents further action. Success depends on the model and how the surrounding application handles refusal. Ayzenshteyn et al., USENIX Security 2025.

Internal state. Internal state is information retained for use in subsequent decisions. For example, an offensive agent may keep discovered hosts and attempted credentials in memory, alongside notes explaining why an earlier attempt failed. Conversation history and saved context files can carry those findings into later steps or sessions. Their influence depends on retrieval: an incorrect finding can continue to steer the intrusion when the agent loads it again.

Controller. The controller uses the objective and reference, together with observations and internal state, to determine action. In an offensive agent, this includes the model choosing its next tool call and the application rules governing execution. The reasoning capabilities are central to the controller function in AI agents. For example, a failed authentication attempt might lead the model to investigate another service, while a retry limit prevents it from repeating the same attempt indefinitely. An operator’s approval requirement can also constrain what the agent does. The controller therefore spans the model and the software that governs its actions.

[COUNTERATTACK] You may exhaust hostile agents of their tokens! The Deadlock Attack, published at NeurIPS 2025, induced reasoning loops that consumed the evaluated models’ maximum token allowances before they could conclude. That demonstration required a malicious embedding or an implanted backdoor, giving it a different access requirement from ordinary input injection. However, there are ways to pull this off without accessing hostile infrastructure. Check out our LLM Misconfigurations blog post for ideas! Zhang et al., One Token Embedding Is Enough to Deadlock Your Large Reasoning Model.

Actuators. Actuators carry out actions that affect the environment. For example, an HTTP client submits a request to an application, or a shell tool executes a command on a host the agent can access. The resulting effect depends on the target’s behavior and the permissions available. A tool can perform both sensing and actuation: the same HTTP client sends the request and returns the response that informs the next decision.

[COUNTERATTACK] You can target an agent’s ability to install and execute software into a vector to compromise its own environment. For example, NVIDIA researchers demonstrated a malicious Python package introduced through a pull request. While reviewing the proposed changes, Cursor installed the dependencies, causing the package’s installation code to execute a payload that gave the researchers remote access to the machine. Can you think of a way to trick a hostile agent to download something it think it needs or it believes would help them to achieve their objective more effectively?

In our framework, this is misdirection through an actuator: an action intended to support the task produces an unauthorized effect. Applying the idea to a hostile offensive agent would depend on persuading it to install or run defender-controlled software. NVIDIA, From Assistant to Adversary (2025).

Environment. The environment contains the systems and conditions with which the agent interacts. For example, it may include a public application and the services reachable from a compromised account. Access controls determine which actions can succeed, while decoy services offer places where the agent can act without reaching valuable resources. The defender’s ability to shape this environment provides an opportunity to influence what the agent encounters and what its actions accomplish.

A New Cybernetic Counteroffensive

As hostile agents permeate across cyberspace, defenders will need to think about the systems making the attack possible. An agent depends on observations from the infrastructure it explores to decide what to attempt next. That dependence gives the defender an opportunity: the environment the agent is attacking is also a source of information the defender can control. Cybernetic guerrilla defense uses that position to disrupt the agent’s ability to pursue its objective.

The aim is denial and degradation. Denial prevents the agent from continuing useful work; degradation makes its work less effective or more expensive. This means designing responses around the agent’s dependence on its components. A defender can shape what its sensors encounter and whether its actuators obtain a useful result. Effects on the controller or internal state follow when the agent interprets or retains those observations. Disrupting that relationship can make the offensive loop stop working even while the agent remains able to issue requests.

The practical direction is to build defended environments that deliberately frustrate an offensive agent’s regulation. Decoys can give its actuators somewhere unproductive to act, while access controls keep those actions separated from valuable resources. The measure of success is the effect on the intrusion: whether the agent abandons its objective, or spends more effort while achieving less success.

The future worth preparing for is one in which defenders actively shape the environment and consequences an offensive agent depends on, making the infrastructure itself a deathly obstacle to its ability to reason and act effectively.

Further reading

Start with Åström and Murray’s Feedback Systems, chapters 1–2, for the basic control loop.

Ashby’s An Introduction to Cybernetics, chapters 10–12, develops regulation and requisite variety: the relationship between disturbance variety and the regulator’s capacity to counter it.

The Sánchez review connects that foundation to attack research.

For the agent architecture itself, read ReAct.

原文来源:blog.sentry.security