Skip to content

Commit

Permalink
Backport miscellaneous fixes to my modules
Browse files Browse the repository at this point in the history
  • Loading branch information
wvu committed Aug 14, 2020
1 parent 2e887a8 commit 3a4858d
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion modules/auxiliary/gather/nis_bootparamd_domain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def run
end

unless res
fail_with(Failure::Unknown, 'No response from server')
fail_with(Failure::Unreachable, 'No response from server')
end

bootparams = begin
Expand Down
10 changes: 5 additions & 5 deletions modules/exploits/linux/http/cisco_ucs_cloupia_script_rce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ class MetasploitModule < Msf::Exploit::Remote

Rank = ExcellentRanking

include Msf::Exploit::Remote::HttpClient
prepend Msf::Exploit::Remote::AutoCheck
include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::CmdStager

def initialize(info = {})
Expand Down Expand Up @@ -109,7 +109,7 @@ def check
)

unless res
return CheckCode::Unknown('Target did not respond to check request.')
return CheckCode::Unknown('Target did not respond to check.')
end

unless res.code == 200 && res.body.include?('Cisco UCS Director')
Expand Down Expand Up @@ -173,7 +173,7 @@ def create_exports_dir(*path_parts)
)

unless res
fail_with(Failure::Unknown, "Target did not respond to #{__method__}")
fail_with(Failure::Unreachable, "Target did not respond to #{__method__}")
end

# It will always return 200, even on error
Expand Down Expand Up @@ -213,7 +213,7 @@ def leak_api_key(*path_parts)
)

unless res
fail_with(Failure::Unknown, "Target did not respond to #{__method__}")
fail_with(Failure::Unreachable, "Target did not respond to #{__method__}")
end

# It will always return 200, even on error
Expand Down Expand Up @@ -257,7 +257,7 @@ def execute_command(cmd, _opts = {})
)

unless res
fail_with(Failure::Unknown, "Target did not respond to #{__method__}")
fail_with(Failure::Unreachable, "Target did not respond to #{__method__}")
end

# It will always return 200, even on error
Expand Down
2 changes: 1 addition & 1 deletion modules/exploits/linux/http/f5_bigip_tmui_rce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def check
)

unless res
return CheckCode::Unknown('Target did not respond to check request.')
return CheckCode::Unknown('Target did not respond to check.')
end

unless res.code == 200 && /BIG-IP release (?<version>[\d.]+)/ =~ res.body
Expand Down
4 changes: 2 additions & 2 deletions modules/exploits/linux/http/netsweeper_webadmin_unixlogin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ class MetasploitModule < Msf::Exploit::Remote

Rank = ExcellentRanking

include Msf::Exploit::Remote::HttpClient
prepend Msf::Exploit::Remote::AutoCheck
include Msf::Exploit::Remote::HttpClient

def initialize(info = {})
super(
Expand Down Expand Up @@ -74,7 +74,7 @@ def check
)

unless res
return CheckCode::Unknown('Target did not respond to check request.')
return CheckCode::Unknown('Target did not respond to check.')
end

unless res.code == 200
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ class MetasploitModule < Msf::Exploit::Remote

Rank = ExcellentRanking

include Msf::Exploit::Remote::HttpClient
prepend Msf::Exploit::Remote::AutoCheck
include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::CmdStager

def initialize(info = {})
Expand Down Expand Up @@ -79,7 +79,7 @@ def check
)

unless res
return CheckCode::Unknown('Target did not respond to check request.')
return CheckCode::Unknown('Target did not respond to check.')
end

unless res.headers['Server']
Expand Down Expand Up @@ -125,7 +125,7 @@ def login(username, password)
}, 3.5)

unless res
fail_with(Failure::Unknown, 'Target did not respond to login request')
fail_with(Failure::Unreachable, "Target did not respond to #{__method__}")
end

cookie = res.get_cookies
Expand Down Expand Up @@ -154,7 +154,7 @@ def execute_command(cmd, opts = {})
)

unless res
fail_with(Failure::Unknown, 'Target did not respond to payload request')
fail_with(Failure::Unreachable, "Target did not respond to #{__method__}")
end

unless res.code == 400 && res.body.match(/java\.lang\.UNIXProcess@\h+/)
Expand Down
4 changes: 2 additions & 2 deletions modules/exploits/multi/http/liferay_java_unmarshalling.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ class MetasploitModule < Msf::Exploit::Remote

Rank = ExcellentRanking

prepend Msf::Exploit::Remote::AutoCheck
include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::Remote::Java::HTTP::ClassLoader
prepend Msf::Exploit::Remote::AutoCheck

def initialize(info = {})
super(
Expand Down Expand Up @@ -66,7 +66,7 @@ def check
)

unless res
return CheckCode::Unknown('Target did not respond to check request.')
return CheckCode::Unknown('Target did not respond to check.')
end

unless res.headers['Liferay-Portal']
Expand Down
2 changes: 1 addition & 1 deletion modules/exploits/unix/local/opensmtpd_oob_read_lpe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ class MetasploitModule < Msf::Exploit::Local
# smtpd(8) may crash on a malformed message
Rank = AverageRanking

prepend Msf::Exploit::Remote::AutoCheck
include Msf::Exploit::Remote::TcpServer
include Msf::Exploit::Remote::Expect
prepend Msf::Exploit::Remote::AutoCheck

def initialize(info = {})
super(update_info(info,
Expand Down
2 changes: 1 addition & 1 deletion modules/exploits/unix/smtp/opensmtpd_mail_from_rce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ class MetasploitModule < Msf::Exploit::Remote

Rank = ExcellentRanking

prepend Msf::Exploit::Remote::AutoCheck
include Msf::Exploit::Remote::Tcp
include Msf::Exploit::Remote::Expect
prepend Msf::Exploit::Remote::AutoCheck

def initialize(info = {})
super(
Expand Down
4 changes: 2 additions & 2 deletions modules/exploits/unix/webapp/thinkphp_rce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ class MetasploitModule < Msf::Exploit::Remote

Rank = ExcellentRanking

include Msf::Exploit::Remote::HttpClient
prepend Msf::Exploit::Remote::AutoCheck
include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::CmdStager

def initialize(info = {})
Expand Down Expand Up @@ -119,7 +119,7 @@ def check
)

unless res
return CheckCode::Unknown('Target did not respond to check request.')
return CheckCode::Unknown('Target did not respond to check.')
end

unless res.code == 404 && res.body.match(/copyright.*ThinkPHP/m)
Expand Down
2 changes: 1 addition & 1 deletion modules/exploits/unix/webapp/wp_infinitewp_auth_bypass.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ class MetasploitModule < Msf::Exploit::Remote

Rank = ManualRanking

include Msf::Exploit::Remote::HTTP::Wordpress
prepend Msf::Exploit::Remote::AutoCheck
include Msf::Exploit::Remote::HTTP::Wordpress

def initialize(info = {})
super(update_info(info,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ class MetasploitModule < Msf::Exploit::Remote

Rank = ExcellentRanking

include Msf::Exploit::Remote::HttpClient
prepend Msf::Exploit::Remote::AutoCheck
include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::CmdStager
include Msf::Exploit::Powershell
include Msf::Exploit::FileDropper
Expand Down Expand Up @@ -99,7 +99,7 @@ def check
)

unless res
return CheckCode::Unknown('Target did not respond to check request.')
return CheckCode::Unknown('Target did not respond to check.')
end

unless res.code == 200 && res.body.include?('ManageEngine Desktop Central')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class MetasploitModule < Msf::Exploit::Remote
"\x20\x7f\xc5\xfc\xe6\x2d\x1a\x5a\x4f\x6d\x24\x10\x72\x22\x61\xe6\xa3\x3e" \
"\x77\xe0\x62\x8b\x17\xaa\x92\x80\x39\xbf".freeze

include Msf::Exploit::Remote::HttpClient
prepend Msf::Exploit::Remote::AutoCheck
include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::ViewState
include Msf::Exploit::CmdStager
include Msf::Exploit::Powershell
Expand Down Expand Up @@ -121,7 +121,7 @@ def check
)

unless res
return CheckCode::Unknown('Target did not respond to check request.')
return CheckCode::Unknown('Target did not respond to check.')
end

unless res.code == 200 && res.body.include?('myLittleAdmin for SQL Server')
Expand Down

0 comments on commit 3a4858d

Please sign in to comment.