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.

Attacks/Breaches

6/27/2019
07:15 PM
Connect Directly
Twitter
LinkedIn
RSS
E-Mail
50%
50%

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

Comment  | 
Print  | 
More Insights
Comments
Newest First  |  Oldest First  |  Threaded View
tdsan
50%
50%
tdsan,
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.

Todd
RyanSepe
50%
50%
RyanSepe,
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.
tdsan
50%
50%
tdsan,
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.

Todd
RyanSepe
50%
50%
RyanSepe,
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.
Black Hat Q&A: Hacking a '90s Sports Car
Black Hat Staff, ,  11/7/2019
The Cold Truth about Cyber Insurance
Chris Kennedy, CISO & VP Customer Success, AttackIQ,  11/7/2019
6 Small-Business Password Managers
Curtis Franklin Jr., Senior Editor at Dark Reading,  11/8/2019
Register for Dark Reading Newsletters
White Papers
Video
Cartoon Contest
Write a Caption, Win a Starbucks Card! Click Here
Latest Comment: How do you like our new spear phishing email solution?
Current Issue
7 Threats & Disruptive Forces Changing the Face of Cybersecurity
This Dark Reading Tech Digest gives an in-depth look at the biggest emerging threats and disruptive forces that are changing the face of cybersecurity today.
Flash Poll
Assessing Cybersecurity Risk in Today's Enterprise
Assessing Cybersecurity Risk in Today's Enterprise
Security leaders are struggling to understand their organizations risk exposure. While many are confident in their security strategies and processes, theyre also more concerned than ever about getting breached. Download this report today and get insights on how today's enterprises assess and perceive the risks they face in 2019!
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2019-18881
PUBLISHED: 2019-11-12
WSO2 IS as Key Manager 5.7.0 allows unauthenticated reflected XSS in the dashboard user profile.
CVE-2019-18882
PUBLISHED: 2019-11-12
WSO2 IS as Key Manager 5.7.0 allows stored XSS in download-userinfo.jag because Content-Type is mishandled.
CVE-2019-18873
PUBLISHED: 2019-11-12
FUDForum 3.0.9 is vulnerable to Stored XSS via the User-Agent HTTP header. This may result in remote code execution. An attacker can use a user account to fully compromise the system via a GET request. When the admin visits user information under "User Manager" in the control panel, the pa...
CVE-2019-18874
PUBLISHED: 2019-11-12
psutil (aka python-psutil) through 5.6.5 can have a double free. This occurs because of refcount mishandling within a while or for loop that converts system data into a Python object.
CVE-2019-18862
PUBLISHED: 2019-11-11
maidag in GNU Mailutils before 3.8 is installed setuid and allows local privilege escalation in the url mode.