You are browsing the archive for Anti-Forensics.

Beyond good ol’ Run key, Part 93

October 12, 2018 in Anti-Forensics, Autostart (Persistence)

I was pretty surprised to find this one as I have looked at kernel32.dll many times before. Seeing a code branch that is responsible for enumerating registry subkeys and loading the DLLs, and one that has not been discussed before, is a rare treat so it immediately found its way to this series…

The actual code resides inside the NotifyUILanguageChange API. Despite MS claiming that it is unsupported it is still being used internally by a number of components. Chances for it to go away soon are probably low. As far as I can tell, the function in question is called when certain system settings are changed – I will show you how to trigger it in a second 🙂

The code enumerates entries under this Registry key:

  • HKLM\System\CurrentControlSet\
    Control\MUI\CallbackDlls\
    {ENTRY}\DllPath=<DLL>

On Windows 7, we can see a number of these entries:

and Windows 10 has even more – I really doubt this code is going away:

Each entry includes the DllPath that points to a library. The only requirement is that all these libraries must be signed…

Now, how to trigger it?

It’s simple: just change the system locale…

Once you do that, you can observe Procmon log showing the enumeration:

Again, the exact criteria when the DLLs are loaded and how are not clear to me, and there may be other times when the code is triggered, but finding these out is a homework exercise for the reader 😉

It’s certainly not the best persistence mechanism, but yet another place to look at, just in case…

Beyond good ol’ Run key, Part 92

October 11, 2018 in Anti-Forensics, Autostart (Persistence)

This is an old one, but I realized I have never covered it: Winlogon GP Extensions.

The key is located here:

  • HKLM\SOFTWARE\Microsoft\
    Windows NT\CurrentVersion\
    Winlogon\GPExtensions\
    {GUID}\DllName=<DLL>

Again, it’s an oldie and it’s supported by many startup enumeration programs including e.g. Autoruns. Some web sites list a number of known extensions e.g. here.