Dark Reading is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


07:15 PM
Connect Directly

New Exploit for Microsoft Excel Power Query

Proof-of-concept, which allows remote code execution, is latest to exploit Dynamic Data Exchange (DDE) and is another reminder why organizations must ensure Office settings are secure.

Organizations now have one more reason to pay attention to the security settings of their Microsoft Office applications.

Researchers at Mimecast have developed a working proof of concept that shows how attackers can use a legitimate function in Microsoft Excel called Power Query to remotely drop and run malware on a user's system to escalate privileges and other malicious activity.

Such attacks can be hard to detect and could allow attackers to load payloads into Excel spreadsheets directly from the Web or other external source when the document is opened, Mimecast said. Because Power Query is a very powerful feature, the potential for the issue to be abused is great, according to the security vendor.

Mimecast's exploit is the latest involving Dynamic Data Exchange (DDE), a protocol that allows Microsoft applications that use shared memory to exchange data and messages with each other. In the past, researchers and advanced threat groups have demonstrated how DDE can be exploited within Word and other Microsoft Office apps to distribute malware, escalate local privileges, and enable other malicious activity.

In response, Microsoft issued guidance in January 2018 recommending that organizations disable the DDE feature where it is not needed to block external data connections. The company has also noted that for DDE exploits to work, a user would need to click through multiple security prompts. Warnings are displayed on all currently supported Excel versions before loading external data and before executing a command from a DDE formula.

But Meni Farjon, chief scientist of advanced threat detection at Mimecast, says it's unclear how many organizations are following the advice. "It is unlikely that many organizations have disabled it," he says.

The default setting is for DDE to be enabled, which means an organization is vulnerable to exploits targeting the protocol, he says. "It is hard to say that organizations have disabled this feature because some of them rely on these Excel features."

DDE and Social Engineering
Mimecast's new exploit shows how attackers can use Power Query to launch a remote DDE attack in an Excel spreadsheet.

Power Query is a feature in Excel that lets users to connect their spreadsheets with other structured and unstructured data sources, including web pages, text files, databases, Active Directory, Exchange, Hadoop, and even Facebook. It's one of three data analysis tools available with Excel and allows users to discover, combine, and refine their data in various ways.

Mimecast researchers discovered that Power Query's ability to link spreadsheets to other sources and load data from them into an Excel spreadsheet could be abused relatively easily to launch sophisticated and hard-to-detect attacks. "Using Power Query, attackers could embed malicious content in a separate data source, and then load the content into the spreadsheet when it is opened," the company said in an advisory Thursday.

Mimecast's proof of concept shows how an external web page hosting a malicious payload can be loaded into an Excel spreadsheet. "An attacker just needs to open up an Excel document and follow a few clicks to create the issue — no reverse engineering, no hex editing, no memory abuse," Farjon says.

For an attack to work, a threat actor would need to send a crafted Excel file to the victim via a phishing email or use some other social engineering tactic to get that person to open the document. At that point, the document would make a query or request for the malicious payload hosted on the web page. 

Antivirus tools wouldn't spot the crafted file as being malicious because the payload would not be embedded in it. And attackers could ensure the payload bypasses antivirus and sandboxing controls when being loaded from the external web page by adding a specific HTTP header in the request, Mimecast said.

"It is very easy and fast to craft, so it makes it viable for both opportunistic and high-scale attacks," Farjon says. A user, however, would need to click on a warning box in order to enable the remote content, he adds. "This isn't a configuration issue since it is enabled by default. It's a security issue rather than a security vulnerability, as per Microsoft," he says.

Microsoft itself pointed to its previous guidance around DDE in response to Mimecast's new exploit. "For this technique to work, a victim would need to be socially engineered to bypass multiple security prompts prior to loading external data or executing a command from a DDE formula," a spokeswoman said in an emailed statement.

Related Content:


Black Hat USA returns to Las Vegas with hands-on technical Trainings, cutting-edge Briefings, Arsenal open-source tool demonstrations, top-tier security solutions, and service providers in the Business Hall. Click for information on the conference and to register.


Jai Vijayan is a seasoned technology reporter with over 20 years of experience in IT trade journalism. He was most recently a Senior Editor at Computerworld, where he covered information security and data privacy issues for the publication. Over the course of his 20-year ... View Full Bio

Recommended Reading:

Comment  | 
Print  | 
More Insights
Newest First  |  Oldest First  |  Threaded View
User Rank: Ninja
6/30/2019 | 2:57:58 PM
Re: More often then not
Yep, there is actually an aspect of Linux that a number of professionals don't use, it is called SeLinux Policies. This works very well from the filesystem, bin files, and application exploitation.

This something the IT Security consultant should be aware and knowledgeable as well - https://web.mit.edu/rhel-doc/5/RHEL-5-manual/Deployment_Guide-en-US/rhlcommon-chapter-0001.html
Quote - The SELinux policy defines various rules which determine how each domain may access each type. Only what is specifically allowed by the rules is permitted. By default, every operation is denied and audited, meaning it is logged in the $AUDIT_LOG file. In Red Hat Enterprise Linux, this is set to /var/log/messages. The policy is compiled into binary format for loading into the kernel security server, and each time the security server makes a decision, it is cached in the AVC to optimize performance.

Auditing at the filesystem, file execution and kernel layer. In addition, if a file entered into the filesystem, this would be identified and not allowed to process because it is not part of the SeLinux profile.

User Rank: Ninja
6/30/2019 | 7:58:34 AM
Re: More often then not
Yes definitely get the point and concur 100%. Thanks for the inclusion of Linux based variants. It adds the juxtaposing perspective to this situation.
User Rank: Ninja
6/28/2019 | 9:23:29 PM
Re: More often then not

More often then not, I notice that organizations are wrapped up in patching for vulnerabilities but not so adamant about system hardening. Items relating to locking down applications through GPO. This would definitely fall under that category.

Excellent, I agree with you from this point. I do think this is good from a Windows standpoint (GPOs are the way to go along with implementing SIEM, NGFW (Next Generation Firewalls, Micro-Segmentation):
  • Sample code written using PowerShell/Json to address some of the security issues associated with Windows (this is an example that can be pushed out to machines as well, GPOs are more efficient, this will help with one offs)
    Write-Host " "
    Write-Host "LSA Registry Entries"
    Write-Host "--------------------"
    Write-Host " "
    $lsa = '{"registry":[
        {"Entry":"auditbaseobjects", "Value":"1", "Type":"Dword"},
        {"Entry":"auditbasedirectories", "Value":"1", "Type":"Dword"},
        {"Entry":"LmCompatibilityLevel", "Value":"4", "Type":"Dword"},
        {"Entry":"restrictanonymous", "Value":"1", "Type":"Dword"},
        {"Entry":"restrictanonymoussam", "Value":"1", "Type":"Dword"},
        {"Entry":"LimitBlankPasswordUse", "Value":"1", "Type":"Dword"},
        {"Entry":"SecureBoot", "Value":"1", "Type":"Dword"}
    $path = "HKLM:\System\CurrentControlSet\Control\Lsa"
    $regobj = ConvertFrom-Json -InputObject $lsa
    $regobjects = $regobj.registry
    foreach ( $i in $regobjects ) {
        $val = Get-ItemPropertyValue -Path $path -Name $i.Entry -ErrorAction SilentlyContinue
        if ( (Test-Path $path) -and ($i.Value -eq $val ) ) {
            Write-Host $i.Entry "registry value - ok"
        } else {
            #New-Item -path $path -Name $i.Entry -Value $i.Value -Type Dword
            $chg = Set-ItemProperty -Path $path -Name $i.Entry -Value $i.Value -Type $i.Type -Force
            $names = Get-ItemPropertyValue -Path $path -Name $i.Entry
            Write-Host $i.Entry "modified registry entry: " $names


Linux security concepts to address some of the IT security issues (these are just examples but it is good to know)
  • Libre Office needs to be reviewed to see if the same vulnerabilities exist (when editing an excel spreadsheet)
  • Remove unused accounts (Windows & Linux)
  • Configure SELinux policies to check filesystem and executables (binaries)
  • Configure iptables and chains, ufw helps with this process
  • Encrypt /home/* folders and other necessary files
  • Enable IPv6 to be the primary protocol used over the Internet (IPSec VPN AES256)
  • Use logwatch to view the logs on the system and send notifications daily or weekly
  • Email - use pgp as part of the email security solution - https://bit.ly/2LoOxta
  • Create PEM keys to allow for secured access to ssh with authorized _keys file
  • Reduce the number of running applications, uninstall unnecessary applications
  • Create a gold-standard of the OS where Puppet/Chef/Satellite Server can help with the updates
  • Configure crontab to schedule updates to the system
  • Implement NMS & Security system to monitor the internal workings and log files
  • Install chkrootkit & rkhunter trojan tools
  • Ensure continuous monitoring tools are running to address any cyber-shortcomings
  • Enable SIEM, ML, AV, and training to thwart potential threats or vulnerabilities

There are other steps that I have left out but this was off the top of my head.

I think you get the point.

User Rank: Ninja
6/28/2019 | 9:44:17 AM
More often then not
More often then not, I notice that organizations are wrapped up in patching for vulnerabilities but not so adamant about system hardening. Items relating to locking down applications through GPO. This would definitely fall under that category.
When It Comes To Security Tools, More Isn't More
Lamont Orange, Chief Information Security Officer at Netskope,  1/11/2021
US Capitol Attack a Wake-up Call for the Integration of Physical & IT Security
Seth Rosenblatt, Contributing Writer,  1/11/2021
IoT Vendor Ubiquiti Suffers Data Breach
Dark Reading Staff 1/11/2021
Register for Dark Reading Newsletters
White Papers
Current Issue
2020: The Year in Security
Download this Tech Digest for a look at the biggest security stories that - so far - have shaped a very strange and stressful year.
Flash Poll
Assessing Cybersecurity Risk in Today's Enterprises
Assessing Cybersecurity Risk in Today's Enterprises
COVID-19 has created a new IT paradigm in the enterprise -- and a new level of cybersecurity risk. This report offers a look at how enterprises are assessing and managing cyber-risk under the new normal.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
PUBLISHED: 2021-01-15
An issue was discovered in Malwarebytes before 4.0 on macOS. A malicious application was able to perform a privileged action within the Malwarebytes launch daemon. The privileged service improperly validated XPC connections by relying on the PID instead of the audit token. An attacker can construct ...
PUBLISHED: 2021-01-15
Docker Desktop Community before on macOS mishandles certificate checking, leading to local privilege escalation.
PUBLISHED: 2021-01-15
OneDev is an all-in-one devops platform. In OneDev before version 4.0.3, there is a critical vulnerability which can lead to pre-auth remote code execution. AttachmentUploadServlet deserializes untrusted data from the `Attachment-Support` header. This Servlet does not enforce any authentication or a...
PUBLISHED: 2021-01-15
OneDev is an all-in-one devops platform. In OneDev before version 4.0.3, AttachmentUploadServlet also saves user controlled data (`request.getInputStream()`) to a user specified location (`request.getHeader("File-Name")`). This issue may lead to arbitrary file upload which can be used to u...
PUBLISHED: 2021-01-15
OneDev is an all-in-one devops platform. In OneDev before version 4.0.3, the REST UserResource endpoint performs a security check to make sure that only administrators can list user details. However for the `/users/` endpoint there are no security checks enforced so it is possible to retrieve ar...