How to protect your computer and data from cyber attacks
A practical, prevention-first guide to protecting devices and data, plus safe first steps if an attack is suspected.

How to protect your computer and data from cyber attacks
Cyberattacks can steal personal information, install malware, or lock files. A few regular habits can reduce risk and make it easier to respond if something goes wrong.
Prerequisites
Know how to update your operating system and apps, and where your device’s built-in security settings are.
Set up a backup destination you control, such as an external drive or a reputable cloud backup service.
Keep a way to contact your workplace or school IT team, if the device is managed by them.
Prevention steps
Install updates promptly. Turn on automatic updates for your operating system, browser, and commonly used apps when available. Updates can include security fixes. Restart when prompted so updates can finish.
Use built-in security protection. Check that your operating system’s firewall and malware protection are enabled and current. On Windows, see Microsoft’s guidance on keeping your computer secure for Windows-specific instructions.
Use unique passwords and two-step verification. Avoid reusing passwords, especially for email, banking, and cloud accounts. A password manager can help you keep them distinct. Enable two-factor authentication where offered; see how to enable 2FA.
Pause before clicking. Be cautious with unexpected attachments, links, urgent payment requests, and messages asking for passwords or verification codes. Confirm unusual requests through a separate, known contact method. Don’t install software from untrusted sources or connect unknown USB devices.
Secure your network and devices. Use password-protected Wi-Fi with modern encryption, change any default router password, and lock your screen when you step away. Limit personal information you share publicly.
Back up important files regularly. Keep a backup separate from your computer, such as an external drive that is disconnected when not in use, or a trusted online backup. Before attempting any recovery or reset that could overwrite or erase data, verify that a current backup exists and that you can access the files. A backup is useful only if it contains the files you need and is available when required.
If you suspect an attack
Disconnect the affected device from Wi-Fi or wired internet to limit communication with attackers or spread to other devices. If it belongs to work or school, contact IT promptly.
From a device you believe is safe, contact your bank or other affected account providers if financial information may be involved. Change affected passwords and review account activity.
Run a security scan using your operating system’s trusted protection tools. For Windows-specific ransomware guidance and scan instructions, consult Microsoft Support.
Don’t pay a ransom as a way to guarantee file recovery. Microsoft notes that payment does not guarantee access to your computer or files. Get qualified help before attempting major repairs or data recovery.
Troubleshooting
Updates won’t install: Restart and try again. If the problem continues, use the device maker’s or operating system provider’s official support instructions; steps can vary by model and version.
A warning or pop-up claims your computer is infected: Don’t call a number shown in the pop-up or give a caller remote access. Close the page or app if possible, then run a scan using trusted security software.
Files are missing or inaccessible: Avoid resetting or reinstalling the system until you have verified a backup. Recovery options vary by device, backup service, and incident, so consult the relevant official support guidance before proceeding.


