I’m trying something new this week. Instead of just reporting attackers using agentic frameworks like ARTEX and Cairn to attack their targets, we’ll talk about some of the mitigations and controls you can implement to prevent machine-speed attacks from causing widespread damage to your systems.
As a Microsoft employee (at time of writing), I’ll explain how we can protect ourselves from these attacks using Microsoft technologies, and open-source frameworks developed by Microsoft. I’m aware that not everyone uses Microsoft in their organizations and that there are alternatives out there, it’s just that this is my area of expertise and I use these technologies every day, so I can speak on these with authority. If there are any alternatives that you prefer, let me know!
This week’s attacks
We’re slowly starting to see governments wake up to agentic attacks. Thanks to AI, attackers can move at machine speed, and the window of patching, securing, and defending our systems is shrinking. This isn’t new to us.
Hopefully this will drive more investment into agentic security and governance across all industries. I still hold out hope that governments will hold frontier labs to account, but this is all moving quickly. Governments have never been great at reacting to technological advancements (I can’t even imagine trying to explain rogue agents to my MP back in the UK…).
As always, I’m not trying to shame any of the companies involved (maybe just the ones who deserve it), nor do I condone any of the methods used. My goal is to spread awareness of how agents can be exploited, and hopefully trigger a conversation with your teams about protecting your agents and the people who use them.
Here’s some incidents that have happened over the period 23rd November to 29th November 2026.
Switzerland, Italy and the UK confirm intrusions by agentic offensive frameworks
Last week the Swiss, the Italian CSIRT, and British National Cyber Security Centre all confirmed intrusions into company and critical infrastructure by agentic offensive frameworks. Some of the frameworks included our old friend ARTEX, CyberStrikeAI, DeepSeek Harness (Red Team Mode), and PentAGI.
CSIRT Italia have provided a detailed write up of how DeepSeek Harness was used in one attempted attack. DeepSeek Harness is an open-source framework used for running and coordinating multiple AI agents, and it can be configured with a “Red Team Mode” plugin, which uses DeepSeek’s cloud service to orchestrate offensive activities. The framework provides an initial system prompt that can include instructions to hijack the model’s security constraints and appear that actions by the agent are being performed as part of a pentest in a controlled environment.
In their observations, one agent acted as a coordinator responsible for planning and task management, working with five agents with a dedicated role (vulnerability identification, information gathering, persistence etc.). The attacker used the system prompt to start analysing a specific subnet, which the agents would then perform recon on to find assets that could be compromised. Once the assets were discovered, other agents could search for vulnerabilities to exploit those assets. It’s an attack we’ve seen before, and because they can move at machine speed, this allows attacks to be more effective and have a wider blast-radius than traditional attacks.
In this Swiss notice, they described how AI Agents are being used to find and exploit default or easily guessed passwords and known vulnerabilities in internet-facing systems, and in the UK’s notice, they identified how AI Agents were being used to exploit basic vulnerabilities, such as credentials being committed to code repositories, misconfigured infrastructure-as-code, use of default credentials, and weak protections on API endpoints.
Prevention and detection
Preventing and detecting these types of attacks is more about cutting the amount of exposure our applications have and being able to detect them quicker than before. To find out what’s exposed, we can use Defender External Attack Surface Management and Defender for Cloud attack path analysis to show what internet-facing assets we have, and how an attacker could move through various different paths. To prevent developers from deploying public IP’s on management interfaces, we can enforce rules to prevent this via Azure Policy.
Any admin interfaces can be hidden behind Entra Private Access (Global Secure Access) or Entra Application Proxy instead of the open internet. For any patches to workloads running Windows or Linux in Azure VMs, on-prem, or in other clouds (connected by Azure Arc), we can use Azure Update Manager. We can also use Defender Vulnerability Management to prioritize known-exploited vulnerabilities. We can also limit the spread of attacks by segmenting networks and restricting outbound traffic from servers using Azure Firewall.
For our credentials, use managed identities and RBAC roles instead of using keys and connection strings. For any secrets, store them in Key Vault, and only access the Key Vault via RBAC. To prevent secrets from being pushed into public repositories, we can use GitHub Advanced Security secret scanning with push protection, and we can scan infrastructure-as-code with Defender for DevOps.
For detection and response, we can contain attacks using Defender XDR automatic attack disruption to isolate devices and disable users mid-attack. We can watch the behavior of attackers using Microsoft Sentinel analytics and UEBA (user and entity behavior analysis) to observe high-frequency admin API calls, repeated permission checks and bulk data reads. We can set traps for attackers by using Defender for Identity honeytoken accounts, and we can use Azure Front Door WAF bot protection to implement throttling on accounts, not just by IP address.
- Cyberattacks involving AI agents: First confirmed cases in Switzerland: Swiss National Cyber Security Centre
- Use of AI Agents in Automated Compromise Campaigns: CSIRT-ITA
- Familiar weaknesses, exploited faster: defending against agentic cyber attacks: UK National Cyber Security Centre
An attacker points OpenCode at a bank and falls for a decoy key
Jesta, a cybersecurity startup based in Tel Aviv, discovered that a hacker in Romania attempted to hack one of its financial customers using OpenCode, Chrome, and curl. The attack lasted for just over 5 minutes, and they were able to find an access key, however Jesta had planted the key as a decoy inside a fake environment.
The attacker used Chrome in both desktop and mobile modes, and tried to access multiple endpoints using the planted key, no key, and fabricated keys. The OpenCode agent was able to identify valid endpoints, but then attempted to read from an endpoint that only accepted data submissions, resulting in another block. Jesta said that conventional blocklists would not have identified the traffic, and if the key was real, the attackers would have been able to access their systems.
OpenCode wasn’t built for hacking, but there’s nothing stopping you from targeting other websites. This could just be another vibe-hacker trying their luck. One of the disadvantages of AI is that the attackers don’t necessarily need to know what they are doing. They can give an agent instructions, and if you’re not careful, that agent can find vulnerabilities in your systems for attackers to exploit because agents are “just doing their job”.
Prevention and detection
I think Jesta did a good job in preventing any potential attack, however if this was our system, there’s a couple of things we can implement to strengthen our defences.
The agent found the key by following a link in readable API docs. Another way to defend against this is to not publish our API documentation openly. In Azure API Management, we can require sign-in for the APIM developer portal, and list internal APIs in Azure API Center, rather than on public developer documentation. We can make clients use Entra-Issued tokens, which we can check in APIM using the validate-azure-ad-token policy. Any static key would then be rendered useless. We can also use Azure Front Door WAF bot protection to rate limit on API keys and tokens.
If you wanted to replicate Jesta’s trap in APIM, you can issue a decoy subscription key and then implement a policy that routes any request using the decoy key to a fake response, and log it to Sentinel. Then you can write a Sentinel rule for this session’s fingerprints, including information on IP addresses switching between desktop and attacker browser identities, curl requests from the same IP address, links followed that only appear in API documentation, and several keys tried in quick succession.
Amazon ECS MCP Server leaks secrets via prompt injection (CVE-2026-135614)
The folks at AWS have disclosed CVE-2026-135614, which is an issue in the troubleshooting tool of the Amazon ECS MCP server that returned container environment variables and secret references from ECS task definitions without redacting the setting it’s intended to apply. The ECS MCP server lets AI Agents manage and troubleshoot Amazon ECS workloads using the operator’s AWS credentials.
So you can imagine that if a remote attacker was able to influence the agent’s output, they would be able to obtain those values through prompt injection.
While there are no known confirmed-in-the-world exploits, this issue has been addressed in version 0.1.36, which AWS advises its customers to upgrade to, as well as rotating any credentials that may have been stored as plaintext task definition environment variables.
While this is an AWS product, teams building with Azure using the Azure MCP server or troubleshooting agents could potentially make the same mistake, so it’s important to keep in mind what we can do as developers to prevent and detect any threats MCP servers may present to our agents.
Prevention and Detection
Imagine the MCP server is hosted on Azure Container Apps or Azure App Service, instead of accessing secrets in plaintext environment variables, we can use Key Vault references with managed identities to access secrets. Any tool that reads app configuration would see the reference to the secret, rather than its value. If we’re building troubleshooting agents and hosting them in Microsoft Foundry, we can turn on Azure AI Content Safety Prompt Shields to check for documents and tool outputs.
For local coding agents, there’s a product in preview called Defender for Endpoint AI agent runtime which checks tool output for any prompt injection, and can block the attempt. This works with Claude Code, Codex CLI, and GitHub Copilot CLI. However, at the time of writing, blocking happens after a tool has run can’t undo what the tool already did, so keep this in mind.
Using the Agent Governance Toolkit, we can limit which tools the agent can call, watch for drift from the stated task, require approval for sensitive calls, and keep a tamper-evident record. The AGT policy could look like the following:
# Agent OS policy for a container troubleshooting agent.
# Evaluated on every tool call before the tool runs.
apiVersion: governance.toolkit/v1
version: "1.0"
name: troubleshooting-agent-policy
description: Keep a troubleshooting agent on task and away from secrets.
agent: troubleshooting-agent
default_action: deny # Anything not listed below is blocked.
rules:
# Never read secret values directly.
- name: block-secret-reads
stage: pre_tool
condition: "tool_name in ['get_secret_value', 'list_secrets', 'get_key_vault_secret']"
action: deny
priority: 100
# Secret-adjacent calls go to the approval workflow.
- name: approve-secret-adjacent
stage: pre_tool
condition: "tool_name in ['get_task_definition', 'get_container_environment', 'get_app_settings']"
action: require_approval
approvers:
- "platform-security@biotrackr.com"
priority: 50
# Read-only tools the agent needs to troubleshoot a service.
- name: allow-troubleshooting
stage: pre_tool
condition: "tool_name in ['get_service_status', 'list_tasks', 'get_container_logs', 'get_service_events']"
action: allow
priority: 10
Agent OS checks each tool call against that policy before it runs. The tool allow list, declared intent and audit trail are wired up as middleware on the agent itself. Here’s what that looks like with Microsoft Agent Framework (using the AGT 4.x CapabilityGuardMiddleware(allowed_tools=...) signature):
from agent_os.integrations.maf_adapter import (
AuditTrailMiddleware,
CapabilityGuardMiddleware,
)
from agent_os.intent import DriftPolicy, IntentAction, IntentManager
from agent_os.stateless import MemoryBackend
from agentmesh.governance import AuditLog
audit_log = AuditLog()
# Only these tools can be called. Secret readers stay off the list.
# get_task_definition is allowed here, but the policy above sends it for approval.
capability_guard = CapabilityGuardMiddleware(
allowed_tools=[
"get_service_status",
"list_tasks",
"get_container_logs",
"get_service_events",
"get_task_definition",
],
audit_log=audit_log,
agent_id="troubleshooting-agent",
)
# Hash-chained record of what was called and why.
audit_trail = AuditTrailMiddleware(audit_log=audit_log, agent_did="troubleshooting-agent")
# Declare the task up front: "troubleshoot service X".
intents = IntentManager(backend=MemoryBackend())
intent = await intents.declare_intent(
agent_id="troubleshooting-agent",
planned_actions=[
IntentAction(action="get_service_status", params_schema={"service": "checkout-api"}),
IntentAction(action="list_tasks", params_schema={"service": "checkout-api"}),
IntentAction(action="get_container_logs", params_schema={"service": "checkout-api"}),
],
drift_policy=DriftPolicy.SOFT_BLOCK,
ttl_seconds=900,
)
intent = await intents.approve_intent(intent.intent_id)
If a prompt injection convinces the agent to go after credentials, that call is drift from the declared intent. With SOFT_BLOCK, the drift is logged, an alert fires, and the agent’s trust score drops. Switch to HARD_BLOCK if you’d rather deny the call outright.
One limit to keep in mind: AGT decides whether a tool gets called, but it doesn’t redact what the tool returns. If an approved call to get_task_definition hands back plaintext environment variables, the agent still sees them. Redaction has to happen in the tool, which is the exact bug AWS fixed in this CVE.
WebSec Benchmark: search APIs hand malicious content to coding agents
Have you ever performed deep research tasks with AI coding assistants like Claude, GitHub Copilot, and Codex? I use deep research often, particularly when I’m working with technology I haven’t used before, or when I need multiple perspectives on architectural decisions. As part of research tasks, coding agents will perform web searches to find grounded and reliable sources of information. That involves making searches on the public internet, and reading public repositories, including README.md files.
The folks at AIR Research Lab have built the WebSec Benchmark to see how coding agents won’t check for malicious content from the public internet. This has the potential to result in attacks such as prompt injection in pages, typosquatting, hallucinated package names, hijacked expired domains, and manipulative “pipe-to-shell” content. To demonstrate this, they used “SolanaCry”, a GitHub repo with 286 stars, whose README.md file contains a one-liner install for a NetSupport Manager RAT on Windows.
To map this to OWASP, this vulnerability shows how the search results are now a dependency source that the agents act on directly (ASI04), with some poisoned pages carrying instructions for the agent to act on (ASI01). For code repositories and sources that enable agents to run pipe-to-shell commands, this introduces the risk of unexpected code execution (ASI05).
Prevention and detection
Using AGT, we can add a policy rule that denies commands like curl ... | bash and iwr ... | iex. We can route package installs through approved workflows in AGT, and we can make installs of packages go through approved feeds, such as Azure Artifacts upstream sources, to prevent agents from pulling packages from public registries. You can also turn on GitHub dependency review and dependabot to prevent hallucinated or typosquatted packages from being installed.
If you want to place further restrictions on where your agents can connect, this is where you can implement approved domain lists on your sandboxes through Azure Firewall, or use disposable compute options like Azure Container App Dynamic Sessions.
Defender for Endpoint AI agent runtime protection can flag injection hidden in web pages, READMEs and tool output. Prompt Shields can also be implemented to guard against untrusted retrieved web content.
With AGT, we can test our defences using agt red-team scan and the PromptDefense evaluator, which can be wired into your CI pipelines to check them before you deploy your agents. You can implement policies to constrain browsing and package tools, and record what your agents can read and do. This would look like the following:
name: Agent Security Gate
on: [push, pull_request]
jobs:
red-team:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install AGT
run: pip install agent-governance-toolkit[full]
# Grade system prompts against the 12 PromptDefense vectors.
# --strict exits 1 if any prompt scores below the minimum grade.
- name: Scan prompts
run: agt red-team scan ./prompts/ --min-grade B --strict
# Throw prompt injection and tool-chain abuse at the agent.
- name: Run adversarial playbooks
run: |
agt red-team attack --target research-agent --playbook owasp-prompt-injection --threshold 90
agt red-team attack --target research-agent --playbook tool-chain-abuse --threshold 90
- name: Full assessment
run: agt red-team report --prompt-dir ./prompts/ --target research-agent --json -o red-team-report.json
- name: Upload report
uses: actions/upload-artifact@v4
with:
name: red-team-report
path: red-team-report.json
agt red-team scan grades our system prompts against the PromptDefense evaluator’s 12 prompt-injection vectors, and --strict fails the build if any prompt drops below a B. agt red-team attack then runs adversarial playbooks against the agent itself.
To constrain browsing and package tools, we can pair execution rings with CapabilityGuardMiddleware. Agents that browse the web start in Ring 3 (the sandbox ring), where they can search and read, but can’t install packages or run shell commands. Installs go through a separate, approved workflow instead.
from agent_os.integrations.maf_adapter import (
AuditTrailMiddleware,
CapabilityGuardMiddleware,
)
from agentmesh.governance import AuditLog
from hypervisor.models import ExecutionRing
# One hash-chained log shared by both middlewares.
audit_log = AuditLog()
RING_TOOL_POLICIES = {
# Browsing agents: search and read only.
ExecutionRing.RING_3_SANDBOX: CapabilityGuardMiddleware(
allowed_tools=["web_search", "fetch_url", "read_file"],
denied_tools=["install_package", "run_shell", "write_file"],
audit_log=audit_log,
agent_id="research-agent",
),
# Trusted agents can write files, but still can't install or run shell commands.
ExecutionRing.RING_2_STANDARD: CapabilityGuardMiddleware(
allowed_tools=["web_search", "fetch_url", "read_file", "write_file"],
denied_tools=["install_package", "run_shell"],
audit_log=audit_log,
agent_id="research-agent",
),
}
def get_guard_for_agent(eff_score: float) -> CapabilityGuardMiddleware:
ring = ExecutionRing.from_eff_score(eff_score)
# Anything not explicitly mapped falls back to the sandbox ring.
return RING_TOOL_POLICIES.get(ring, RING_TOOL_POLICIES[ExecutionRing.RING_3_SANDBOX])
capability_guard = get_guard_for_agent(eff_score=0.40) # New agent, so Ring 3.
# Records the start, end and outcome of every agent run.
audit_trail = AuditTrailMiddleware(audit_log=audit_log, agent_did="research-agent")
To record what agents read and do, AuditTrailMiddleware writes a hash-chained entry for every agent run, and CapabilityGuardMiddleware writes every tool call and a preview of its result to the same AuditLog. That covers AIR’s advice to log what agents read, not just what they run. If a poisoned README talks an agent into something, we can trace which page it came from.
Keep in mind that the PromptDefense scan only grades the wording of our system prompts. It can’t tell us whether the model will actually ignore a poisoned README. That’s why the ring and tool limits matter: even if an injection lands, an agent in Ring 3 can’t install the package or run the command it’s been told to.
Conclusion
With agentic attacks finally getting the attention they deserve from governments and the general public, hopefully the technical debt of the past will receive more attention. Cybersecurity experts have been warning us for some time that AI was going to make things worse, and we should have been listening to them. Hopefully some of the controls I’ve mentioned in this post will help you and your teams secure your systems and protect them against AI-driven attacks.

If you have any questions, feel free to reach out to me on X @willvelida or on Bluesky.
See you next week for another round of Rogue Agents. Until next time, Happy coding! 🤓🖥️