Skip to content
nuDefend
← Back to blog

Three ways to bypass an outbound allowlist: the Infrawatch, Docker Sandboxes and Microsoft cases

·12 min read

If you have already configured an outbound allowlist for an AI agent on your server, you have followed what most guides recommend, including ours. But protection does not end with configuring the list. Once the list exists, it becomes a target in its own right. An attacker who encounters it can try to change the approved destination, exploit a mechanism that saves approval but does not enforce it, or bypass the block through another machine on the network. In our analysis, three recently published cases illustrate these approaches. Together, they show the conditions needed for destination restrictions to withstand attempts to bypass them.

What was published

Infrawatch: coding agents redirected to a fake model. On November 23, Infrawatch published an analysis of 128 AI-assisted intrusions and 10,848 services on 8,105 servers running autonomous attack frameworks. According to the report, at least 24 of the attacks targeted another party’s AI infrastructure. In one case, an attacker built a tool to exploit coding agent services left exposed to the internet at scale. The tool used each service’s control interface to redirect the agent to a fake model on the attacker’s server, then opened a session through it. According to Infrawatch, dozens of servers were accessible this way. From that point on, everything the victim’s agent read, wrote or ran passed through the attacker. The attacker collected 77 credentials from the machines before removing the fake provider.

Endor Labs: approved destinations recorded but never checked. On November 30, Peyton Kennedy of Endor Labs published details of CVE-2026-136998 in Docker Sandboxes. In this product, access keys for model providers and GitHub are stored on the host. A proxy server on the host replaces a placeholder value with the real key only in requests to approved destinations. Since version 0.43.0, approval for a third-party agent kit to use a key has been saved in a file alongside the list of domains the user approved. According to the research, this list was written but never read. At request time, the only check was whether approval existed for the service name. The key was sent to any domain declared by the current version of the kit. An update to a kit approved once could therefore redirect the key to the attacker’s server without requesting approval again. According to the research, the same file could also add that server to the sandbox’s allowlist without requesting approval. Kennedy demonstrated the vulnerability using a dummy key and a local test server. Docker fixed it in version 0.55.0.

Microsoft: an internal relay when direct outbound access was blocked. On December 1, Microsoft described an intrusion at an internet service provider that involved rapid activity adapted to conditions on Linux servers. Microsoft said the activity was consistent with AI-assisted orchestration. It linked infrastructure used in the operation to an instance of CyberStrikeAI, but stresses that the evidence does not establish full autonomy. According to the report, about seven minutes after the first recorded command, the attacker had already retrieved subscriber records. Within 13 minutes, the attacker had uploaded PHP shells to three neighboring servers. When two servers could not connect directly to an external destination, the attacker configured a neighboring server with working connectivity as an internal relay and routed the traffic through it. All of this happened within minutes. (The Hacker News coverage presents the telecommunications and payments provider in the report as two separate victims. In Microsoft’s table, it is one organization among the seven additional intrusions.)

Three ways an allowlist fails

In none of these three cases did the attacker “break” the restriction mechanism. In the first, the attacker changed what the mechanism trusted. In the second, the mechanism checked the wrong thing. In the third, the mechanism worked exactly as intended, and the attacker found another route.

When the attacker rewrites the approved destination

The model provider is one of the main destinations a coding agent connects to. According to Infrawatch, after the agent was redirected to the fake model, everything the victim’s agent read, wrote or ran passed through the attacker. In the case Infrawatch describes, the attacker worked through services left exposed to the internet. The attacker used the service’s own control interface to change the address of that trusted destination.

In our analysis, the lesson is that a destination stored in a setting that can be changed through an externally accessible interface, or through the agent itself, is not a security control. This is especially true if the allowlist is derived from the agent’s settings, for example, a rule that allows “the model provider address configured for the agent.” In that case, the change that redirects the agent to the attacker’s server also allows it to connect there. We saw the same failure in a different product with Docker Sandboxes: the file that changes the destination receiving the key is also the file that adds the destination to the sandbox’s allowlist. If whoever controls the tool’s settings also controls its permissions, you have no restriction.

When the approved destination is saved but not checked

In Docker Sandboxes, the list of domains the user approved was written to a file. The approval dialog showed the actual destination, and the default was to deny access. The failure was in enforcement: the check relied on the service name rather than the approved destination. Kennedy tested this in a simple way. He replaced the domain list in the approval with a value unrelated to any kit and got exactly the same leak. The policy log did not help either: according to the research, it recorded the connection to the test server as allowed, without noting that a key had been injected into it.

This raises a question worth asking about any mechanism that restricts outbound traffic: at connection time, exactly what is compared with what? If the answer is not “the actual connection destination against the list I approved,” but instead a service name, process name, label or previously saved approval, it is not an allowlist. Because the logs of such a mechanism show everything as “allowed” and normal, the only way to know is to test it: try to reach a destination that is not on the list and confirm that the attempt fails.

When traffic takes a detour through a neighboring server

In the intrusion Microsoft described, the block worked: two servers could not connect directly to the external destination. The attacker treated that failure as another result to work with. The attacker found a neighboring server with different connectivity, configured a relay on it and routed the blocked servers through it. According to Microsoft, the executables connected to local listeners rather than public addresses. Threat hunting focused only on processes that connect directly to the internet could therefore miss the activity. Microsoft also explicitly states that blocking direct outbound access is not enough on its own. It recommends alerts when a server starts forwarding traffic for its neighbors, opens unexpected listeners or rapidly scans the internal network.

This is not an isolated case. In Infrawatch’s report, seven of the intrusions in which attack framework traffic reached victims passed through a compromised computer used as a pivot.

The gap here comes from rule design. Outbound rules are usually written with the internet in mind, while the internal network is considered “inside.” A common rule such as “allow access to all of 10.0.0.0/8” permits exactly the route the attacker used. From each server’s perspective, a neighboring server is a destination like any other. As in the case Microsoft described, a neighboring server running a relay with outbound access can provide an internet exit route for blocked servers.

Three conditions

The three cases show that destination restrictions hold only when three conditions are met:

  1. The tool cannot change the list. The list is stored outside the tool’s settings, and the tool has no permission to change it. The tool’s control interface should not be externally accessible either.
  2. The restriction checks the actual destination. For every connection, the destination is compared with the approved list. The check does not rely on a service name or previously saved approval.
  3. The restriction also covers the internal network. Neighboring servers are destinations in their own right. A new listening port or traffic forwarding on a server is an event you need to see.

Checks you can run today

Externally accessible control interfaces. List all listeners that are not bound to localhost, and identify coding agents, MCP servers and AI gateways among them:

sudo ss -Hltnp | grep -vE '127.0.0.1|::1'

An agent process listening on 0.0.0.0 or [::] needs investigation: does its control interface allow changes to the model provider?

Who can change the destination. Check who owns the agent’s configuration file and whether the user running the agent can write to it:

stat -c '%U:%G %a %n' /path/to/agent-config
sudo -u <agent-user> test -w /path/to/agent-config && echo writable

Actual destinations versus configuration. Compare the destinations the agent is connected to with its configured model provider address:

sudo ss -Htnp state established | grep 'pid=<PID>,'
getent ahosts <model-provider-host>

Docker Sandboxes. Make sure version 0.55.0 or later is installed on every machine. Until then, Endor Labs recommends opening ~/.config/sbx/credentials.yaml and removing any approval granted to a third-party kit. It also recommends checking the domains where keys are injected and the permissions.network.allow entries every time you run sbx create, not just the first time; pinning kits to a specific commit where possible; storing keys at sandbox scope using --sandbox; and rotating access keys if you approved a kit that has since changed.

An active test of the rule. From the agent’s user account, try to reach a destination that is not on the list using both address families, and a neighboring server on the internal network:

sudo -u <agent-user> curl -4 -sS -m 5 -o /dev/null https://example.org
sudo -u <agent-user> curl -6 -sS -m 5 -o /dev/null https://example.org
sudo -u <agent-user> curl -sS -m 5 -o /dev/null http://<peer-internal-ip>:<port>/

All three attempts should fail.

A blanket exemption for the internal network. Look for rules that allow entire private address ranges:

sudo nft list ruleset | grep -nE '10.0.0.0/8|172.16.0.0/12|192.168.0.0/16'
sudo iptables -S OUTPUT
sudo ip6tables -S OUTPUT

Instead of exempting an entire range from the restriction, allow access only to the neighboring servers and ports the server needs, such as the database or backup server.

Traffic forwarding. Check whether the server is forwarding packets:

sysctl net.ipv4.ip_forward net.ipv6.conf.all.forwarding

On a server running Docker, a value of 1 is expected. On a regular application server, it needs investigation. Note that a relay can also run as an ordinary process that listens and forwards connections without changing this setting. That is why checking listeners matters too.

A listener baseline. Save the listener list and compare the current state against it periodically:

sudo ss -Hltnup | awk '{print $1, $5}' | sort -u > /root/listen.baseline
sudo ss -Hltnup | awk '{print $1, $5}' | sort -u | diff /root/listen.baseline -

Unexpected internal connections. List active connections to private addresses, and check whether each process is supposed to communicate with the neighboring server it is connected to:

sudo ss -Htnp state established '( dst 10.0.0.0/8 or dst 172.16.0.0/12 or dst 192.168.0.0/16 )'

Persistence. Microsoft also recommends monitoring changes to authorized_keys, sudoers and crontab. A relay configured within minutes can also remain on the server.

How nuDefend helps

You set the list, not the tool’s configuration. For each AI tool on the server, nuDefend separately records the destinations it connects to, how much traffic was sent to each destination and when the destination was first detected. After a monitoring period, you approve the destinations the tool needs on the Outbound screen. Once the restriction is enabled, the tool can connect only to those destinations. Every attempt to connect elsewhere is blocked before traffic leaves the server. The restriction applies only to the tool you selected, and the rest of the server continues to operate as usual.

The actual destination, on every connection. The decision is based on the destination the tool connects to. When you approve a destination by hostname, nuDefend resolves it to addresses and updates them periodically. An address serving multiple services is not approved automatically; it is flagged for your review. DNS is the second layer: a restricted tool can look up only the names you approved. Approval applies to the exact name, not its subdomains. Every blocked lookup is shown alongside the tool’s name.

Tools, interfaces and ports. nudefend workloads shows the AI tools running on the server, including agent platforms and MCP servers, on the host or inside a container. It also shows tools that do not listen for connections and only make outbound connections. nudefend expose shows every service listening on the server and its accessibility status: local only, private network only, blocked by a local rule, externally accessible or published from a container. This list can reveal an agent’s control interface left externally accessible or a new listener. nuDefend compares the current state with the baseline and alerts you when a service that was not externally accessible becomes accessible. To close such a port, nudefend block add <port> first shows exactly what will be blocked and changes nothing until you approve.

Known threats in both directions. A cryptographically signed threat list, updated every 30 minutes, blocks traffic to and from known malicious addresses in the kernel firewall. At the DNS layer, dangerous domains are neutralized system-wide. If a process on the server tries to contact a malicious address, the blocked outbound traffic card on the dashboard turns red.

More details are available on the outbound traffic page, the exposure page, the access blocking page and in the documentation.

The bottom line

Infrawatch documented an attacker who used the control interface of exposed coding agents to redirect them to a fake model, collecting 77 credentials. Endor Labs showed that Docker Sandboxes saved the domains the user approved but did not check them. An update to a kit could therefore send a real access key to an outside server. Microsoft described an attacker who encountered a block on direct outbound access and configured a relay through a neighboring server within minutes. An allowlist that withstands all three cases is stored outside the tool’s control, checks the actual destination of every connection and treats neighboring servers and new listening ports like any other destination. Run the checks above today, especially the attempt to reach a destination you have not approved.

nuDefend shows where the AI tools on your server connect and lets you restrict a tool to destinations you have approved. Every attempt to connect elsewhere is blocked before traffic leaves the server.

Check outbound traffic.

Ready to protect your servers with nuDefend?