What is ransomware and how does it lock your files?
Ransomware is malicious software (malware) that scrambles your files with encryption, using a key only the criminals hold, then demands payment so you'll buy that key back.

Ransomware
Ransomware is malicious software, or malware, that scrambles your files so they won’t open. That scrambling is encryption. Your photos and documents are still on the disk, but they’re locked with a key only the criminals hold. The goal is simple: make you pay to buy that key back. According to the FBI (Federal Bureau of Investigation), it usually gets in through an email attachment, a link, an ad, or an infected website.
Gangs often add a second threat. They steal a copy of your data before they lock it, so they can threaten to sell or leak it online. That’s why the best defense works before ransomware arrives. On Windows, one built-in defense is Controlled folder access. It’s a setting that lets only trusted apps change your most important folders.
What ransomware actually does
Once it’s running, many versions first hunt for backups they can reach, like a plugged-in drive, and delete or encrypt them. Deleting shadow copies is also listed as a sign of this attack. Then the encryption starts: documents, photos, databases. Some ransomware, like Conti, gives each file its own random AES (Advanced Encryption Standard) key, an AES-256 key in Conti’s case. It then seals all those file keys with the gang’s public key. Anyone can lock with a public key. Only the matching private key, which the gang keeps, can open it. Finally, the ransomware renames your files, for example with an extension like .locked, and leaves a ransom note with a crypto address, usually for Bitcoin.
A real case shows the order. In February 2024, the ALPHV/BlackCat group got into Change Healthcare through a Citrix remote-access portal. That login had no MFA (multi-factor authentication), the second sign-in step. The attackers stayed nine days stealing data, then launched the ransomware. In total, 192.7 million people were affected, the largest US healthcare data breach.
How Controlled folder access protects your files
- It guards key folders. By default it covers Documents, Pictures, Videos, Music, Desktop, and Favorites.
- Only trusted apps get through. Apps Windows trusts can still change the files in those folders.
- Untrusted apps are blocked. A program that isn’t trusted can’t change protected files, and Windows can show an “Unauthorized changes blocked” notification.
- Recovery sits nearby. The same ransomware protection page has a Ransomware data recovery section for OneDrive.
The result: an untrusted program like ransomware can’t rewrite the files in your protected folders. You’ve protected them before it arrives.
Paying the ransom is not getting your files back
Many people think paying ends the problem. It doesn’t. The FBI says: “Paying a ransom doesn’t guarantee you or your organization will get any data back.” The FBI doesn’t support paying. And even if the key works, the copy the gang stole can still be leaked online.
What to do
- Turn on Controlled folder access today: open Windows Security, then Virus & threat protection, then Manage ransomware protection, and switch it on.
- If a third-party antivirus replaces Microsoft Defender on your PC, this setting may be managed by it or unavailable.
- Don’t leave your backup drive plugged in all the time, because many ransomware versions hunt for backups they can reach.
- Be careful with email attachments, links, ads, and unknown websites, the usual ways in. At work, make sure remote-access logins need a second sign-in step.
Watch it in 60 seconds
