A botnet is a network of compromised computers, controlled remotely by a single attacker, used to launch coordinated attacks, the most common of which is a Distributed Denial of Service (DDoS) attack.

Imagine a bustling city square where everyone is trying to get to the same shop at the same time. A DDoS attack is like having thousands of people, all directed by a single organizer, flood that shop. The shopkeeper can’t serve anyone, legitimate customers are blocked, and the shop effectively grinds to a halt. In the digital world, the "shop" is a website or online service, and the "people" are infected computers (bots) sending an overwhelming amount of traffic.

Here’s how it typically plays out:

  1. Infection: An attacker first infects a large number of computers with malware. This can happen through phishing emails, malicious websites, exploiting software vulnerabilities, or infected downloads. Once infected, the computer becomes a "bot" and secretly joins the attacker’s network.

  2. Command and Control (C2): The attacker, or "botmaster," communicates with the bots through a Command and Control infrastructure. This can be a centralized server, a peer-to-peer network, or even compromised websites. The botmaster sends instructions to the bots, telling them what to do.

  3. Attack Execution: When the botmaster decides to launch a DDoS attack, they instruct all the bots to simultaneously target a specific IP address or domain. The bots then flood the target with a massive volume of requests or malicious data.

  4. Overwhelm: The target server, overwhelmed by the sheer volume of traffic from thousands or millions of sources, cannot process legitimate requests. It exhausts its resources (bandwidth, CPU, memory) and becomes unavailable to its intended users.

There are several common types of DDoS attacks launched by botnets, each exploiting different vulnerabilities:

  • Volume-Based Attacks: These are the most straightforward. The goal is to saturate the target’s bandwidth.

    • UDP Flood: Bots send a massive amount of User Datagram Protocol (UDP) packets to random ports on the target server. The server tries to check for applications listening on those ports, consuming resources and eventually becoming unresponsive.
      • Example: A bot might send a UDP packet to target.com on port 12345. The server checks if an application is listening on 12345, finds none, and discards the packet, but repeats this millions of times per second.
    • ICMP Flood: Similar to UDP flood, but uses Internet Control Message Protocol (ICMP) packets (like "ping" requests). The server tries to respond to each ping, quickly exhausting its outgoing bandwidth.
      • Example: Bots send ICMP echo requests to target.com. The server attempts to send ICMP echo replies, consuming its capacity.
  • Protocol Attacks: These attacks target the underlying network protocols (like TCP) to exhaust server resources.

    • SYN Flood: This exploits the TCP handshake process. Bots send a large number of TCP SYN (synchronize) packets to the target server, initiating a connection. The server responds with a SYN-ACK (synchronize-acknowledge) packet and waits for the final ACK from the client to complete the handshake. However, the bots never send the final ACK, leaving the server with many half-open connections, exhausting its connection table.
      • Example: A bot sends a SYN packet to target.com:80. The server replies with SYN-ACK and waits. The bot, often with a spoofed source IP, never sends the final ACK. This happens millions of times, filling the server’s connection queue.
  • Application Layer Attacks: These are more sophisticated and target specific applications or services running on the server, often mimicking legitimate user traffic.

    • HTTP Flood: Bots send a high volume of seemingly legitimate HTTP GET or POST requests to a web server. These requests might target resource-intensive pages (like search functions or login forms) to maximize the strain on the server.
      • Example: Bots repeatedly request target.com/search?q=verylongquery or target.com/login. The server has to process each request, run database queries, and render the page, consuming CPU and memory.

The key advantage for attackers using botnets is anonymity and scale. Instead of launching an attack from their own IP address, they leverage thousands or millions of other people’s compromised machines. This makes tracing the origin of the attack incredibly difficult and amplifies the attack’s power exponentially.

The infrastructure behind botnets is constantly evolving. Botnets can be rented out to other criminals (Botnet-as-a-Service), and new methods for spreading malware and evading detection are continually developed. The ultimate goal of a DDoS attack is to disrupt service, cause financial loss, damage reputation, or create a diversion for other malicious activities.

Understanding the mechanics of these attacks is the first step in defending against them, and often the next challenge you’ll face is implementing effective traffic filtering and rate limiting on your network infrastructure.

Want structured learning?

Take the full Computer Networking course →