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

AI decision-making: Where do businesses draw the line?

4 min read - "A computer can never be held accountable, therefore a computer must never make a management decision."- IBM Training Manual, 1979Artificial intelligence (AI) adoption is on the rise. According to the IBM Global AI Adoption Index 2023, 42% of enterprises have actively deployed AI, and 40% are experimenting with the technology. Of those using or exploring AI, 59% have accelerated their investments and rollouts over the past two years. The result is an uptick in AI decision-making that leverages intelligent tools…

When ransomware kills: Attacks on healthcare facilities

4 min read - As ransomware attacks continue to escalate, their toll is often measured in data loss and financial strain. But what about the loss of human life? Nowhere is the ransomware threat more acute than in the healthcare sector, where patients’ lives are literally on the line.Since 2015, there has been a staggering increase in ransomware attacks on healthcare facilities. And the impacts are severe: Diverted emergency services, delayed critical treatments and even fatalities. Meanwhile, the pledge some ransomware groups made during…

AI and cloud vulnerabilities aren’t the only threats facing CISOs today

6 min read - With cloud infrastructure and, more recently, artificial intelligence (AI) systems becoming prime targets for attackers, security leaders are laser-focused on defending these high-profile areas. They’re right to do so, too, as cyber criminals turn to new and emerging technologies to launch and scale ever more sophisticated attacks.However, this heightened attention to emerging threats makes it easy to overlook traditional attack vectors, such as human-driven social engineering and vulnerabilities in physical security.As adversaries exploit an ever-wider range of potential entry points…

Topic updates

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