Thanks for such a detailed explanation. Does Windows report an attempt to do this with any sort of pop up notification of the block like an error box or anything? Never seen one before.
I've seen cases where an unsigned driver has been attempted to be loaded, but has been blocked from doing so followed by an on-screen prompt to the user saying that the activity was prevented due to the certificate issue. However, I've only seen it happen a few times myself whilst on Windows 7 using genuine tools to automatically create and start services for device drivers, therefore I am not entirely sure. I believe it was some sort of "information" alert with only OK as the option, as opposed to a security-warning "stay alert" sort of warning.
So it's harder to get rootkits on a 64 bit system, partly because the driver has to be signed. I can understand that. Should I hope still that this hasn't made security devs feel at ease about monitoring for attempts? If someone finds a way to use a valid signature somehow (maybe unlikely) then maybe this could be a problem still. Also, sounds like 32 bit OS uses are at risk. Should they be concerned?
It is certainly much more difficult but as far as I am aware there is a decent work-around to PatchGuard for Driver Signature Enforcement which works on Windows 10 - it evolves around exploitation of the genuine VirtualBox device driver.
The theory behind it is that the VirtualBox device driver does a few unusual things which you could have imagined considering it is used for virtualisation software, and because it is a kernel-mode device driver, it also has access to kernel-mode memory. There is a DLL called CI.dll which you should be able to find under your System32 folder ("SYSTEMDRIVE:\Windows\System32\") and you'll also notice it is loaded as a module (import) under ntoskrnl.exe (along with other loaded device drivers being listed there - kernel-mode device drivers become module imports of ntoskrnl.exe the same way that a normal Dynamic Link Library becomes a module import of a normal user-mode process). The file-name "CI" stands for Code Integrity and it is responsible for handling checks regarding the system configuration about PatchGuard - it will check if Test Mode is enabled or not and make changes accordingly for example, and all of this initially happens at boot during the initialisation of the Windows Kernel. The VirtualBox driver exploitation technique will use the VirtualBox driver from user-mode by starting it up and then forcing it to perform operations from kernel-mode for the attacker (directing it from user-mode) to patch the flags within CI.dll (which is under kernel-mode memory and thus without a zero-day vulnerability like this one (e.g. maybe physical memory exploitation) you cannot abuse it) so the system believes that Test Mode/Unsigned device drivers can be loaded. The problem with this technique stems from the unpredictable potential for a BSOD crash depending on the OS version but it does not necessarily happen - the aim is to load the driver as quickly as possible after patching the flags and then re-patch them back to their original values to conceal evidence of tampering having occurred in the first place. The only catch is that the driver must be adapted to become referred under the term "driverless" so it doesn't get identified, and this also automatically makes the driver hidden, thus making it a lot tougher to identify its presence.
Even though there is enhanced mitigations against rogue device drivers, this doesn't necessarily automatically stop all rootkits. With or without an exploit for Driver Signature Enforcement (a feature of PatchGuard), criminals which are serious about their work and are developing Advanced Persistent Threats (APTs) of a higher sophistication to the standard malware you may find in the wild which will commonly target Home users, can definitely go to the trouble (and be successful) with acquiring a code signing certificate, probably through a company taking bribes or bought online by someone else who handles obtaining of the certificates. Thankfully, past an early patch update on Windows 10, you'll actually require an Extended Validation digital signature as opposed to the previous standard one for kernel-mode signing if the driver will be used on Windows 10 systems which have installed the early security patch, which makes things a whole lot tougher because an Extended Validation certificate will be a lot trickier to get hold of for a criminal compared to an original one.
32-bit environments are not as secure as 64-bit environments because they miss out on enhanced security features - PatchGuard is an example of one of those features which are missed out on, and forced Data Execution Prevention is also missed out on (64-bit processes are automatically enabled for DEP as far as I am aware). This doesn't mean that a 32-bit Windows user cannot be protected though, because there are still good security solutions which can be used, and common sense is a good starting ground and the most important key aspect of staying protected against both old and the latest malware attacks. However, on the contrary, a successful rootkit infection can do a lot more on a 32-bit environment compared to a 64-bit environment by default (e.g. easily patch the Windows Kernel to make concealment difficult, attempt to subvert security software trying to identify the concealment having taken place by the rootkit infection, etc.).
User-Mode rootkits exist too, as well. They can be used to do some nasty things but of course not to the same depths as a kernel-mode rootkit. For example, a user-mode rootkit could effortlessly inject code into Task Manager to conceal processes belonging to other malicious software packages which may be installed on the system and active in-memory (e.g. spyware) as long as it had elevated rights to access the address space of that process.
All in all, I don't think there is a need to worry much about it. Not nowadays at-least, despite attacks doubling and getting more and more complex. The reasoning behind this is that a lot of malware authors targeting average users like you and myself are without doubt typically inexperienced and most likely nothing more than basic script kiddies piggy-backing off public source code, and the more sophisticated outbreaks surrounding ransomware infections can be avoided by making good decisions anyway (e.g. ignoring unexpected e-mails and certainly not aimlessly handling the attachments to them, not being click-happy whilst doing online research, being careful with new installations, etc.). Even if we look at the original Petya, the deployment was actually incredibly basic (simple Win32 API calls - you would be able to find better examples online for hijacking the Master Boot Record probably)... The complex thing about it was its boot-loader (encryption of the Master File Table in 16-bit Assembly without requiring Windows).
Ransomware and adware is famously prevalent nowadays. Ransomware will usually provide some sort of awareness notification to the victim so they can potentially get started on making a ransom payment faster, and adware is also focused on money. Home users can still be in the firing line for complex attacks (e.g. as we saw from Petya, NotPetya, WannaCry and BadRabbit), however the main goal for criminals which are serious about their work is likely about targeting wealthy and popular businesses so they can be pressured into making big large payments to keep a breach quiet from the public (we recently heard about this happening with the company Uber, only a few days ago did they announce the truth about the events that took place a long time ago) or to receive decryption of the critical company files (which they may or may not even get back after paying - malware authors cannot be trusted).
We went from viruses, rootkits and bootkits to less advanced threats taking place. Then we went back to bootkits for the time Petya was quite popular and booming on the security head-lines, same for a few other recent outbreaks. I wonder where we will go next...