sodcalculator

10 Tech How-To

How to Protect Your Computer from Hackers, Spyware & Viruses

Guide 10-51262 · Updated · Step by step

This guide walks you through practical steps to secure your computer against hackers, spyware, and viruses. You’ll learn how to harden your system, avoid common threats, and respond if something goes wrong. No special skills are needed—just follow the steps in order.

What You’ll Need

  • A computer running Windows, macOS, or a mainstream Linux distribution
  • Administrator access to install software and change system settings
  • An internet connection (for updates and downloads)
  • Optional: an external drive or cloud account for backups

Step-by-Step

  1. Turn on automatic updates. Go to your operating system’s update settings and enable automatic updates for the OS and all installed apps. On Windows, this is under Settings → Update & Security → Windows Update. On macOS, it’s System Settings → General → Software Update → Automatic Updates. Updates patch security holes that hackers exploit.
  2. Use a reputable antivirus/anti-malware program. Windows comes with Microsoft Defender (built-in and free). macOS has built-in XProtect. If you want extra protection, install a trusted third-party tool from the official vendor’s website only. Avoid “free” antivirus pop-ups from random sites—they’re often fake.
  3. Enable your firewall. A firewall blocks unauthorized incoming connections. On Windows, turn on Windows Defender Firewall (Settings → Privacy & Security → Windows Security → Firewall & network protection). On macOS, enable the built-in firewall (System Settings → Network → Firewall).
  4. Use strong, unique passwords. Create a different password for every important account (email, banking, social media). Use a password manager to generate and store them—this way you only need to remember one master password.
  5. Turn on two-factor authentication (2FA). For your email and financial accounts, enable 2FA. This adds a second step (like a code from your phone) even if your password is stolen. Most services offer this in their security settings.
  6. Be careful with email attachments and links. Never open attachments or click links in unsolicited emails, even if they look like they’re from a friend or company. Check the sender’s full email address and hover over links to see the real URL. When in doubt, contact the sender through a known channel.
  7. Only download software from official sources. Download apps from the developer’s official website or your OS’s app store. Avoid “cracked” or pirated software—they often contain malware.
  8. Keep your web browser updated and secure. Use a modern browser (Chrome, Firefox, Edge, Safari) and enable automatic updates. Install an ad blocker to reduce malicious ads. Avoid browser extensions you don’t need, and only install them from official stores.
  9. Back up your data regularly. Use an external drive or cloud service to back up important files. Follow the 3-2-1 rule: 3 copies, 2 different media, 1 offsite. If ransomware hits, you can restore your files without paying.
  10. Secure your Wi-Fi network. Change your router’s default admin password, use WPA2 or WPA3 encryption, and disable WPS (Wi-Fi Protected Setup). This prevents neighbors or strangers from snooping on your traffic.
  11. Use a standard (non-admin) account for daily tasks. On Windows, create a standard user account and use it for browsing, email, and work. Use the administrator account only for installing software or changing system settings. This limits the damage malware can do.
  12. Lock your screen when away. Press Windows+L (Windows) or Control+Command+Q (Mac) to lock your computer. This prevents someone from accessing your files if you step away.

Common Mistakes

  • Ignoring updates. Delaying updates leaves known vulnerabilities open. Set them to install automatically.
  • Using the same password everywhere. If one site gets breached, hackers try that password on your email and bank accounts.
  • Clicking “Allow” on every pop-up. Many pop-ups trick you into granting permission to install software or enable notifications. Read before clicking.
  • Disabling your antivirus because it’s “slow.” That trade-off isn’t worth it. If your antivirus is slow, switch to a lighter one—don’t turn it off.
  • Downloading from untrusted sites. Torrent sites and “free download” portals are common malware sources. Stick to official stores.

Tips

  • Use a virtual private network (VPN) when on public Wi-Fi to encrypt your traffic. Choose a reputable VPN that doesn’t log your activity.
  • Regularly review the apps and extensions you have installed. Remove any you don’t recognize or no longer use.
  • Check your browser’s security settings: block pop-ups, enable “HTTPS-only” mode if available, and disable automatic downloads.
  • For extra security, use a separate browser or profile for online banking and sensitive sites.
  • Periodically run a full scan with your antivirus, not just quick scans.

Troubleshooting

If your computer is already infected:

  1. Disconnect from the internet immediately (unplug Ethernet or turn off Wi-Fi).
  2. Boot into Safe Mode (Windows: restart and press F8 or Shift+Restart; Mac: restart and hold Shift).
  3. Run a full antivirus scan. If your antivirus can’t remove the malware, try a second opinion tool like Malwarebytes (free version).
  4. If the infection persists, restore your system from a backup (created before the infection). If you don’t have a backup, consider a system reset—but back up your personal files first.
  5. After cleaning, change all your passwords from a different, known-clean device.

If you suspect a phishing email: Do not click anything. Mark it as spam and delete it. If you already clicked a link, close the browser tab, run a scan, and change the password for that site immediately.

If your browser is hijacked (homepage changed, pop-ups): Reset your browser settings to default, remove suspicious extensions, and run a malware scan.

Frequently Asked Questions

Q: Is free antivirus enough?
A: Yes, for most home users. Microsoft Defender on Windows and XProtect on macOS are solid. Just keep them updated and run regular scans.

Q: How do I know if my computer is infected?
A: Common signs: sudden slowdowns, frequent pop-ups, new toolbars, programs you didn’t install, or your antivirus alerts. If you see these, run a scan.

Q: Can a Mac get viruses?
A: Yes, though less common. Macs are targeted by malware like adware and phishing. Follow the same precautions on any OS.

Q: What is ransomware?
A: Ransomware encrypts your files and demands payment for the key. The best defense is regular backups and not clicking suspicious links.

Q: Should I use a VPN at home?
A: It’s not necessary if your router uses WPA2/WPA3 and your websites use HTTPS. VPNs are more important on public Wi-Fi.

Q: How often should I update my passwords?
A: Only when you suspect a breach. Using unique, strong passwords is more important than changing them frequently.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →