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

Evolving red teaming for AI environments

2 min read - As AI becomes more ingrained in businesses and daily life, the importance of security grows more paramount. In fact, according to the IBM Institute for Business Value, 96% of executives say adopting generative AI (GenAI) makes a security breach likely in their organization in the next three years. Whether it’s a model performing unintended actions, generating misleading or harmful responses or revealing sensitive information, in the AI era security can no longer be an afterthought to innovation.AI red teaming is emerging…

What we can learn from the best collegiate cyber defenders

3 min read - This year marked the 19th season of the National Collegiate Cyber Defense Competition (NCCDC). For those unfamiliar, CCDC is a competition that puts student teams in charge of managing IT for a fictitious company as the network is undergoing a fundamental transformation. This year the challenge involved a common scenario: a merger. Ten finalist teams were tasked with managing IT infrastructure during this migrational period and, as an added bonus, the networks were simultaneously attacked by a group of red…

A spotlight on Akira ransomware from X-Force Incident Response and Threat Intelligence

7 min read - This article was made possible thanks to contributions from Aaron Gdanski.IBM X-Force Incident Response and Threat Intelligence teams have investigated several Akira ransomware attacks since this threat actor group emerged in March 2023. This blog will share X-Force’s unique perspective on Akira gained while observing the threat actors behind this ransomware, including commands used to deploy the ransomware, active exploitation of CVE-2023-20269 and analysis of the ransomware binary.The Akira ransomware group has gained notoriety in the current cybersecurity landscape, underscored…

Topic updates

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