Security Market Segment LS
Friday, 04 June 2021 11:38

Malware authors increasingly bypassing scans by Microsoft tool Featured

By
Malware authors increasingly bypassing scans by Microsoft tool Image by Erich Westendarp from Pixabay

Malware authors are crafting their wares to bypass scans on Windows systems altogether, using a number of tricks to avoid being put under the microscope by Microsoft's Antimalware Scan Interface, the global security firm Sophos claims.

Senior threat researcher Sean Gallagher said in a detailed blog post that other methods included the use of obfuscation, encryption and steganography to avoid being outed.

But as Windows 10 and later versions of Windows Server had been increasingly put to use, the evasion of detection was being resorted to more and more.

AMSI, which was introduced in 2015, allows software to communicate with security products seeking scanning of files or memory, or streams of malicious payloads in a vendor-agnostic way, Gallagher explained.

"[It] gives anti-malware software visibility into Microsoft components and applications, including into Windows’ PowerShell engine and script hosts (wscript.exe and cscript.exe), Office document macros, the current .NET Framework (version 4.8), and Windows Management Instrumentation (WMI) – components frequently used in 'living off the land' (LOL) tactics by adversaries and in the execution of 'fileless' malware," he said.

"Windows third-party developers can leverage AMSI with their own applications as well, to allow anti-malware software to check for content passed to them that could turn their applications into 'LOLbins' (living off the land binaries) – applications abused for malicious purposes by malware or network intruders."

One way of avoiding an AMSI scan was to flip the flag on an attribute for PowerShell integration to "true", causing the process in question to stop requesting a scan. However, this was now being blocked as it was an old tactic.

"However, we did detect a recent use of the same bypass that connected to a remote server to obtain a PowerShell-based malware downloader," Gallagher noted. "This one appears to have been part of a Proxy Logon-based attack that attempted to load a Meterpreter backdoor DLL from a server in Russia."

He said about 98% of AMSI bypass attempts tampered with the code of the AMSI library. "In this attack, the malware locates the library AmsiScanBuffer in memory, and then overwrites the instructions at that address with new ones that redirect to an error message," Gallagher explained.

A third method that Gallagher detailed was fooling PowerShell into loading a counterfeit version of the amsi.dll file.

"Create an empty DLL named 'amsi.dll' in a target directory; copy PowerShell.exe to the same directory; launch evil PowerShell script, and AMSI scans attempted by the PowerShell.exe copy will fail because the fake DLL is loaded first," he explained.

"However, Microsoft has since made changes to PowerShell’s code that cause it to crash if the proper interfaces aren’t available in amsi.dll. In order for a DLL hijack of this type to work, the attacker now has to provide a counterfeit DLL with the required interfaces defined."

Finally, Gallagher said a fourth way of evading a scan by AMSI was to downgrade scripting engines to versions that were used before AMSI was available or else staying away from processes that interacted with AMSI altogether.

"Another way to evade AMSI is to bring along a scripting engine that doesn’t support it," he added. "While AMSI will detect anything leveraging the .NET framework, some malicious actors have brought along their own scripting host (such as a NodeJS engine), or have used compiled executables built from other scripting languages (such as Python).

"In extreme cases, we’ve seen attackers bring along entire virtual machines to conceal their scripts from detection. [Windows ransomware] Ragnar Locker, for example, deployed a VirtualBox virtual machine as part of a ransomware attack, concealing its processes from malware scanners entirely."


Subscribe to ITWIRE UPDATE Newsletter here

GRAND OPENING OF THE ITWIRE SHOP

The much awaited iTWire Shop is now open to our readers.

Visit the iTWire Shop, a leading destination for stylish accessories, gear & gadgets, lifestyle products and everyday portable office essentials, drones, zoom lenses for smartphones, software and online training.

PLUS Big Brands include: Apple, Lenovo, LG, Samsung, Sennheiser and many more.

Products available for any country.

We hope you enjoy and find value in the much anticipated iTWire Shop.

ENTER THE SHOP NOW!

INTRODUCING ITWIRE TV

iTWire TV offers a unique value to the Tech Sector by providing a range of video interviews, news, views and reviews, and also provides the opportunity for vendors to promote your company and your marketing messages.

We work with you to develop the message and conduct the interview or product review in a safe and collaborative way. Unlike other Tech YouTube channels, we create a story around your message and post that on the homepage of ITWire, linking to your message.

In addition, your interview post message can be displayed in up to 7 different post displays on our the iTWire.com site to drive traffic and readers to your video content and downloads. This can be a significant Lead Generation opportunity for your business.

We also provide 3 videos in one recording/sitting if you require so that you have a series of videos to promote to your customers. Your sales team can add your emails to sales collateral and to the footer of their sales and marketing emails.

See the latest in Tech News, Views, Interviews, Reviews, Product Promos and Events. Plus funny videos from our readers and customers.

SEE WHAT'S ON ITWIRE TV NOW!

BACK TO HOME PAGE
Sam Varghese

Sam Varghese has been writing for iTWire since 2006, a year after the site came into existence. For nearly a decade thereafter, he wrote mostly about free and open source software, based on his own use of this genre of software. Since May 2016, he has been writing across many areas of technology. He has been a journalist for nearly 40 years in India (Indian Express and Deccan Herald), the UAE (Khaleej Times) and Australia (Daily Commercial News (now defunct) and The Age). His personal blog is titled Irregular Expression.

Share News tips for the iTWire Journalists? Your tip will be anonymous

WEBINARS ONLINE & ON-DEMAND

GUEST ARTICLES

VENDOR NEWS

Guest Opinion

Guest Interviews

Guest Reviews

Guest Research

Guest Research & Case Studies

Channel News

Comments