Loki malware, built to steal credentials, is distributed via Microsoft Excel and other Office applications rigged with malicious 'scriptlets' to evade detection.

Kelly Sheridan, Former Senior Editor, Dark Reading

December 19, 2017

4 Min Read

A stealthy new attack distributes Loki malware in Microsoft Excel spreadsheets and other Office applications.

The attack, which was discovered by Lastline Labs, is tough to detect in its early stages. It bypasses traditional antivirus and is often dismissed as a false positive because it relies on malicious "scriptlets" that are added to Office files using external links.

Earlier this month, Lastline published findings on a malicious Excel file with the ability to download and execute malware. They saw no evidence of macros, shellcode, or DDE functionality, and it showed a low detection on Virustotal, which typically indicates it's either an unknown technique or a false positive.

Less than two weeks later, the malicious Excel scriptlet-laden spreadsheet garnered 12 detections on Virustotal across 60 AV tools, a sign it went from false positive to potential infection.

"One of the things [researchers] saw was a spike in Microsoft Office documents, Excel spreadsheets that were calling back and downloading a new payload without the use of any sort of macros or shell code," explains Andy Norton, director of intelligence at Lastline. "We found criminal groups were embedding URLs in scriptlets inside Office documents and using that as a method of evading detection."

When victims open a malicious Excel file they are prompted to update the workbook's external links, an Office feature that lets authors reference external resources rather than embedding them directly. This keeps files small and easier to update. Unfortunately, external links can reference malicious scriptlets and deliver payloads without leveraging traditional delivery methods.

In this case, Excel scriptlets are delivering Loki, a type of malware known for exfiltrating usernames and passwords. The password stealer is designed to take credentials from software including email clients, browsers, FTP clients, and file management clients.

"What we're witnessing is an evolution in how bad guys are going to put malicious payloads into organizations," says Norton. "We've seen that a lot of the samples of what we've collected are not known to Virustotal."

The malicious files arrive via standard email. Once credentials have been lifted, Loki displays to attackers which websites are vulnerable to identity theft. This could include social media sites, payment portals, or bitcoin wallets.

This attack exploist CVE-2017-0199, a Microsoft Office/WordPad RCE security vulnerability with Windows API, which was patched in April 2017 and updated in September. The flaw exists in the way that Office and WordPad parse specially crafted files. Exploitation requires a victim to open or preview a malicious file. An attacker could install programs, view or edit data, or create accounts with full user rights. Norton says while attackers could move across the internal environment, the primary goal here is to steal credentials from the target victim's system.

'Double Whammy'

Lastline calls this vector a "double whammy" for security response teams because it aims to both evade detection and correct remediation. The attack vector's low detection rate leads to the assumption it's a false positive. However, even if businesses discover the threat is Loki, most don't correctly address the problem. Attackers know this.

The guidance around remediation for generic Trojans is to "reinstall a backup" or "reimage and start fresh," Norton explains. "Now if you do that, Loki's won. There's nothing in remediation advice about changing all the passwords on the systems."

"It's important to get clear information about the capabilities and capacity of the threat," he continues. "If you don't, you're making yourselves vulnerable to a secondary stage of attack where credentials are used to get back into the environment."

Norton says victims can tell they've been hit if they understand the behaviors of the attack, something he says is "becoming increasingly vital." Behavioral analysis platforms can help here, he notes. For those who have been hit, he advises reimaging and resetting all passwords.

Lastline's work is a "live research project," he says, so expect more updates. On Friday, the researchers discovered payload distribution was changed to a website that had been linked to an Iranian botnet attack in May 2017. About five different threat groups have been using this particular payload, Norton notes, and they likely come from all over the globe.

Related Content:

About the Author(s)

Kelly Sheridan

Former Senior Editor, Dark Reading

Kelly Sheridan was formerly a Staff Editor at Dark Reading, where she focused on cybersecurity news and analysis. She is a business technology journalist who previously reported for InformationWeek, where she covered Microsoft, and Insurance & Technology, where she covered financial services. Sheridan earned her BA in English at Villanova University. You can follow her on Twitter @kellymsheridan.

Keep up with the latest cybersecurity threats, newly discovered vulnerabilities, data breach information, and emerging trends. Delivered daily or weekly right to your email inbox.

You May Also Like


More Insights