Skip to content

Commit 45401bf

Browse files
committed
Land rapid7#7069, modify check codes in multiple local exploits
2 parents 82e092c + 0f8efec commit 45401bf

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

modules/exploits/windows/local/bthpan.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def exploit
145145
fail_with(Failure::None, 'Session is already elevated')
146146
end
147147

148-
unless check == Exploit::CheckCode::Vulnerable
148+
if check == Exploit::CheckCode::Safe
149149
fail_with(Failure::NotVulnerable, "Exploit not available on this system")
150150
end
151151

modules/exploits/windows/local/mqac_write.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ def exploit
115115

116116
# Running on Windows XP versions that aren't listed in the supported list
117117
# results in a BSOD and so we should not let that happen.
118-
return unless check == Exploit::CheckCode::Appears
118+
if check == Exploit::CheckCode::Safe
119+
fail_with(Failure::NotVulnerable, "Exploit not available on this system")
120+
end
119121

120122
base_addr = 0xffff
121123
handle = open_device('\\\\.\\MQAC', 'FILE_SHARE_WRITE|FILE_SHARE_READ', 0, 'OPEN_EXISTING')

modules/exploits/windows/local/ms13_053_schlamperei.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def initialize(info={})
6464
def check
6565
os = sysinfo["OS"]
6666
unless (os =~ /windows/i)
67-
return Exploit::CheckCode::Unknown
67+
return Exploit::CheckCode::Safe
6868
end
6969

7070
file_path = expand_path("%windir%") << "\\system32\\win32k.sys"
@@ -81,7 +81,7 @@ def check
8181
return Exploit::CheckCode::Appears if revision < 22348
8282
end
8383
end
84-
return Exploit::CheckCode::Unknown
84+
return Exploit::CheckCode::Safe
8585
end
8686

8787

@@ -96,7 +96,7 @@ def exploit
9696
fail_with(Failure::NoTarget, "Running against 64-bit systems is not supported")
9797
end
9898

99-
unless check == Exploit::CheckCode::Vulnerable
99+
if check == Exploit::CheckCode::Safe
100100
fail_with(Failure::NotVulnerable, "Exploit not available on this system")
101101
end
102102

modules/exploits/windows/local/ms14_070_tcpip_ioctl.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def exploit
9999
fail_with(Failure::NoTarget, "Running against 64-bit systems is not supported")
100100
end
101101

102-
unless check == Exploit::CheckCode::Vulnerable
102+
if check == Exploit::CheckCode::Safe
103103
fail_with(Failure::NotVulnerable, "Exploit not available on this system")
104104
end
105105

modules/exploits/windows/local/virtual_box_guest_additions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def exploit
138138
fail_with(Failure::NoTarget, "Running against 64-bit systems is not supported")
139139
end
140140

141-
unless check == Exploit::CheckCode::Vulnerable
141+
if check == Exploit::CheckCode::Safe
142142
fail_with(Failure::NotVulnerable, "Exploit not available on this system")
143143
end
144144

0 commit comments

Comments
 (0)