April 26, 2016 By Larry Loeb 2 min read

Security researcher Casey Smith was trying to solve a particular problem and came up with a unique solution. He needed a reverse shell on a workstation that was locked down by the Windows AppLocker executable and the script rules that it enforced. Through his efforts, he found he could register his script to bypass AppLocker but still had to instantiate the object to trigger the code execution.

What Exactly Did Smith Find?

Smith found that if he placed the script block inside of the Registration tag and called regsvr32, the code would execute. With some further research, he discovered that the code in the registration element executes on register and unregister. He then unregistered the workstation using this code inside the Registration tag.

Furthermore, he found regsvr32 is already proxy-aware, uses TLS, follows redirects and is a signed Microsoft binary. He also discovered that regsvr32.exe can accept a URL for a script; hosting the .sct file at an arbitrary but controlled location works just fine. In order to trigger the bypass, the code block, which can be either Visual Basic or JavaScript, is placed inside the element.

Additionally, the COM object the script references never shows up in the Registry.

Why Does Windows AppLocker Matter?

“When AppLocker was introduced in Windows 7 and Windows Server 2008 R2, Microsoft provided administrators with the ability to set rules to allow or deny applications from running,” SecurityWeek explains.

“These rules could be enforced for specific users or groups and could be used for executable files (.exe and .com), scripts (.js, .ps1, .vbs, .cmd and .bat), Windows Installer files (.msi and .msp) and DLL files (.dll and .ocx).”

AppLocker is one of the primary tools in Windows that enforces security. It was introduced to specify which users can run apps within an organization. It has been touted by Microsoft to be of better security than EMET, but Smith’s research revealed it seems to be rather vulnerable to exploits.

This can be done remotely. Smith wrote a PowerShell server to handle execution and return output. The proof of concept can open a backdoor or a reverse shell over HTTP.

The regsvr32 component already has a history of providing backdoors; it was the path used by the NeverQuest banking Trojan. It seems that Smith’s technique provides yet another way for cybercriminals to make their way into Windows.

More from

Cybersecurity dominates concerns among the C-suite, small businesses and the nation

4 min read - Once relegated to the fringes of business operations, cybersecurity has evolved into a front-and-center concern for organizations worldwide. What was once considered a technical issue managed by IT departments has become a boardroom topic of utmost importance. With the rise of sophisticated cyberattacks, the growing use of generative AI by threat actors and massive data breach costs, it is no longer a question of whether cybersecurity matters but how deeply it affects every facet of modern operations.The 2024 Allianz Risk…

Autonomous security for cloud in AWS: Harnessing the power of AI for a secure future

3 min read - As the digital world evolves, businesses increasingly rely on cloud solutions to store data, run operations and manage applications. However, with this growth comes the challenge of ensuring that cloud environments remain secure and compliant with ever-changing regulations. This is where the idea of autonomous security for cloud (ASC) comes into play.Security and compliance aren't just technical buzzwords; they are crucial for businesses of all sizes. With data breaches and cyber threats on the rise, having systems that ensure your…

Adversarial advantage: Using nation-state threat analysis to strengthen U.S. cybersecurity

4 min read - Nation-state adversaries are changing their approach, pivoting from data destruction to prioritizing stealth and espionage. According to the Microsoft 2023 Digital Defense Report, "nation-state attackers are increasing their investments and launching more sophisticated cyberattacks to evade detection and achieve strategic priorities."These actors pose a critical threat to United States infrastructure and protected data, and compromising either resource could put citizens at risk.Thankfully, there's an upside to these malicious efforts: information. By analyzing nation-state tactics, government agencies and private enterprises are…

Topic updates

Get email updates and stay ahead of the latest threats to the security landscape, thought leadership and research.
Subscribe today