Thank God for Windows Defender.

This just goes to show how important it is to have anti-malware on your machine and to keep it up to date. Having an anti-virus on your system is sometimes not enough, updates would help the software to identify new forms of threats and intrusions.
Browser hijacking via Javascript miners is probably the biggest threat amongst all mining malware right now, and antiviruses are not that great at preventing them. People usually recommend to use adblockers and noscript extensions, and while it does work, it also makes a lot of sites unusable, because Javascript provides interactivity and better user experience and is just required to even visit so many sites. So users have to be always cautious and monitor their resource activity while they browse to spot any suspicious behavior.
Oh I was thinking about a scenario wherein the malware is already on the machine but okay you obviously know a lot more in information security than me haha.
This just goes to show that there is no full proof protection from hackers with malicious intent.