GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing v3ded.github.io — Utilizing Programmatic Identifiers (ProgIDs) for UAC Bypasses IntroductionIn today’s blog, we will specifically talk about evading antivirus signatures that target registry keys which are associated with UAC (User Account Control) bypasses. First, I will briefly talk about UAC and what it really is. Subsequently, I will look at the User Account Control (UAC ) PrimerUAC is a mandatory access control enforcement feature of Windows that helps to prevent unauthorized actions or changes occurring to the operating system. This is achieved through an administrative consent prompt, which shows up whenever a user-launched application requires administrative elevation to carry out its tasks. According to Microsoft, this prompt ensures that no unknown or malicious software can silently install itself or inherit administrative privileges unless it is approved beforehand or the user explicitly authorizes it. Notice the word “silently” though. The prompt’s only purpose is to alert the user when a launched program requires elevated privileges. It is then up to the user to decide whether that request should be honored or not. Although this solution is better than having nothing at all, it’s still not ideal. As we all probably know, it is quite easy to trick an inexperienced user into clicking anything just to make an annoying popup disappear ¯\_(ツ)_/¯. To add insult to injury, what if I told you, that there is a way of launching programs in an elevated context without triggering the prompt at all? Yeah, it is in fact possible! Let me welcome you to the wonderful world of UAC bypasses.
FodHelper.exe UAC Bypass
If the aforementioned registry keys have commands assigned to them, DemoTo demonstrate fodhelper’s ability to bypass UAC and execute code in an elevated context, we will use the following script from netbiosX: With this script, we can utilize the
FodHelper.exe setup to launch cmd.exe in an elevated context.Furthermore, we can easily verify the integrity of the newly created process with a tool such as Process Hacker. cmd.exe running in high integrity.So What’s the Catch?Antivirus. That’s what. If you were following along so far and actually tested the example I showed in the previous chapter, then you surely noticed that e.g. Windows Defender is not a fan of you writing to the What’s funny though, is that more often than not, even if Defender kills your script, your malicious executable will still be launched! That’s usually due to the fact that only the process which wrote to the registry gets terminated (see demo below).
powershell.exe is terminated. However, cmd.exe is still launched via fodhelper.exedespite the Defender warning.While this is great, we can do better. Much better. In fact, with a little bit of “magic”, we can make this bypass work flawlessly without Defender killing the calling process and without alerting the user at all! And that all starts with something called ProgIDs. Programmatic Identifiers (ProgIDs ) in WindowsIn Windows, a programmatic identifier (ProgID ) is a registry entry that can be associated with a Class ID (CLSID ), which is a globally unique serial number that identifies a COM (Component Object Model) class object. In simple terms the ProgID is basically a string such as “my-application.document” that represents a CLSID such as “{F9043C85-F6F2-101A-A3C9-08002B2F49FB}”. In addition, the Windows Shell uses the ProgID registry subkey to associate a file type with an application, and to control the behavior of the association. One of the values used in a ProgID subkey is an element with the name of In an ideal world, this would be used to distinguish two identical applications with different versions as mentioned above. However, in our case,
The MagicNow that we know what If you have trouble seeing what’s happening, imagine the procedure in multiple steps:
If configured correctly, the system should translate this registry setup into With this change, Defender should now be tricked into believing that the original
cmd.exe is launched in an elevated context while powershell.exe is still running in the background (AV has been bypassed).Mission accomplished.
KudosI would like to express my gratitude to Filip Dragovic for sharing the InvisiMole report with me. If it wasn’t for him, I wouldn’t even know that registry manipulation with programmatic identifiers is possible. In addition, I would like to thank Jack for proof-reading my blog before its release and adding in a few important details. You guys are both amazing, thank you for helping me. AppendixIf you prefer video demos instead of gifs, look at the links below. ConclusionThat’s about it folks. I hope you enjoyed this post! As was the case with my previous blog, I just felt like this technique deserved a little bit more recognition. Main reason being, that I really struggled to find information regarding this attack vector on the internet. Therefore, if you read the blog until its end, I really hope you at least learnt something new. Thank you, and until next time! | ||||||
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |