Last Updated: 2019-07-21 10:26:48 UTC
by Didier Stevens (Version: 1)
This is a maldoc analysis submitted by reader Ahmed Elshaer.
I have come across a malicious rtf file that can be found here. I have started investigating it as usual using Didier Tool rtfdump.
As you can see it have a lot of nested strings, and only one of the strings had a control word of an object although it was not marked by as object 'O'.
By selecting the object 157 and hex decoding the output, we can see that this object is calling Equation Editor EQNEDT32.EXE, which is another Microsoft component.
We can see all the strings in that object.
I tried to run this rtf file on a sandbox to see what this object can do, I found that it uses a Stack buffer overflow vulnerability in Equation Editor which is referenced CVE-2017-11882 this Vulnerability allow it to run code, like here to downloaded a vbscript which contains a powershell encoded base64 command. This code was downloaded from pastebin.
This Powershell encoded command here can be decoded using base64dump.
And we can see it gets downloaded as svchost.exe which then will be executed as you can see in the VBScript.
Exploit Poc: https://github.com/embedi/CVE-2017-11882