I got 2 ransomware viruses just this past week. I have windows defender and still get them from clicking on websites. I Google'd 'Bettie Scouts of America' and clicked on the first result that popped up in the search. Boom a lockup virus. Jesus, what a world we live in. If Microsoft was so busy always forcing useless updates on the computer maybe they could do something about this problem.
The problem is the current paradigm of how computer programming works. Basically to interact with anything, your computer has to allow itself to be programmed by another site. Instead of, let's say, having a contained program with defined parameters on what an incoming program inherently can do. From one perspective it's almost like computers are designed to get viruses. To some extent though it comes down to a trade-off between convenience and security, which is inherent in everything.
Create a non-admin user account. Most home PC's are susceptible to viruses because the account they use all the time is an admin account, which uses that admin permission to install things when you click on them.
It certainly has privacy settings available, and Java Script can be disabled, and then there are good add-ons available for it such as NoScript. I have never had anything of the sort come up on any of my systems, and I don't even use NoScript these days. At any rate, I don't use Windows for anything if I don't deem it absolutely necessary. No matter what Microsoft does to try and secure it, it is the most widely used operating system by far, and therefore the most targeted by malware of all sorts. Going to Linux on the same hardware or a Mac is a great way to improve your security, and the Linux option will actually save you money as well since it is free and you don't generally need commercial software to run on it, either. Install Linux Mint over Windows (back up personal data to an external volume or another PC first and then copy it back after you're up and running with Linux). You can even move a Firefox profile from one platform to another.
Microsoft has no incentive to solve the virus problem. Malware works to their advantage because of their defacto monopoly on the desktop market. They could easily and simply put an end to it, but they won't. The best defense against ransomware is a good, reliable, secure, regular backup of your data, and a good restorable image of your PC. Get ransomware? Restore your data back to the last backup. Solved.
I had a much better solution in the stone age of computing, when very few people even had computers in the 1990s, in the days of really limited modems, I had 1 computer online at any time, and I considered it a "Disposable" resource. And I would use it until it would blue screen too many times and I would pull out the hard drive, pop in a new hard drive and do a clean install of Windows. In the early days, I bought a few new computers, I wanted a laptop ever since I saw the first ones but could not afford them, suddenly, I had purchase order options to purchase and pay for certain bit of private kit with oversight authorization, and I purchased a Compaq Satellite ? IIRC, it was considered really high tech in those daze lol..... A modem card slot etc, and a snappy case, and working as a Police Officer and taking College classes at Night, it was My constant companion. I had let Myself get talked into an extended Warranty when I ordered it, it was over $ 1000 U.S. and the Second most expensive small item I had ever ordered over the phone, and I paid $ 50 U.S for the Warranty, and everyone said I was an idiot for it, until it smoked one fine day and quit working, and they sent me to a local repair center and soon, I had a working computer once more. Now I use easy to carry tablets rather than larger bulky laptops or dedicated desk top computers anymore.... As Wi-Fi is more readily available, a nice easy to carry tablet is just the thing.
I only had Macs in the 90s. Nary a problem, of course. In fact, to date I have never gotten any sort of malware, not even on a Windows system (I typically keep it limited to VMs nowadays, and not for any extensive internet use).
If windows could defend its OS there wouldn't be a multibillion dollar industry to do so. Using "windows defender" is just running naked through the thorns of the internet. I recommend eset nod 32 for viruses and mbam or sas (super anti-spyware) for malware. Regular scans, regular backup (clonezilla is brilliant), or doing yourself a real favor and running linux, embedding a sandboxed VM windows inside. Then you can just click a button and create an up to date snapshot, then fly through the brambles naked. Windows runs muuuuuch faster in vm btw. Invest in heaps of ram.
Yeah, it's fast enough in my VM. I give it four cores and, I think, 8 gigs of RAM currently. No problemo. And this way it seems to be safe against the instabilities that people sometimes experience when major updates come along and are, of course, forced on us, since there are no quirky hardware or drivers for it to contend with. Backups are a breeze when you simply have to copy over a drive image I don't bother with anything beyond Microsoft's own defender crap on it. Linux is lovely on here as a host system, by the way, although I did have to disable C-states in the BIOS for it to be stable. There has been some weird issue with those and recent Fedora kernels. Not sure just when that began or even what the state of it is now.
Stay away from porn sites, or use a backup computer just for that purpose that you don't mind wiping the hard drive and reinstalling the operating system from time to time. Don't click any email links with which you are not familiar. And run a paid for antivirus. I use Bitdefender Internet Security and have never had a bug, induced crash or takeover.
Get Malwarebytes. I have multiple levels of protection but this is what stops just about everything. You can run it on top of Windows Defender. You just have to enable Defender first. You can run the scan for free but have to pay for active protection. When I go to porn sites it is constantly blocking crap. I always update every day just before opening any site. I've seen perhaps a few updates a day at times. It's rare but it happens. Be sure Windows updates daily as well.
I got one that locked my desktop so I bought a new one with Win 10. Last night I got another one that took over my computer. With Win7 I could just restart and it would clear up, this persistent SOB just took it. I reset it and it's back up and running and I bought virus protection. Only problem is my email won't function now. It looks to me like with EDGE you have to pay for email if you want it.
Go and download the free version of sandboxie.com and run your browser in their sandbox and that should be the end of your problems. Note I have no connection with sandboxie.com except as a user of their free version for years.