Skip to main content

CVE-2017-11882 technical analysis

Introduction 

This post explains how to analyse an office RTF document to identify CVE-2017-11882 vulnerability.

Microsoft Equation Editor is a Microsoft Office component, contains a stack buffer overflow vulnerability that enables remote code execution on a vulnerable system. The component was compiled on November 9, 2000, over 17 years ago. Without any further recompilation, it was used in all currently upported versions of Microsoft Office. Microsoft Equation Editor is an out-of-process COM server that is hosted by eqnedt32.exe, meaning it runs as it’s own process and can accept commands from other processes.

Data Execution Prevention (DEP) and Address Space Layout Randomization (ASLR) should protect against such attacks. However, because of the manner in which eqnedt32.exe was linked, it will not use these features, subsequently allowing code execution. Being an out-of-process COM server, protections specific to Microsoft Office such as EMET and Windows Defender Exploit Guard are not applicable to eqnedt32.exe, unless applied system-wide.  This provides the attacker with an avenue to lure targets into opening specially crafted documents, resulting in the ability to execute an embedded attacker command

Tools 
Hash: 080b3a6dc6ddf645f6c156e1561eb0b8

Analysis
Search the file in virustotal (https://www.virustotal.com/) with virustotal-search.py to get an initial idea of  file whether it was detected by any anti-virus vendors. 
 Run rtfdump.py to see the available options, the necessary options to analyze this file have been highlighted. rtfdump.py shows the streams associated with the file
Observe the associated streams with this file and also the vulnerable stream object which invokes Microsoft equation editor EQNEDT32.exe 

View the vulnerable stream with -s option
Observe the stream content is in hexadecimal
Use -H option to decode and render it in ASCII format

Use grep to look for interesting strings or walk through entire stream to look at vulnerable equation editor component
Observe the invocation to get an hta file and execute it. Here the rtf1.txt is file is downloaded using wget to analyse it further. The malicious object can also be dumped using -d option
View the malicious object using cat 
The rtf1.txt is downloaded using wget. The script shows that further it starts powershell in hidden mode to fetch an executable and execute it 

The executable is fetched again using wget and can be analysed offline ( static or dynamic malware analysis). Below is  the has of 888_cr.exe

Hash: e8d4e87d7f31eb396cff677b616e9db6





Comments

Popular posts from this blog

Memory Analysis of WannaCry Ransomware

Introduction  This post explains the memory dump analysis of WannaCry infected system using volatility (An open source memory forensics framework) and other open source tools. It doesn't cover the analysis of initial infection vector, propagation and recovery of infected system. The objective is to leverage memory forensic analysis to uncover and extract Indicators of Compromise (IoC)  WannaCry  WannaCry (or WannaCrypt, WanaCrypt0r 2.0, Wanna Decryptor) is a ransomware program targeting the Microsoft Windows operating system. On Friday, 12 May 2017, a large cyber-attack using it was launched, infecting more than 230,000 computers in 150 countries, demanding ransom payments in the cryptocurrency bitcoin in 28 languages.The attack has been described by Europol as unprecedented in scale. https://en.wikipedia.org/wiki/WannaCry_ransomware_attack Discalimer You are dealing with real malware samples Don’t expose them to internal networks or internet Analyze them in a...
Dionaea – A Malware collection honeypot Introduction  This post outlines the necessary requirements, configurations and step by step installation procedure for honeypot Dionaea. It also briefs the logging of various attacks from external entities and produces the results to a dashboard interface feature for ease of understanding. Dionaea Dionaea is one of the modern malware collection honeypots that’s aimed to trap malware exploiting vulnerabilities exposed by services offered over a network to obtain a copy of malware. Dionaea emulates protocols by embedding python as its scripting language and also detects shellcodes using LibEmu. It also supports IPv6 and TLS. Dionaea traps malware from below mentioned protocols. • SMB (Server Message Block):  • HTTP (Hyper Text Transfer Protocol) • FTP (File Transfer Protocol) • TFTP (Trivial File Transfer Protocol)  • MSSQL (Microsoft SQL Server)  • VoIP (Voice over IP)  Requirements...

Analyze Sysmon for Linux logs using Kusto Query Language

Recently I have come across a situation where I need to install Sysmon on a Linux virtual machine in Azure subscription and analyze those logs in Log analytics workspace. This post is a quick guide to help installing Sysmon and analyzing logs using Kusto query language.  Prerequisites to install Sysmon for Linux  Ensure the Linux virtual machine is on boarded to Log analytics workspace.  Collect Syslog events with Azure Monitor Agent. Install using this Installing Sysmon on Linux  For complete installation process on various .nix operating systems, follow Sysmon installation instructions here    Ubuntu 20.04 & 22.04  Register Microsoft key and feed wget -q https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb  Install SysmonForLinux sudo apt-get update sudo apt-get install sysmonforlinux The Kusto query to parse the Sysmon logs on a Li...