---
title: "Botnet Architecture: Four Layers from Infection to Attack"
description: "A botnet is a fleet of compromised devices organized in four layers: recruitment, persistence, command and control, and attack execution. This diagram maps how the layers connect and where defenses break the chain."
---

# Botnet Architecture: Four Layers from Infection to Attack

**Type:** [Architecture](https://yomu.fyi/visual-explainers/category/architecture.md)

![A layered botnet architecture diagram with four stacked panels labeled Recruit, Persist, Command, and Strike, downward arrows linking them, and a right-side defense boundary listing bot management, WAF, egress filtering, and rate limiting.](https://yomufyi.s3.us-east-1.amazonaws.com/visual-explainers/2022bf78-5eb6-4bb8-a859-e4aea9fcc81a/image-88c6e52e-3e80-4d83-9747-0af19b1c4107.webp)

> A botnet is a fleet of compromised devices organized in four layers: recruitment, persistence, command and control, and attack execution. This diagram maps how the layers connect and where defenses break the chain.

## Explanation

A botnet is a network of compromised devices—routers, servers, browsers, and developer tools—controlled by an operator to launch attacks at scale. Its architecture has four layers: recruitment, where malware or weak credentials add nodes; persistence, where scheduled tasks, launch agents, or injected SSH keys keep them; command and control, where beacons and reverse tunnels deliver orders; and execution, where the fleet fires DDoS floods such as DNS amplification and short UDP bursts. Each layer is a place to intervene, so defenders who understand the stack can break the chain instead of chasing individual attacks.

## FAQ

### Where in a botnet's architecture is the best place to break the chain?

Persistence and command-and-control usually offer the highest leverage. Removing an injected SSH key or scheduled task evicts the node, and blocking the beacon or reverse tunnel severs the operator's control. Recruitment is hardest to close because new devices keep arriving.

### Why did hyper-volumetric DDoS attacks drop while short bursts rose?

Law enforcement dismantled four major IoT botnets in 2026, removing the large fleets needed for terabit floods. Remaining operators shifted to short, low-bandwidth bursts under 10 minutes and 1 Gbps, which surged 208% and are harder to tell apart from normal traffic.

### How do compromised developer tools fit into a botnet?

A malicious extension can add an attacker SSH key, install a launch agent or scheduled task, and open a reverse tunnel to a beacon endpoint. That yields a persistent, remotely commanded node inside a trusted environment, useful for lateral movement as well as DDoS.

**Tags:** [Backdoors](https://yomu.fyi/topic/backdoors.md), [Bot Management](https://yomu.fyi/topic/bot-management.md), [Botnet](https://yomu.fyi/topic/botnet.md), [DDoS](https://yomu.fyi/topic/ddos.md), [Malware](https://yomu.fyi/topic/malware.md), [Threat Intelligence](https://yomu.fyi/topic/threat-intelligence.md)

## Related reading

### [4 real? Tracking exploitation and patching of eMudhra’s weak keys](https://yomu.fyi/post/4-real-tracking-exploitation-and-patching-of-emudhra-s-weak-keys.md)
- Company: [Cloudflare](https://yomu.fyi/company/cloudflare.md)
- Author: Bas Westerbaan
- Published: Oct 30, 2026
- Type: Incident / postmortem

eMudhra’s eight shockingly weak intermediate private keys, including the number 4, could be recovered instantly from public certificates, allowing anyone to forge certificates for any domain. Cloudflare patched high-impact systems within hours on October 19, 2026, using Pingora to reject the vulnerable keys and AI-assisted code analysis to identify all affected systems. By October 21, logging detected about 22,000 handshakes with the weak keys, with two-thirds being test site fetches and most of the rest appearing to be servers using the weak intermediate themselves. About 160 handshakes involved forged certificates naming other organizations’ domains, including consumer IoT domains, with one forged certificate dated less than an hour after the weakness became public. Cloudflare’s challenge page probes show that while modern browsers are mostly patched, bots, old browsers, and embedded browsers like Android WebView still accept the compromised chain, with over half of probes on large networks still vulnerable.


### [Cloudflare services for private origins is now generally available](https://yomu.fyi/post/cloudflare-services-for-private-origins-is-now-generally-available.md)
- Company: [Cloudflare](https://yomu.fyi/company/cloudflare.md)
- Author: Enrique Somoza
- Published: Oct 30, 2026
- Type: Announcement

Cloudflare has announced general availability of its application services for private origins, allowing customers to apply WAF, caching, bot management, and Workers to origins with private IP addresses. The feature works by pointing a proxied DNS record at a private IP; Cloudflare routes traffic over existing Cloudflare One connections such as IPsec, GRE, or Cloudflare Tunnel instead of the public Internet. Private routing is automatically enabled for RFC 1918, CGNAT, and unique local IPv6 addresses, and the setting cannot be disabled for those ranges. Limitations include lack of support for Argo Smart Routing and Aegis, and origin health checks require Load Balancing. Cloudflare is also working on private-to-private traffic, targeting a closed beta in early 2027, to extend the same protections to internal network traffic.


### [Security notice — malicious version of Anthropic.claude-code (2.1.313) identified in the Cursor Extension Marketplace](https://yomu.fyi/post/security-notice-malicious-version-of-anthropic-claude-code-2-1-313-ide.md)
- Company: [Cursor](https://yomu.fyi/company/cursor.md)
- Author: Cursor
- Published: Oct 30, 2026
- Type: Incident / postmortem

A malicious version of Anthropic.claude-code (2.1.313) was distributed in the Cursor VS Code extension Marketplace for about 11 hours on October 29, 2026, affecting up to 5,000 users. The extension collects host and user information, adds an attacker-controlled SSH key, attempts to enable SSH service, opens a reverse tunnel, installs persistence via a LaunchAgent on macOS or a scheduled task on Windows, and reports host details via HTTP POST to a beacon endpoint. Due to errors in the malicious code, the SSH service enablement fails on most systems without administrator privileges, but the key addition and persistence mechanisms still execute. Cursor removed the malicious version, audited the marketplace, rotated keys, and worked with the hosting provider to take the attacker’s server offline. Affected users should check for the unauthorized SSH key labeled svc-telemetry, run the provided remediation scripts, and rotate credentials from a trusted system.


### [Cloudflare DDoS Threat Report 2026 Q3: More swarms, fewer giants](https://yomu.fyi/post/cloudflare-ddos-threat-report-2026-q3-more-swarms-fewer-giants.md)
- Company: [Cloudflare](https://yomu.fyi/company/cloudflare.md)
- Author: Cloudforce One
- Published: Oct 29, 2026
- Type: Incident / postmortem

Cloudflare mitigated 18.2 million network-layer DDoS attacks and 14.4 trillion HTTP DDoS requests in Q3 2026, averaging 8,226 attacks per hour. Short-burst, low-bandwidth attacks under 10 minutes and 1 Gbps surged 208%, while hyper-volumetric attacks exceeding 1 Tbps dropped nearly 69% from Q2. The decline in large attacks coincided with law enforcement actions that dismantled four major IoT botnets earlier in 2026, though new variants like Dysphoria and Evooo1Bot continue to emerge. Attackers abandoned CLDAP floods, which collapsed 99.5%, and pivoted to DNS amplification and UDP floods, which rose 215% and 122% respectively. The United States became the most-attacked country, while Canada and Israel climbed sharply in the rankings amid geopolitical tensions and domestic events.
