NadMesh Botnet Exploits Shodan to Hijack AI and MCP Systems

Security researchers have identified a new botnet named NadMesh, which has been rapidly propagating since early July 2026. Unlike traditional worms that spread indiscriminately, NadMesh represents a significant evolution in cyber threats, targeting Artificial Intelligence (AI) and Model Context Protocol (MCP) infrastructures with a highly organized and profit-driven approach.

Developed in the Go programming language, NadMesh integrates autonomous scanning capabilities with over 20 unique exploitation vectors. Central to its operation is the utilization of Shodan, a search engine that indexes internet-connected devices, to identify and prioritize vulnerable AI services. This strategic use of Shodan allows NadMesh to efficiently locate and compromise exposed systems, enhancing its effectiveness and reach.

Targeting AI Services

A key component of NadMesh is its reconnaissance module, known as ai_harvest.py. This script systematically queries the Shodan API to detect exposed AI and automation services, focusing on applications such as ComfyUI, Ollama, n8n, Open WebUI, Langflow, and Gradio. Upon identifying these services, the malware assigns the discovered IP addresses the highest priority in its scanning queue, ensuring swift exploitation.

This method reflects a broader trend in cyber threats, where attackers leverage automated tools to scan for and exploit vulnerable cloud-based services. By relying on Shodan for reconnaissance, NadMesh operators can bypass the inefficiencies of traditional brute-force scanning, directly targeting active AI deployments and optimizing their attack strategies.

Operational Mechanics

NadMesh operates through a structured five-stage process: intelligence gathering, centralized control, autonomous task distribution, polymorphic binary construction, and active delivery. The central controller manages the botnet via ports 80 and 8443, using HMAC-authenticated beacons to communicate with compromised systems. Additionally, it features an advanced web management panel that provides real-time analytics and operational oversight, resembling enterprise-level software more than conventional malware.

Once a system is infected, NadMesh establishes multiple persistence mechanisms, including SSH authorized-key backdoors, hidden binary duplicates, and cron-based watchdog processes. These layers ensure that removing a single component does not eliminate the infection, making remediation efforts more challenging.

The malware actively scans 30 different ports associated with enterprise web services, Kubernetes clusters, database management systems, container APIs, and internal monitoring tools. AI service ports are given particular emphasis, aligning with NadMesh’s focus on compromising AI infrastructures.

The emergence of NadMesh underscores the increasing sophistication of cyber threats targeting AI and MCP infrastructures. Organizations must proactively secure their AI services by implementing robust authentication measures, regularly updating software, and monitoring for unusual activities. The strategic use of tools like Shodan by attackers highlights the need for comprehensive security practices that address both traditional and emerging threat vectors.