I was checking out different keyloggers for research purposes and stumbled upon Refog:
https://www.refog.com/keylogger/
This program could catch a lot of system events, but what really caught my attention was something else. The program created a hidden folder called Mpk, path C:\Windows\SysWOW64\Mpk. It was marked as an operating system files folder, because it was not visible until I unmarked Hide protected operating system files (recommended)
. This, I guess, can be done via the attrib command like this attrib +s +h "C:\Windows\SysWOW64\Mpk"
so nothing revolutionary.
However they also added an exclusion to Windows Defender for this folder. How can they do this programmatically? I'm running Windows 10 Pro x64.
Go to Start > Settings > Update & Security > Windows Security > Virus & threat protection. Under Virus & threat protection settings, select Manage settings, and then under Exclusions, select Add or remove exclusions. Select Add an exclusion, and then select from files, folders, file types, or process.
In the Group Policy Management Editor go to Computer configuration, and select Administrative templates. Expand the tree to Windows components > Microsoft Defender Antivirus > Exclusions. Open the Path Exclusions setting for editing, and add your exclusions. Set the option to Enabled.
Description. The Add-MpPreference cmdlet modifies settings for Windows Defender. Use this cmdlet to add exclusions for file name extensions, paths, and processes, and to add default actions for high, moderate, and low threats.
The correct way to do this is using the Add-MpPreference PowerShell cmdlet. Use this cmdlet to add exclusions for file name extensions, paths, and processes, and to add default actions for high, moderate, and low threats.
You can easily perform this from the elevated cmd shell in Windows 10 using the following command line:
powershell -inputformat none -outputformat none -NonInteractive -Command Add-MpPreference -ExclusionPath "C:\Windows\SysWOW64\Mpk"
Run in elevated shell (search cmd in Start menu and hit Ctrl+Shift+Enter).
powershell -Command Add-MpPreference -ExclusionPath "C:\tmp"
powershell -Command Add-MpPreference -ExclusionProcess "java.exe"
powershell -Command Add-MpPreference -ExclusionExtension ".java"
powershell -Command Remove-MpPreference -ExclusionExtension ".java"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With