Skip to content

Commit

Permalink
Land #7069, modify check codes in multiple local exploits
Browse files Browse the repository at this point in the history
  • Loading branch information
wchen-r7 committed Jul 6, 2016
2 parents 82e092c + 0f8efec commit 45401bf
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion modules/exploits/windows/local/bthpan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def exploit
fail_with(Failure::None, 'Session is already elevated')
end

unless check == Exploit::CheckCode::Vulnerable
if check == Exploit::CheckCode::Safe
fail_with(Failure::NotVulnerable, "Exploit not available on this system")
end

Expand Down
4 changes: 3 additions & 1 deletion modules/exploits/windows/local/mqac_write.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ def exploit

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

base_addr = 0xffff
handle = open_device('\\\\.\\MQAC', 'FILE_SHARE_WRITE|FILE_SHARE_READ', 0, 'OPEN_EXISTING')
Expand Down
6 changes: 3 additions & 3 deletions modules/exploits/windows/local/ms13_053_schlamperei.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def initialize(info={})
def check
os = sysinfo["OS"]
unless (os =~ /windows/i)
return Exploit::CheckCode::Unknown
return Exploit::CheckCode::Safe
end

file_path = expand_path("%windir%") << "\\system32\\win32k.sys"
Expand All @@ -81,7 +81,7 @@ def check
return Exploit::CheckCode::Appears if revision < 22348
end
end
return Exploit::CheckCode::Unknown
return Exploit::CheckCode::Safe
end


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

unless check == Exploit::CheckCode::Vulnerable
if check == Exploit::CheckCode::Safe
fail_with(Failure::NotVulnerable, "Exploit not available on this system")
end

Expand Down
2 changes: 1 addition & 1 deletion modules/exploits/windows/local/ms14_070_tcpip_ioctl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def exploit
fail_with(Failure::NoTarget, "Running against 64-bit systems is not supported")
end

unless check == Exploit::CheckCode::Vulnerable
if check == Exploit::CheckCode::Safe
fail_with(Failure::NotVulnerable, "Exploit not available on this system")
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def exploit
fail_with(Failure::NoTarget, "Running against 64-bit systems is not supported")
end

unless check == Exploit::CheckCode::Vulnerable
if check == Exploit::CheckCode::Safe
fail_with(Failure::NotVulnerable, "Exploit not available on this system")
end

Expand Down

0 comments on commit 45401bf

Please sign in to comment.