Security

Research

Bad apps bypass Windows security alerts for six years using newly unveiled trick

Windows SmartScreen and Smart App Control both have weaknesses of which to be wary


Elastic Security Labs has lifted the lid on a slew of methods available to attackers who want to run malicious apps without triggering Windows' security warnings, including one in use for six years.

The research focused on ways to bypass Windows SmartScreen and Smart App Control (SAC), the go-to built-in protections against running potentially nasty software downloaded from the web in Windows 8 and 11 respectively.

Among the techniques uncovered by Joe Desimone, tech lead at Elastic, was one he dubbed "LNK Stomping," a bug in the way Windows shortcut files (.LNK) are handled that nullifies Windows' Mark of the Web (MotW) – a digital tag placed on downloaded files that could be malicious if executed.

SmartScreen only scans files that are tagged with MotW and SAC is set up to block certain file types if they're marked, so any method that can circumvent MotW will naturally be a boon to malware miscreants.

This is far from the first MotW bypass technique that's been introduced over the years, but the fact it has been in use for so long and, as Desimone said, is "trivial" to exploit, makes it worth defenders taking some time to understand how it works.

But that's all that is on offer so far: understanding. The researcher said Elastic engaged Microsoft about mitigation and the tech giant said the it might be fixed at a later date – no patching promises here.

This "trivial" technique involves crafting LNK files with non-standard target paths or internal structures. This forces Windows Explorer to correct these small errors before launching the malicious app, but in the process of correcting these errors, MotW is removed, which means SmartScreen and SAC don't flag it as malicious.

Desimone said the easiest way to trigger this bug is to simply append a period or a space somewhere in the target executable path. Something like target.exe. would work, as would .\target.exe, for example.

Windows Explorer then recognizes the error in the target path and searches for the real executable, corrects the target path, and updates the file which in turn removes MotW.

"We identified multiple samples in VirusTotal that exhibit the bug, demonstrating existing in the wild usage," said Desimone. "The oldest sample identified was submitted over six years ago. 

"We also disclosed details of the bug to the MSRC. It may be fixed in a future Windows update. We are releasing this information, along with detection logic and countermeasures, to help defenders identify this activity until a patch is available."

In the meantime, security pros are advised to adjust their detection engineering in line with the coverage gaps that are on display by SmartScreen and SAC.

Other bypasses

SmartScreen and SAC are both reputation-based protections, and the historically tried and tested, yet difficult to execute, method of bypassing these was to sign a malicious app with a code-signing certificate.

In theory, these should be difficult to acquire given that certificate authorities should only be issuing these to legitimate businesses, although it's still very much a viable practice.

Desimone also highlighted a number of other methods for bypassing reputation-based protections, including one technique he called Reputation Hijacking, which involves identifying an existing program with a good reputation and meddling with it for malicious means.

The researcher said script hosts are ideal for this kind of attack, although any app that's controlled without any common line parameters would work. If it includes a foreign function interface (FFI) capability, even better, because this can be used to load bad code into memory. Lua, Node.js, and AutoHotkey interpreters are ideal targets for repurposing here, he said.

Reputation Seeding appears to work best with SAC. SmartScreen sets a higher threshold before trusting an application, Desimone said. This attack involves an attacker dropping a binary that appears trustworthy but can be exploited at a later time, such as when certain conditions are met. It could also contain a vulnerability an attacker can exploit later on, for example.

Lastly, Desimone said Reputation Tampering is also an option. This method involves carefully changing specific code sections of apps that are deemed benign by SAC in a way that lends support for an attack, all while maintaining their benign reputation.

"Through trial and error, we could identify segments that could be safely tampered with and keep the same reputation. We crafted one tampered binary with a unique hash that had never been seen by Microsoft or SAC. This embedded an 'execute calc' shellcode and could be executed with SAC in enforcement mode," the Elastic tech lead said. ®

Send us news
16 Comments

Microsoft trims more CPUs from Windows 11 compatibility list

OEMs blowing dust from the processor stock cupboard, beware

Under Trump 2.0, Europe's dependence on US clouds back under the spotlight

Technologist Bert Hubert tells The Reg Microsoft Outlook is a huge source of geopolitical risk

Microsoft's updated Windows battery indicator rollout runs out of juice

How hard can it be to add colors and percentages?

Your days of driver sync via Windows Server Update Services are numbered

Microsoft suggests a move to the cloud

Why did the Windows 95 setup use Windows 3.1?

If MS-DOS could play Doom, surely a battleship gray button was a possibility?

XCSSET macOS malware returns with first new version since 2022

Known for popping zero-days of yesteryear, Microsoft puts Apple devs on high alert

Snake Keylogger slithers into Windows, evades detection with AutoIt-compiled payload

Because stealing your credentials, banking info, and IP just wasn’t enough

Microsoft declutters Windows 11 File Explorer in the name of Euro privacy

Also hammers another nail into Cortana's coffin with the end of Location History

Windows 7 lives! How to keep your favorite fossil running

You probably shouldn't, but if you must, you can

Malware variants that target operational tech systems are very rare – but 2 were found last year

Fuxnet and FrostyGoop were both used in the Russia-Ukraine war

Windows 11 24H2 goes back to the drawing board over AutoCAD 2022 glitch

Safeguard hold applied after designer darling borked by problematic update

Microsoft names alleged credential-snatching 'Azure Abuse Enterprise' operators

Crew helped lowlifes generate X-rated celeb deepfakes using Redmond's OpenAI-powered cloud – claim