Skip to content
nuDefend
← Back to blog

Cairn and BabidiGhost: attack agents succeeded only where an internal service was accessible from the internet

·17 min read

Linux servers used for data or model workloads can accumulate services that were never intended to be public: Redis used as a cache, a vector database such as Qdrant, a Metabase dashboard set up for a team, a labeling server such as MONAI Label, or a storage server’s management interface. They were set up “for internal use,” so passwords, updates and firewall restrictions were not always configured. On November 20, AWS and SOCRadar published two reports on AI-based attack agents that worked continuously for hours and days against different targets. Comparing the results reveals a common pattern: the agents succeeded where a service intended for internal use was accessible from the internet. They failed against address allowlists, two-factor authentication and an SSH server where none of the passwords they guessed allowed them in. What happened after some of the breaches also deserves attention: in some cases, a compromised server became part of the attacker’s infrastructure.

What was published

Cairn, according to AWS. Amazon Threat Intelligence describes a campaign by an actor it links to China with moderate confidence. The operator gave AI agents a simple goal, “obtain shell access,” and a list of IP addresses belonging to universities in East Asia outside mainland China. From there, the agents planned, acted and changed their approach without the operator choosing each step. The tool, Cairn, is an open-source framework for autonomous penetration testing, built for defensive use. AWS discovered the campaign on September 10, 2026, because the operator had left their Cairn instance accessible from the internet without authentication, including its settings, prompts and output. The activity lasted about 48 hours, starting on September 8. According to AWS, Gambit Security documented a separate, financially motivated actor using the same framework against online stores.

The MONAI Label vulnerability. One target ran an open-source AI application for medical imaging. According to AWS, the agents found a previously unknown path traversal vulnerability in it. In about 11 minutes, they went from mapping the API to writing arbitrary files on the server. The project’s security advisory, published on November 18 and rated critical, describes the problem: the upload endpoints in MONAI Label’s datastore do not check that the path constructed from input stays within the datastore directory. This allows writes anywhere the process has permission to write. According to the advisory, this could lead to remote code execution. Versions 0.8.5 and earlier are affected. Authentication is disabled by default, and in that configuration, any client that can reach the server over the network can exploit the vulnerability. Even with authentication enabled, the ANNOTATOR role is sufficient. BleepingComputer reported that a security update was released on November 18, but the advisory states that no patched version is available yet: the fix has been merged and will be included in the next release.

BabidiGhost, according to SOCRadar. SOCRadar describes a French-speaking operator with limited technical skills who used a jailbroken AI agent for nine days in November 2026 against banks, insurers, payment providers and local authorities in Europe. The operator typed 1,801 plain-language instructions, and the agent wrote the scanners, exploit code and data exfiltration scripts. The agent attacked more than 50 organizations and data repositories. Of the 14 organizations analyzed in depth, two were breached, three were partially breached, four withstood the attacks, and five were subject only to reconnaissance. According to SOCRadar, no zero-day vulnerabilities were used. Here, too, the attacker was exposed by an open service of their own: their staging server made its home directory publicly accessible, including all prompts, shell history, a Telegram bot token and about 10GB of stolen data.

Results: what held and what failed

Target (source) What the agent could access What happened Outcome
Redis at a university (AWS) Redis allowing unauthenticated access, and a Qdrant instance on the same system Redis takeover techniques failed; SSRF in Qdrant was used to map the internal Docker network; password guessing against PostgreSQL and SSH failed No breach after about 16 hours and 148 actions
GPU server and other university systems (AWS) SSH on the GPU server, plus an administration dashboard, storage appliance, VPN server and portal on other systems in the network More than 30,000 username and password combinations were tested against the GPU server and the other systems No login attempt succeeded
Medical imaging application (AWS and the security advisory) MONAI Label, which has authentication disabled by default A previously unknown path traversal vulnerability File writes within about 11 minutes, followed by a shell running as root
Insurer (SOCRadar) Outdated Metabase, vulnerable to CVE-2023-38646 Cloud database credentials were read from the container’s environment variables The customer database was exported
IT provider for local authorities (SOCRadar) A storage server’s management interface A weak administrator password 23 archives, about 8.6GB, from more than 13 local authorities and 10 other public bodies
Bank (SOCRadar) 49 hostnames found during reconnaissance An IP address allowlist None were reachable
Payment provider (SOCRadar) A merchant portal with TOTP 11 scripts to break the second factor None succeeded

In the successful breaches in the table, the entry points were an analytics dashboard, a storage management interface and a labeling server. SOCRadar summarizes the case it investigated this way: every confirmed breach began with an exposure the victim could have found before the attacker, and every failed attempt was stopped by a standard security control already in place. The controls that stopped the agents were neither new nor expensive.

The zero-day is the headline. Exposure is the issue

The AWS report can be read as a story about an agent finding an unknown vulnerability on its own. That is accurate and concerning, but less useful to a server administrator. The way the service was deployed made it possible to turn the MONAI Label vulnerability into a breach. According to the advisory, anyone who can reach the server can exploit it in its default configuration. Two of the recommended mitigations until a patched version is released are to keep the server off untrusted networks and run it as an unprivileged user that can write only to the datastore directory. A MONAI Label server listening only on an internal network is not reachable by an agent given a list of public addresses. Had the server been running as a restricted user, the breach would not have ended with a root shell.

The picture in SOCRadar’s report is clearer still, because no zero-day vulnerability was used. The breach that yielded what SOCRadar describes as the richest data went through an outdated, internet-accessible Metabase instance with a vulnerability from 2023. From there, according to SOCRadar, the agent used the dashboard’s own database connection to run commands on the server. It read the cloud database credentials from the container’s environment variables and exported every table it could see. Before leaving, it placed a trigger in the database that relaunched its tool with every new record. The largest data theft by volume required less: an internet-accessible storage management interface with a weak administrator password. One password gave access to data belonging to all of the IT provider’s customers.

The agents’ failures are also instructive. According to AWS, the university’s open Redis instance withstood 16 hours of takeover attempts using known techniques. Through an SSRF vulnerability in Qdrant, the agents mapped the internal Docker network, then tried passwords against PostgreSQL, SSH and other services. Every additional internal service accessible from outside is another service for the agent to test, and another chance for one of those tests to succeed. SOCRadar’s recommendation applies here too: treat anything accessible without authentication as though it has already been indexed.

An agent does not get tired, so controls cannot depend on fatigue

Persistence stands out in both reports. About 16 hours and 148 consecutive actions against one Redis instance. More than six hours against a GPU server, using a list of about 80 real usernames assembled from faculty websites, lab pages, archived pages and academic papers. More than 30,000 combinations were tested against the server and other university systems. In SOCRadar’s report: 11 scripts against TOTP-based two-factor authentication, and more than 180 scripts against a cryptocurrency exchange. AWS notes that the agents worked without breaks, without sleep and without limiting themselves to business hours.

A security control that assumes the attacker will give up is ineffective against this kind of activity. The controls that worked in both reports relied on clear conditions: the address is on the allowlist or it is not; the TOTP code is correct or it is not; the password is on the attacker’s list or it is not. According to SOCRadar, at the most hardened bank, the agent found 49 hostnames but could not reach any of them because access to all of them was restricted by an IP address allowlist. Knowing they existed did not help.

There is also a time constraint. AWS writes that an agent that finds and exploits a zero-day vulnerability within minutes finishes before many SOC teams can manually review an alert. Someone managing a server alone has no SOC at all. The important work therefore happens before the agent arrives: find the internal services accessible from outside and close off access to them.

After the breach: your server becomes the attacker’s infrastructure

Both reports describe compromised servers used by the attacker: AWS infers that one compromised server served as a tunnel, while SOCRadar describes a compromised server used for staging.

According to AWS, after gaining the ability to write files, the agents executed code through a file Python loads automatically at startup (sitecustomize.py) and obtained a reverse shell running as root. In another session, the operator gave the agents a proxy leading to a second university’s network. The server the proxy connected to ran the same vulnerable software. AWS infers that the operator exploited the vulnerability to compromise that server and establish the tunnel through it. From there, the agents were instructed to attack more machines on the same network. Under this interpretation by AWS, one compromised server served as a tunnel into another network.

In SOCRadar’s report, BabidiGhost’s staging server was itself a compromised server: a server belonging to a small business in France that the attacker had taken over. The command history begins with a legitimate administrator restoring an auto parts catalog. Midway through the history, a command launches the attacker’s agent framework. From that point, the server served several roles at once: an open directory and staging on port 8889, delivery of stolen data on port 8890, and a listener contacted by tools planted on victims’ systems (C2) on port 8443. The agent continuously called the model provider’s API and, according to SOCRadar, sent it 5,779 requests over nine days. The stolen data was transferred through the Telegram bot API and a file transfer service.

Two details in SOCRadar’s report show why monitoring outbound traffic matters. First, the activity stopped when the attacker’s API key for the model provider was revoked on November 14. Tools already planted on victims’ systems continued contacting the attacker’s infrastructure for about another day. Second, SOCRadar recommends monitoring traffic to model provider APIs and the Telegram bot API. It notes that a server contacting them continuously without a business need is a strong warning sign, and that cutting off this traffic stops the agent.

For anyone managing their own server, there are two important points here. A data or ML server almost never needs to open connections to every address on the internet, so it is worth checking every new destination such a process connects to. It is also important to know which AI tools are running on the server: on the server in France, according to SOCRadar, the command history shows the legitimate administrator’s work followed by the launch of the attacker’s agent framework.

Find the “internal” services accessible from outside

  • List listening services: sudo ss -ltnp. Look for services listening on 0.0.0.0, * or [::]. Redis, vector databases, analytics dashboards, labeling servers and management interfaces should listen on 127.0.0.1 or a private address.
  • Ports published by containers: docker ps --format '{{.Names}}\t{{.Ports}}' | grep -E '0\.0\.0\.0|\[::\]'. A port published this way is accessible through every interface, and in many installations, ufw rules do not apply to it. If only the machine itself needs the service, publish it on 127.0.0.1, for example -p 127.0.0.1:6333:6333.
  • Test from outside: Use another machine to check that the ports you closed no longer respond. Account for your cloud provider’s firewall as well.

Redis and Qdrant

  • In Redis, restrict the listening addresses and enable authentication:
# /etc/redis/redis.conf
bind 127.0.0.1 -::1
protected-mode yes
# Also configure ACL users or requirepass
  • In Qdrant, configure an API key and do not publish the port externally. According to AWS, the agents used an SSRF vulnerability in a Qdrant instance running alongside Redis to map the internal Docker network.

MONAI Label

  • Check the version in the environment where it is installed: pip show monailabel | grep -i '^version'. According to the advisory, versions 0.8.5 and earlier are affected, and no patched version is available yet.
  • Apply the temporary mitigations in the advisory: Enable authentication (MONAI_LABEL_AUTH_ENABLE=True), do not assign the ANNOTATOR role to untrusted users, do not expose the server to untrusted networks, and run it as an unprivileged user that can write only to the datastore directory.
  • In systemd, you can enforce the last two restrictions. Run sudo systemctl edit <monailabel-service> and add:
[Service]
User=monailabel
ProtectSystem=strict
ProtectHome=yes
ReadWritePaths=/srv/monailabel
IPAddressDeny=any
IPAddressAllow=localhost <client-subnet>

Adjust ReadWritePaths to the directories the service actually needs, including model and cache directories. The IPAddressDeny restriction applies to traffic in both directions and to every process the service starts. IPAddressAllow must therefore include the network users connect from and every additional destination the service needs.

  • Look for signs of suspicious file writes. The advisory mentions overwriting application code, adding keys to authorized_keys and using cron. AWS describes the use of sitecustomize.py:
sudo find / -xdev -name 'sitecustomize.py' -mtime -90 2>/dev/null
sudo find /root/.ssh /home/*/.ssh /etc/cron* /var/spool/cron -type f -mtime -30 2>/dev/null

Metabase and similar dashboards

  • Update the dashboard and close off internet access: allow access through a VPN or an address allowlist.
  • According to SOCRadar, a web application process should not be able to read a database superuser password. To see the names of sensitive environment variables in the container without displaying their values: docker inspect --format '{{range .Config.Env}}{{println .}}{{end}}' <container> | cut -d= -f1 | grep -Ei 'pass|key|token|secret'.

Management interfaces and SSH

  • Allow access to storage, hypervisor or other management interfaces only through a VPN or allowlist, and with a strong password and MFA.
  • For SSH, verify that password authentication is not accepted at all: sudo sshd -T | grep -Ei '^(passwordauthentication|kbdinteractiveauthentication)'. Both values should be no.

Outbound traffic and services you did not start

  • Which processes connect where: sudo ss -tnp state established | awk 'NR>1 {print $4, $5}' | sort | uniq -c | sort -rn | head -30. Review the processes and destinations, and check whether each connection is needed.
  • Model providers and Telegram: If you have DNS or proxy logs, search for requests to api.telegram.org and model providers from servers that have no need to contact them, as SOCRadar recommends.
  • File servers and frameworks you did not start: ps -eo pid,user,args | grep -E '[h]ttp\.server|[S]impleHTTP', and review recently started processes: ps -eo pid,user,lstart,args --sort=start_time | tail -30.

Indicators

AWS published the addresses 142[.]4.98.145 and 142[.]4.107.34 (logs from September 8 to 10). SOCRadar published 45.92.111[.]116 and 45.92.110[.]53, and recommends searching logs from November 5 to 17:

sudo zgrep -hE '142\.4\.98\.145|142\.4\.107\.34|45\.92\.111\.116|45\.92\.110\.53' /var/log/nginx/access.log* /var/log/auth.log* 2>/dev/null | head

Addresses change quickly, and you may no longer have logs from September. The checks above matter more than this search.

How nuDefend helps

What is accessible from outside, including in containers. nudefend expose shows every service listening on the server and who can reach it, from the server’s own perspective: local only, on a private network, blocked by a local rule, accessible from outside, or listening inside a container and published to the host. An externally accessible service that is unexpected on its listening port is flagged for review. This keeps SSH on 22 from obscuring an exposed database. nuDefend continuously checks which services are accessible from outside and alerts you when a previously internal service becomes accessible. Examples include a database that switches from listening on localhost to an external interface, or a container that publishes a port by mistake. The first check establishes the baseline for comparison, so alerts focus on changes.

Close off access without editing configuration files. You can close off access to a service that should not be reachable through the dashboard or with nudefend block add <port>, without restarting services. Before each change, you see exactly what will be blocked. You cannot block the connection you are using to access the server or access to the dashboard. Every block is logged, persists across reboots and can be undone with a click.

Which AI tools are running on the server, including those that do not listen for connections. nudefend workloads shows the AI tools running on the server, on the host or inside a container: model servers, chat interfaces, vector databases, automation tools, agent platforms and MCP servers. It also detects tools that do not listen for connections and only make outbound requests, such as an agent carrying out a task. Each tool is shown alongside the information used to identify it. The list of recognized tools updates automatically.

Where tools connect, and how to restrict them to destinations you approve. nuDefend records the destinations each AI tool on the server connects to, how much traffic it sends to each destination and when that destination was first detected. Recognized destinations are shown by name and type of activity, such as a model service carrying requests and responses. Unrecognized destinations are marked as such. On the Outbound screen, you approve the destinations the tool needs. 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. A restricted tool can resolve only addresses you have approved.

Password guessing. nuDefend reads login logs for SSH, mail services, FTP and the login pages of WordPress, phpMyAdmin, Joomla and Drupal. For SSH, an address with six failed attempts within 10 minutes is blocked at the firewall. Repeated blocks within the same day increase in duration, up to 24 hours.

The threat layer, in both directions. A cryptographically signed threat list, updated every 30 minutes, blocks traffic to and from known malicious addresses at the kernel firewall. The list includes active scanners, sources of password guessing and botnet command-and-control servers. 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. This may provide an early warning.

Who can reach the server. In the country-blocking allowlist mode, only connections from countries you select can reach the server. This is a quick way to restrict access to the server in advance, and it is included with every license. All reports remain on the server.

For more details, see the exposure page, the outbound traffic page, the access blocking page and the documentation.

Bottom line

An agent’s ability to find an unknown vulnerability on its own is impressive, but the results in both reports point to a simpler pattern. The agents succeeded through Metabase, MONAI Label and a storage management interface. They failed against allowlists, MFA and passwords they could not guess, even after hours of attempts. After a breach, the server was used to run a root shell or as the attacker’s staging and C2 server, and, according to AWS’s inference, as a tunnel into a second network. Find your externally accessible “internal” services today, close off access to them, and define in advance where the server and its AI tools are allowed to connect.

nuDefend shows every service listening on the server and who can reach it, including services in containers, and alerts you when a previously internal service becomes accessible from outside.

See what is accessible.

Ready to protect your servers with nuDefend?