How to Stay Away from Cyberattacks: 12 Steps
In this article
Staying away from cyberattacks comes down to a handful of habits: keep your software updated, use strong and unique passwords, enable two-factor authentication, and think before you click. No single step makes you invincible, but doing all of them consistently blocks the vast majority of common attacks. This guide walks you through the exact steps to harden your devices and accounts, plus what to do if something goes wrong.
What You'll Need
- A computer, smartphone, or tablet you control
- Access to your router's admin page (usually via a web browser at an address like 192.168.1.1 or 10.0.0.1 – check your router's label)
- A password manager (free options like Bitwarden or built-in ones from Apple/Google work fine)
- An authenticator app (Google Authenticator, Microsoft Authenticator, or your phone's built-in one)
- An external hard drive or cloud backup service (for step 10)
Step-by-Step
- Update everything – operating system, apps, and browser. On Windows, go to Settings > Update & Security > Windows Update. On macOS, System Settings > General > Software Update. On Android, Settings > System > System update. On iPhone, Settings > General > Software Update. For apps, use the official app store (App Store, Google Play, Microsoft Store). Turn on automatic updates where available so you don't have to remember.
- Use a password manager and create strong, unique passwords. A good password is at least 12 characters, mixing letters, numbers, and symbols. Never reuse a password across different sites. Your password manager can generate and store these – you only need to remember one master password.
- Enable two-factor authentication (2FA) on every account that offers it. Prefer an authenticator app over SMS when possible, because SMS can be intercepted. Go to each account's security settings (usually under Settings > Security or Privacy) and look for “Two-Factor Authentication” or “2FA.” Follow the prompts to scan a QR code with your authenticator app.
- Beware of phishing emails, texts, and calls. Never click links or download attachments from unexpected messages, even if they look like they're from your bank, a delivery service, or a friend. Check the sender's email address carefully – a common trick is using a lookalike domain like “amaz0n.com.” If in doubt, go directly to the official website by typing the address yourself, not by clicking the link.
- Keep your home Wi-Fi locked down. Change the default router admin password and the Wi-Fi network name (SSID). Use WPA2 or WPA3 encryption (check your router's wireless settings). Turn off WPS (Wi-Fi Protected Setup) if you don't use it – it's a known attack vector. Set a strong Wi-Fi password that's different from your router admin password.
- Install a reputable antivirus/anti-malware tool. On Windows, Microsoft Defender is built-in and adequate if kept updated. On macOS, the built-in XProtect helps, but you can add a free tool like Malwarebytes for extra scanning. On Android, use Google Play Protect (it's on by default) and avoid sideloading apps. On iPhone, iOS is sandboxed, but avoid jailbreaking and only install from the App Store.
- Lock your devices with a PIN, password, or biometrics. Set a screen lock that requires a code or fingerprint after a short timeout. On Windows, Settings > Accounts > Sign-in options. On macOS, System Settings > Lock Screen. On Android, Settings > Security > Screen lock. On iPhone, Settings > Face ID & Passcode (or Touch ID & Passcode).
- Be careful what you share on social media. Don't post your full birthdate, home address, or vacation plans. Cybercriminals use this info for targeted phishing and password reset attempts. Adjust privacy settings so only friends can see your posts.
- Use a VPN on public Wi-Fi. Coffee shop and airport Wi-Fi are often unencrypted. A VPN encrypts your traffic, making it unreadable to snoopers. Choose a reputable paid VPN (free ones often sell your data). Install the VPN app, connect before you browse, and turn it off when you're on your home network if you prefer.
- Back up your important files regularly. Use the 3-2-1 rule: three copies of your data, on two different media, with one copy offsite. For example, one copy on your computer, one on an external drive, and one in cloud storage (like Google Drive or iCloud). This protects you from ransomware – if your files get encrypted, you can restore from backup instead of paying.
- Review your account activity and permissions. Every few months, check your bank and email accounts for unfamiliar login locations. On your phone, review app permissions (Settings > Privacy) and revoke access to your camera, microphone, and location for apps that don't need them. On social media, check which third-party apps have access to your account and remove ones you don't use.
- Turn on “Find My” or similar device tracking. On Android, Settings > Security > Find My Device. On Windows, Settings > Update & Security > Find My Device. This helps you locate or remotely wipe a lost or stolen device, preventing data theft.
Common Mistakes
- Using the same password everywhere. One breach exposes all your accounts. A password manager solves this.
- Clicking links in emails without checking the URL. Hover over the link to see the actual destination – if it's not the official domain, don't click.
- Ignoring software update notifications. Those updates often patch security holes that attackers exploit.
- Disabling your firewall. The built-in firewall on Windows and macOS is your first line of defense. Keep it on.
- Using public Wi-Fi without a VPN. Attackers can intercept data on the same network.
- Downloading apps from unofficial sources. Only use official app stores to avoid malware.
Tips
- Set up a separate user account on your computer for daily use, and use an administrator account only when installing software. This limits the damage if malware runs.
- Use a credit card with fraud protection for online purchases, and consider virtual card numbers if your bank offers them.
- For your home router, change the default SSID to something that doesn't identify your address or family name.
- Regularly check your credit report (free annually in many countries) to spot identity theft early.
- If you get a suspicious call from “Microsoft” or “your bank,” hang up and call the official number yourself. Scammers use caller ID spoofing.
Troubleshooting
If you suspect you've already been attacked, act fast:
- Disconnect from the internet. Unplug your router or turn off Wi-Fi to stop data from being sent out.
- Run a full antivirus scan. Use your installed antivirus or boot into Safe Mode and run a scan (on Windows, restart and press F8 or Shift+Restart; on Mac, restart and hold Shift).
- Change your passwords from a different, clean device. Use your phone or a friend's computer if your main device might be compromised.
- Enable 2FA on any account you can. Even if you've been phished, 2FA can stop the attacker from getting in again.
- Check for unauthorized transactions. Contact your bank or credit card company immediately to dispute charges and freeze the card.
- If ransomware hits, do not pay. Paying doesn't guarantee you'll get your files back, and it funds criminals. Restore from your backup instead.
- If you can't remove the malware, do a factory reset. On Windows, Settings > Update & Security > Recovery > Reset this PC. On macOS, restart and hold Command+R to enter Recovery, then reinstall macOS. On Android, Settings > System > Reset options > Erase all data. On iPhone, Settings > General > Transfer or Reset iPhone > Erase All Content and Settings. This deletes everything, so make sure you have backups.
If you believe you've lost money or sensitive data, report it to your local cybercrime unit (like the FBI's IC3 in the US, or Action Fraud in the UK). Keep logs of what happened.
Frequently Asked Questions
What is the single most important thing I can do?
Enable two-factor authentication on your email and financial accounts. It prevents most account takeovers even if your password is stolen.
Do I really need a password manager?
Yes, because the only way to have strong, unique passwords for every site is to store them somewhere. A password manager does that securely, and you only need to remember one master password.
Can a VPN protect me from malware?
No. A VPN only encrypts your internet traffic, not your device. You still need antivirus and safe browsing habits.
Is it safe to use public Wi-Fi if I'm just checking email?
Not really. Email logins can be intercepted. Always use a VPN on public Wi-Fi, or use your phone's cellular hotspot instead.
How do I know if an email is phishing?
Check the sender's full email address, look for urgent language (“your account will be closed”), and hover over links to see the real URL. If it's not from a domain you recognize, it's phishing.
What should I do if I accidentally clicked a phishing link?
Don't enter any information. Close the page, change your passwords for that site and any site where you use the same password, and run an antivirus scan.