Malware gang uses .NET library to generate Excel docs that bypass security checks


A newly discovered malware gang is using a clever trick to create malicious Excel files that have low detection rates and a higher chance of evading security systems.

Discovered by security researchers from NVISO Labs, this malware gang — which they named Epic Manchego — has been active since June, targeting companies all over the world with phishing emails that carry a malicious Excel document.

But NVISO said these weren’t your standard Excel spreadsheets. The malicious Excel files were bypassing security scanners and had low detection rates.

Malicious Excel files were compiled with EPPlus

According to NVISO, this was because the documents weren’t compiled in the standard Microsoft Office software, but with a .NET library called EPPlus.

Developers typically use this library part of their applications to add “Export as Excel” or “Save as spreadsheet” functions. The library can be used to generate files in a wide variety of spreadsheet formats, and even supports Excel 2019.

NVISO says the Epic Manchego gang appears to have used EPPlus to generate spreadsheet files in the Office Open XML (OOXML) format.

OOXML spreadsheet files lack a portion of compiled VBA code, specific to Excel documents compiled in Microsoft’s proprietary Office software.

Some antivirus products and email scanners specifically look for this portion of VBA code to search for possible signs of malicious Excel docs, which would explain why spreadsheets generated by the Epic Manchego gang had lower detection rates than other malicious Excel files.

This blob of compiled VBA code is usually where an attacker’s malicious code would be stored. However, this doesn’t mean the files were clean. NVISO says that the Epic Manchego simply stored their malicious code in a custom VBA code format, in another part of the document. This code was also password-protected to prevent security systems and researchers from analyzing its content.

password-prompt-vba-project.png

Image: NVISO

But despite using a different method to generate their malicious Excel documents, the EPPlus-based spreadsheet files still worked like any other Excel document. 

Active since June

The malicious documents (also called maldocs) still contained a malicious macro script. If users who opened the Excel files allowed the script to execute (by clicking the “Enable editing” button), the macros would download and install malware on the victim’s systems.

The final payloads were classic infostealer trojans like Azorult, AgentTesla, Formbook, Matiex, and njRat, which would dump passwords from the user’s browsers, emails, and FTP clients, and sent them to Epic Machengo’s servers.

While the decision to use EPPlus to generate their malicious Excel files might have had some benefits, in the beginning, it also ended up hurting Epic Manchego in the long run, as it allowed the NVISO team to very easily detect all their past operations by searching for odd-looking Excel documents.

In the end, NVISO said it discovered more than 200 malicious Excel files linked to Epic Manchego, with the first one dating back to June 22, this year.

manchego-timeline.png

Image: NVISO

NVISO says this group appears to be experimenting with this technique, and since the first attacks, they have increased both their activity and the sophistication of their attacks, suggesting this might see broader use in the future.

Nevertheless, NVISO researchers weren’t totally surprised that malware groups are now using EPPlus.

“We are familiar with this .NET library, as we have been using it since a couple of years to create malicious documents (“maldocs”) for our red team and penetration testers,” the company said.

Indicators of compromise and a technical breakdown of the malicious EPPlus-rendered Excel files are available in NVISO Labs’ Epic Manchego report.

Recent Articles

AWS vs Azure vs Google Cloud certification for pros

AWS (Amazon Web Services), Microsoft Azure, and Google Cloud are the three biggest cloud platforms used by businesses around the world. Professionals looking...

CentOS 8 OpenVZ image | Web Hosting Talk

I open this topic to ask for help, im a freelancer right now but i allways tested new things in server and vps...

US government’s ban on WeChat blocked by court

A couple of weeks ago, the Trump administration had announced that downloads for WeChat platform will be banned in the United States from...

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here

Stay on op - Ge the daily news in your inbox

[tdn_block_newsletter_subscribe input_placeholder=”Email address” btn_text=”Subscribe” tds_newsletter2-image=”730″ tds_newsletter2-image_bg_color=”#c3ecff” tds_newsletter3-input_bar_display=”” tds_newsletter4-image=”731″ tds_newsletter4-image_bg_color=”#fffbcf” tds_newsletter4-btn_bg_color=”#f3b700″ tds_newsletter4-check_accent=”#f3b700″ tds_newsletter5-tdicon=”tdc-font-fa tdc-font-fa-envelope-o” tds_newsletter5-btn_bg_color=”#000000″ tds_newsletter5-btn_bg_color_hover=”#4db2ec” tds_newsletter5-check_accent=”#000000″ tds_newsletter6-input_bar_display=”row” tds_newsletter6-btn_bg_color=”#da1414″ tds_newsletter6-check_accent=”#da1414″ tds_newsletter7-image=”732″ tds_newsletter7-btn_bg_color=”#1c69ad” tds_newsletter7-check_accent=”#1c69ad” tds_newsletter7-f_title_font_size=”20″ tds_newsletter7-f_title_font_line_height=”28px” tds_newsletter8-input_bar_display=”row” tds_newsletter8-btn_bg_color=”#00649e” tds_newsletter8-btn_bg_color_hover=”#21709e” tds_newsletter8-check_accent=”#00649e” embedded_form_code=”YWN0aW9uJTNEJTIybGlzdC1tYW5hZ2UuY29tJTJGc3Vic2NyaWJlJTIy” tds_newsletter=”tds_newsletter1″ tds_newsletter3-all_border_width=”2″ tds_newsletter3-all_border_color=”#e6e6e6″ tdc_css=”eyJhbGwiOnsibWFyZ2luLWJvdHRvbSI6IjAiLCJib3JkZXItY29sb3IiOiIjZTZlNmU2IiwiZGlzcGxheSI6IiJ9fQ==” tds_newsletter1-btn_bg_color=”#0d42a2″ tds_newsletter1-f_btn_font_family=”406″ tds_newsletter1-f_btn_font_transform=”uppercase” tds_newsletter1-f_btn_font_weight=”800″ tds_newsletter1-f_btn_font_spacing=”1″ tds_newsletter1-f_input_font_line_height=”eyJhbGwiOiIzIiwicG9ydHJhaXQiOiIyLjYiLCJsYW5kc2NhcGUiOiIyLjgifQ==” tds_newsletter1-f_input_font_family=”406″ tds_newsletter1-f_input_font_size=”eyJhbGwiOiIxMyIsImxhbmRzY2FwZSI6IjEyIiwicG9ydHJhaXQiOiIxMSIsInBob25lIjoiMTMifQ==” tds_newsletter1-input_bg_color=”#fcfcfc” tds_newsletter1-input_border_size=”0″ tds_newsletter1-f_btn_font_size=”eyJsYW5kc2NhcGUiOiIxMiIsInBvcnRyYWl0IjoiMTEiLCJhbGwiOiIxMyJ9″ content_align_horizontal=”content-horiz-center”]