Malware & ransomware

How to Prevent Botnet Attacks: Protect Your Devices and Network

A botnet is a network of infected devices controlled by criminals. Here is how to keep your devices out of one, and how to stop your network being used in an attack.

Cysoro Security TeamPublished · 8 min read
BOT MALWARE & RANSOMWARE Stop thebotnet Patch. Change passwords. Segment.
Quick answer

Prevent botnet attacks by changing every default password to a long unique one, updating router and device firmware, disabling UPnP and remote admin access you do not need, segmenting smart devices onto their own network, and keeping antivirus and email filtering up to date. If a device is infected, disconnect it, reboot it while offline, change its password, and only then reconnect it.

Key takeaways

  • Most botnets recruit devices through default passwords and unpatched firmware, not clever hacking.
  • Your router, cameras, and smart devices are the usual entry points, and they can be infected without you noticing.
  • Segmenting smart devices and monitoring traffic stops one infected device from becoming a network-wide problem.

A botnet is not one hacker's computer. It is thousands — sometimes hundreds of thousands — of ordinary devices, from home routers to security cameras, all infected and controlled together. Your devices could be part of one right now without you noticing.

What is a botnet attack?

A botnet is a network of compromised devices controlled remotely by an attacker. Each infected device is called a bot, and the attacker sends commands to all of them at once through command-and-control servers.

Botnets are used for distributed denial-of-service (DDoS) attacks, spam, credential stuffing, cryptomining, and as a stepping stone to ransomware. In a DDoS attack, the bots flood a target with traffic until real users cannot reach it. CISA defines a denial-of-service condition as one where legitimate users cannot access systems or network resources because an attacker floods them with traffic.

The uncomfortable part is that the owners of the infected devices are victims too. Their devices do the attacker's work, use their bandwidth, and can get their IP address blocked, while the attacker stays hidden behind the crowd.

How a botnet attack worksAttackercommand andcontrol serverInfected routerInfected cameraInfected computerInfected smart TVTarget websiteflooded with trafficreal users locked outOne command reaches every infected device at once.
One attacker, thousands of infected devices, one flooded target. Illustration by Cysoro.

How do devices get recruited into a botnet?

Most devices join a botnet through a short list of well-known weaknesses: a default password, unpatched firmware, or a phishing email. Attackers scan the internet constantly for devices with these gaps, and the scan is automated, so no human needs to pick your device.

The Mirai botnet showed how simple this is. Mirai scanned for internet-connected devices and tried a list of just 62 common default usernames and passwords. That short list was enough to infect hundreds of thousands of devices, because so many routers, cameras, and recorders still used factory credentials, according to CISA.

Computers join botnets differently, usually through phishing emails with malicious attachments or links. Qakbot, for example, spread mainly through spam emails, and the FBI later identified more than 700,000 infected computers worldwide, including more than 200,000 in the United States, according to the US Department of Justice.

Other routes include malicious ads, fake software updates, infected USB drives, and vulnerabilities in old firmware that already have a patch available. The common thread is that the attacker does not need a new trick; the old ones still work.

How do I know if my device is part of a botnet?

Many infected devices show no obvious signs, which is exactly why botnets are so effective. But there are clues worth checking, especially on routers and computers.

  • Unexplained data use. Your internet usage jumps sharply, or your router lights flash constantly when nobody is streaming or downloading.
  • Slow performance. A computer or phone runs slowly, overheats, or crashes more than usual, especially at idle.
  • Strange outbound traffic. Your firewall or router logs show connections to unknown addresses, or traffic on ports 23 and 2323, which CISA flags for Telnet-based botnet scanning.
  • Blocked IP address. Your email is rejected, or a website blocks your connection, because your IP address was reported for spam or attacks.
  • New admin users or settings. A device has an account, port-forwarding rule, or DNS setting you did not create.
  • Security warnings. Your antivirus flags a threat, or your internet provider contacts you about suspicious traffic from your connection.

For smart cameras and similar devices, there may be nothing to see at all. That is why prevention — updates and password changes — matters more than watching for symptoms. If your phone behaves strangely, our guide on how to know if your phone is hacked walks through the checks.

How can I prevent botnet attacks at home?

Start with your router, because it is the front door to everything else on your network. Then work through every connected device, one at a time, using the checklist below.

  1. Change every default password. Change the router admin password and the Wi-Fi password, and change the default password on every camera, smart TV, printer, and recorder. Use a long, unique password for each device, stored in a password manager.
  2. Update firmware. Check for firmware updates on your router and each smart device, and turn on automatic updates where available. CISA advises applying security patches as soon as they are available.
  3. Disable UPnP and remote admin. Turn off Universal Plug and Play (UPnP) on your router unless you specifically need it, and turn off remote administration. Both features let devices and outsiders open ports without you noticing.
  4. Turn off Telnet. If a device offers Telnet access, disable it. Telnet sends credentials in plain text and is a favorite target for botnet scanners.
  5. Use your router's firewall. Keep the built-in firewall on, and do not open ports or set up port forwarding unless you understand what it exposes.
  6. Keep computers and phones updated. Install operating system and browser updates promptly, keep antivirus running, and do not click attachments or links in unexpected emails.
  7. Buy from vendors that patch. CISA advises choosing devices from companies with a reputation for providing secure devices and ongoing updates. A cheap camera with no update path is a future bot.

Secure your home network first, then your devices. Our guide on how to secure your Wi-Fi covers the router settings in detail.

Home botnet prevention checklistChange default passwordsrouter, cameras, TV, printer — all of themUpdate firmwarerouter and every smart device, auto-update onDisable UPnP and Telnetturn off remote admin you do not useSegment smart devicesguest or IoT network, away from computersKeep antivirus oncomputers and phones, with updates onWatch the trafficunexplained data use means investigate now
Six habits that keep home devices out of botnets. Illustration by Cysoro.

How do businesses prevent botnet attacks?

Businesses face the same device risks, plus the risk of being the target of a botnet DDoS attack. Prevention therefore has two sides: keep your own devices clean, and prepare for an attack on your services.

ControlWhat it doesWho it protects
Network segmentationSmart devices on their own network segment, with no route to business systemsStops one infected device spreading laterally
Patch managementFirmware and software updates on a schedule, with overdue devices flaggedCloses the vulnerabilities botnets scan for
Email filteringBlocks phishing attachments and links that deliver botnet malware such as QakbotStops the main computer infection route
Traffic monitoringBaseline traffic levels with alerts on abnormal spikes, and firewall rules for inbound and outbound trafficDetects both infection and incoming DDoS early
DDoS protection serviceFilters bad traffic before it reaches your site, passing only clean trafficKeeps your site online during an attack
Incident planA written runbook: who calls the ISP, who talks to customers, and when to switch on filteringTurns a crisis into a practiced response

CISA's advice for organizations is clear: harden networks against DDoS, monitor traffic through a firewall or intrusion detection system, and have a plan before the first packet arrives. There is no way to completely avoid becoming a target, but monitoring, filtering, and a recovery plan reduce the damage sharply.

Also inventory every networked device, including printers and cameras that nobody owns. Unmanaged devices are the ones that stay unpatched the longest. For a full starting point, use our small business cybersecurity checklist.

What should I do if a device is already infected?

Follow CISA's removal process exactly, in this order. Skipping a step is how devices get reinfected within minutes of being cleaned.

  1. Disconnect the device from the network. Unplug the network cable or turn off its Wi-Fi so it cannot talk to the botnet or scan other devices.
  2. Reboot it while offline. Mirai-style malware lives in memory, so a reboot clears it. Do this while the device is still disconnected.
  3. Change the password before reconnecting. Set a strong, unique password while the device is offline. If you reconnect first, it can be reinfected before you finish.
  4. Update the firmware. Install any available update, and check the vendor's site if the device offers none. A device with no patch path should be replaced.
  5. Reconnect and watch it. Put it back on the network and watch for unusual traffic over the next few days. If the infection returns, reset the device to factory settings and repeat, or replace it.

For a computer, run a full antivirus scan and check for unfamiliar programs and browser extensions. If a work computer is infected, tell your IT team before doing anything else, so they can check whether other machines are affected.

What should you do during a botnet DDoS attack?

If your website or service suddenly becomes unreachable, confirm first that the cause is not maintenance or an internal fault. Then act quickly, because every minute of downtime costs customers.

  • Contact your network administrator or hosting provider and ask them to confirm the traffic pattern and apply firewall rules.
  • Contact your internet provider to learn whether the problem is on their side and whether they can filter traffic upstream.
  • Switch on DDoS protection if you have it, or route traffic through a filtering service that passes only clean traffic.
  • Watch your other systems. Some attackers use a DDoS as a distraction while they attack something else, so check authentication logs and other services at the same time.
  • Communicate with customers. Post a short status update saying you are aware of the problem and working on it.

After the attack, review what slowed you down and update your runbook. Note which alerts fired, who was contacted, and how long each step took. The FBI's IC3 report shows botnet-driven crime remains a major source of reported losses, so this preparation is not theoretical.

Do not pay the attackerBotnet operators sometimes demand payment to stop a DDoS attack. Paying does not guarantee the attack stops, and it marks you as a payer for the next attack. Filter the traffic and report the incident instead.

The bottom line

Botnets grow because millions of devices still use default passwords and old firmware. Changing those two things on your router and smart devices does more than any single security product.

Segment your smart devices, keep everything updated, and write down what you will do if an attack hits. You can check your own site's basic defenses with our free security headers checker as a starting point.

Frequently asked questions

What is a botnet attack?

A botnet attack uses a network of infected computers and smart devices, all controlled by one attacker, to do something harmful at scale. The most common use is a distributed denial-of-service attack that floods a website or service with traffic until it stops working.

How do I know if my device is part of a botnet?

Common signs are a device that runs slowly, overheats, or uses far more internet data than usual, and a router whose lights flash constantly even when nobody is using it. Many infected smart devices show no signs at all, which is why firmware updates and password changes matter more than watching for symptoms.

Can a botnet infect my phone?

Yes, though phones are less common targets than routers and cameras. Malicious apps, phishing links, and fake software updates can infect a phone and add it to a botnet. Only install apps from official stores, keep your phone updated, and remove apps you do not recognize.

Does antivirus stop botnets?

Antivirus helps on computers and phones by blocking known botnet malware, but it cannot protect a smart camera or router that has no antivirus and still uses a default password. Botnet prevention needs device hygiene as well: updates, strong passwords, and network segmentation.

What should I do if my device is infected with botnet malware?

Disconnect the device from the network, reboot it while it is offline, change its password to a strong unique one, and only then reconnect it. That is CISA's recommended removal process for Mirai-style infections. If it becomes infected again quickly, update or replace the device.

Can a botnet attack be stopped once it starts?

You cannot stop someone else's botnet, but you can reduce its effect on you with traffic filtering, a content delivery network, and a plan you wrote in advance. Contact your internet provider and, for a business, your DDoS protection provider as soon as you see the traffic spike.

Sources

  1. CISA — Heightened DDoS Threat Posed by Mirai and Other Botnets
  2. US Department of Justice — Qakbot Malware Disrupted in International Cyber Takedown
  3. The Register — Feds finger Russian Qakbot mastermind, 700k computers hit
  4. FBI Internet Crime Complaint Center — 2025 IC3 Annual Report
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against CISA's Mirai botnet alert and denial-of-service guidance, and the US Department of Justice Qakbot takedown announcement.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free