The ubiquity of Microsoft Office document formats means attackers will continue to use them to spread malware and infect systems.

The use of malicious macros to infect Windows systems grew significantly in the past year, as attackers found ways to bypass — or convince users to click through — the warnings meant to defend systems.

The latest scheme to infect computer systems uses an old-school lure: a receipt. Reminiscent of technical-support scams, the recent BazarCall campaign spams out a variety of invoices or receipts that essentially claim the target will be charged tens or hundreds of dollars for a subscription or product and to call a given number if the recipients wants to opt out, says Chester Wisniewski, principal research scientist for anti-malware firm Sophos.

"You then get connected to an Indian call center, where a person directs you to a Web site to download an infected Word document with a macro and talks you through enabling the macros," he says. "And because of that human element, I'm suspecting that they are getting a higher success rate."

Microsoft Office documents with malicious macros — often called "maldocs" — have resurged as a vector to infect systems, growing in the last half of 2020 to account for more than a third of malicious attachments and, at one point in September 2020, accounting for almost 80% of malicious attachments, according to data from Sophos.

Macros have had a long history of use by attackers, with many early viruses and worms — including the Melissa virus — using Office documents with malicious macros to spread. Both Microsoft Word documents and Excel spreadsheets are equally popular among attackers, and modern cybercrime services allow attackers to easily create maldocs. Some macros even allow attacks on the MacOS.

Old tricks still work as well, such as the hard-coded password "VelvetSweatshop" that allows malicious Excel spreadsheets to be encrypted so they can bypass many antivirus engines.

"As endpoint protection tools get better at identifying these more modern exploits, which usually involve a script that has been embedded into the document, maldoc creators seem to have dug deep to find a very, very old bug that helps conceal the macros or other malicious content in the documents," Sophos states in its latest threat report.

The obvious solution is to do away with executable content in documents — a simple way of reducing the attack surface area of your typical office worker. However, macros are still widely used in many business environments, Wisniewski says.

"If you asked me a few years ago [whether we need macros], I would have said no, but then I said that publicly, and I was quickly corrected by about 10,000 people who rely on macros, apparently," he says. "Given that I don't do any 'real work,' which is what I was told at the time by people who use macros, I don't have a need for my Excel to dynamically pull content from a SQL database to update my spreadsheet with the latest sales numbers."

Plenty of workers do, and many companies rely on macros — and specifically Microsoft Office macros.

That makes attempting to limit the use of macros impractical, says Kilian Englert, technical manager at cybersecurity firm Varonis.

"It would be great if we could say, 'No macros at all, ever,' but practically speaking there are a lot of use cases where disabling them outright is tough," he says. "Microsoft is nice and they give you the warning on there, asking if you want to do this, so it comes down to how good is the social engineering."

Signed macros can help but require a more mature IT security team, he adds.

Updating Office will also help minimize the surface area, but while many companies and computer users update Microsoft Windows every month on Patch Tuesday, often Office remains unpatched for longer periods.

Overall, security awareness training may be the best way to harden the workforce against running macros. Microsoft has already added warnings by default to any attempt to run unsigned macros, but users can still accept macros and run them.

Unfortunately, attackers are getting better at social engineering and finding ways to convince users to circumvent security to increase their success rate. The technical-support scam is the latest attempt to turn credulous users into beachheads into networks.

Yet the simple fact that allowing executable content to hitch a ride with common documents means users will have to be on watch and security firms will have to come up with better solutions, says Varonis's Englert.

"Maybe we could see a shift in the industry or a shift in the use of it. We could really demand an alternative," he says. "Mistakes happen, and we shouldn't ascribe blame to the end user. It is our job as security professionals to give them the best defenses that we can and then have tools to defend them."

About the Author(s)

Robert Lemos, Contributing Writer

Veteran technology journalist of more than 20 years. Former research engineer. Written for more than two dozen publications, including CNET News.com, Dark Reading, MIT's Technology Review, Popular Science, and Wired News. Five awards for journalism, including Best Deadline Journalism (Online) in 2003 for coverage of the Blaster worm. Crunches numbers on various trends using Python and R. Recent reports include analyses of the shortage in cybersecurity workers and annual vulnerability trends.

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