Skip to content

Commit 3cd287d

Browse files
committed
Update the MS17-010 scanner to use dcerpc_getarch
1 parent 8e4b007 commit 3cd287d

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

modules/auxiliary/scanner/smb/smb_ms17_010.rb

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
##
55

66
class MetasploitModule < Msf::Auxiliary
7+
include Msf::Exploit::Remote::DCERPC
78
include Msf::Exploit::Remote::SMB::Client
89
include Msf::Exploit::Remote::SMB::Client::Authenticated
910

@@ -50,7 +51,8 @@ def initialize(info = {})
5051

5152
register_options(
5253
[
53-
OptBool.new('CHECK_DOPU', [true, 'Check for DOUBLEPULSAR on vulnerable hosts', true])
54+
OptBool.new('CHECK_DOPU', [true, 'Check for DOUBLEPULSAR on vulnerable hosts', true]),
55+
OptBool.new('CHECK_ARCH', [true, 'Check for architecture on vulnerable hosts', true])
5456
])
5557
end
5658

@@ -76,12 +78,23 @@ def run_host(ip)
7678
vprint_status("Received #{status} with FID = 0")
7779

7880
if status == "STATUS_INSUFF_SERVER_RESOURCES"
79-
print_good("Host is likely VULNERABLE to MS17-010! (#{simple.client.peer_native_os})")
81+
os = simple.client.peer_native_os
82+
83+
if datastore['CHECK_ARCH']
84+
case dcerpc_getarch
85+
when ARCH_X86
86+
os << ' x86 (32-bit)'
87+
when ARCH_X64
88+
os << ' x64 (64-bit)'
89+
end
90+
end
91+
92+
print_good("Host is likely VULNERABLE to MS17-010! - #{os}")
8093
report_vuln(
8194
host: ip,
8295
name: self.name,
8396
refs: self.references,
84-
info: 'STATUS_INSUFF_SERVER_RESOURCES for FID 0 against IPC$ -- (#{simple.client.peer_native_os})'
97+
info: "STATUS_INSUFF_SERVER_RESOURCES for FID 0 against IPC$ - #{os}"
8598
)
8699

87100
# vulnerable to MS17-010, check for DoublePulsar infection

0 commit comments

Comments
 (0)