Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/exploits/multi/http/activecollab_chat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ def check
if (cms and cms.body =~ /powered by activeCollab/)
# detect the chat module
if (chat and chat.code == 200)
return Exploit::CheckCode::Detected
return Exploit::CheckCode::Detected('The target application was detected but the version could not be confirmed as vulnerable')
end
end
return Exploit::CheckCode::Safe
return Exploit::CheckCode::Safe('The target is not running a vulnerable version')
end

def exploit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def check
return CheckCode::Detected('ColdFusion detected but version number is unknown.')
end

CheckCode::Unknown
CheckCode::Unknown('Could not connect to the target')
end

def exploit
Expand Down
6 changes: 3 additions & 3 deletions modules/exploits/multi/http/agent_tesla_panel_rce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,16 @@ def check
if response
if response.redirect? && response.headers['location'] =~ /login.php/ && !(datastore['USERNAME'] && datastore['PASSWORD'])
print_warning('Unauthenticated RCE can\'t be exploited, retry if you gain CnC credentials.')
return Exploit::CheckCode::Unknown
return Exploit::CheckCode::Unknown('Target requires authentication; unauthenticated exploitation is not possible without valid CnC credentials')
end

rand_str = Rex::Text.rand_text_alpha(8..16)
cmd_output = parse_response(execute_command("echo #{rand_str}"))

return Exploit::CheckCode::Vulnerable if cmd_output.include?(rand_str)
return Exploit::CheckCode::Vulnerable('Successfully executed a command on the target') if cmd_output.include?(rand_str)
end

Exploit::CheckCode::Safe
Exploit::CheckCode::Safe('The target is not vulnerable')
end

def exploit
Expand Down
4 changes: 2 additions & 2 deletions modules/exploits/multi/http/ajaxplorer_checkinstall_exec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ def check

# If the server doesn't return the default redirection, probably something is wrong
if res and res.code == 200 and res.body =~ /#{clue}/
return Exploit::CheckCode::Vulnerable
return Exploit::CheckCode::Vulnerable('Successfully verified remote command execution')
end

return Exploit::CheckCode::Safe
return Exploit::CheckCode::Safe('The target is not vulnerable')
end

def exploit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ def check

if server && server.match(/APISIX/)
vprint_status("Found an #{server} #{version} http server header")
return Exploit::CheckCode::Appears if version > Rex::Version.new('2')
return Exploit::CheckCode::Appears('The target is running a vulnerable version') if version > Rex::Version.new('2')
end
return Exploit::CheckCode::Safe('A vulnerable version if APISIX server is not running')
return Exploit::CheckCode::Safe('APISIX not detected in Server header')
end

def exploit
Expand Down
2 changes: 1 addition & 1 deletion modules/exploits/multi/http/apache_druid_cve_2023_25194.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def check
info: "Module #{fullname} found vulnerable host."
})

Exploit::CheckCode::Vulnerable
Exploit::CheckCode::Vulnerable('Successfully verified code execution on the target')
ensure
cleanup_service
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def check
return CheckCode::Appears("Apache Flink version #{version}.")
end

CheckCode::Appears
CheckCode::Appears('The target appears to be a vulnerable version')
end

def delete_jar(filename)
Expand Down
10 changes: 5 additions & 5 deletions modules/exploits/multi/http/apache_mod_cgi_bash_env_exec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ def check
res = req("echo #{marker}", datastore['CVE'])

if res && res.body.include?(marker * 3)
return Exploit::CheckCode::Vulnerable
return Exploit::CheckCode::Vulnerable('Successfully verified code execution on the target')
elsif res && res.code == 500
injected_res_code = res.code
else
return Exploit::CheckCode::Safe
return Exploit::CheckCode::Safe('The target is not vulnerable')
end

res = send_request_cgi({
Expand All @@ -97,12 +97,12 @@ def check
})

if res && injected_res_code == res.code
return Exploit::CheckCode::Unknown
return Exploit::CheckCode::Unknown('Received an unexpected response from the target')
elsif res && injected_res_code != res.code
return Exploit::CheckCode::Appears
return Exploit::CheckCode::Appears('The target appears to be vulnerable')
end

Exploit::CheckCode::Unknown
Exploit::CheckCode::Unknown('No response received from the target')
end

def exploit
Expand Down
4 changes: 2 additions & 2 deletions modules/exploits/multi/http/apache_roller_ognl_injection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ def check
})

if res and res.code == 200 and res.body =~ /#{sum}/
return Exploit::CheckCode::Vulnerable
return Exploit::CheckCode::Vulnerable('Successfully verified OGNL injection vulnerability')
end

return Exploit::CheckCode::Safe
return Exploit::CheckCode::Safe('The target is not vulnerable')
end
end
4 changes: 2 additions & 2 deletions modules/exploits/multi/http/apprain_upload_exec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ def check
})

if res and res.code == 200 and res.body.empty?
return Exploit::CheckCode::Appears
return Exploit::CheckCode::Appears('The target appears to be vulnerable based on the response')
else
return Exploit::CheckCode::Safe
return Exploit::CheckCode::Safe('The target is not vulnerable')
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def check

# By here we have identified a Confluence server, but could not get the version number to determine if it is
# vulnerable of not.
CheckCode::Detected
CheckCode::Detected('The target application was detected but the version could not be confirmed as vulnerable')
end

def exploit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def check

res = inject_ognl("#{token1}'+'#{token2}'+'#{token3}")

return CheckCode::Unknown unless res
return CheckCode::Unknown('No response received from the target') unless res

unless res.code == 200 && res.body.include?("#{token1}#{token2}#{token3}")
return CheckCode::Safe('Failed to test OGNL injection.')
Expand Down
4 changes: 2 additions & 2 deletions modules/exploits/multi/http/atutor_sqli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ def print_good(msg = '')
def check
# the only way to test if the target is vuln
if test_injection
return Exploit::CheckCode::Vulnerable
return Exploit::CheckCode::Vulnerable('SQL injection confirmed')
else
return Exploit::CheckCode::Safe
return Exploit::CheckCode::Safe('The target is not vulnerable')
end
end

Expand Down
4 changes: 2 additions & 2 deletions modules/exploits/multi/http/auxilium_upload_exec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ def check
'uri' => normalize_uri("#{base}/admin/sitebanners/upload_banners.php")
})
if res and res.body =~ %r{<title>Pet Rate Admin - Banner Manager</title>}
return Exploit::CheckCode::Detected
return Exploit::CheckCode::Detected('The target service was detected')
else
return Exploit::CheckCode::Safe
return Exploit::CheckCode::Safe('The target is not vulnerable')
end
end

Expand Down
2 changes: 1 addition & 1 deletion modules/exploits/multi/http/baldr_upload_exec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def check
if select_target
Exploit::CheckCode::Appears("Baldr Version: #{select_target.name}")
else
Exploit::CheckCode::Safe
Exploit::CheckCode::Safe('The target version is not vulnerable')
end
end

Expand Down
6 changes: 3 additions & 3 deletions modules/exploits/multi/http/bassmaster_js_injection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ def check

# default example app
if res and res.code == 200 and res.body =~ /#{rando}/
return CheckCode::Vulnerable
return CheckCode::Vulnerable('Successfully verified JavaScript injection leading to code execution')

# non-default app
elsif res and res.code == 500 and res.body =~ /#{rando}/
return CheckCode::Appears
return CheckCode::Appears('The target appears to be vulnerable based on the response')
end

return CheckCode::Safe
return CheckCode::Safe('The target is not vulnerable')
end

def on_request_uri(cli, request)
Expand Down
24 changes: 12 additions & 12 deletions modules/exploits/multi/http/bitbucket_env_var_rce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,35 +125,35 @@ def check
when '7'
case minor
when '0', '1', '2', '3', '4', '5'
return CheckCode::Appears
return CheckCode::Appears('The target appears to be a vulnerable version')
when '6'
return CheckCode::Appears if rev_num >= 0 && rev_num <= 18
return CheckCode::Appears('The target appears to be a vulnerable version') if rev_num >= 0 && rev_num <= 18
when '7', '8', '9', '10', '11', '12', '13', '14', '15', '16'
return CheckCode::Appears
return CheckCode::Appears('The target appears to be a vulnerable version')
when '17'
return CheckCode::Appears if rev_num >= 0 && rev_num <= 11
return CheckCode::Appears('The target appears to be a vulnerable version') if rev_num >= 0 && rev_num <= 11
when '18', '19', '20'
return CheckCode::Appears
return CheckCode::Appears('The target appears to be a vulnerable version')
when '21'
return CheckCode::Appears if rev_num >= 0 && rev_num <= 5
return CheckCode::Appears('The target appears to be a vulnerable version') if rev_num >= 0 && rev_num <= 5
end
when '8'
print_status('Versions 8.* are vulnerable only if the mesh setting is disabled')
case minor
when '0'
return CheckCode::Appears if rev_num >= 0 && rev_num <= 4
return CheckCode::Appears('The target appears to be a vulnerable version') if rev_num >= 0 && rev_num <= 4
when '1'
return CheckCode::Appears if rev_num >= 0 && rev_num <= 4
return CheckCode::Appears('The target appears to be a vulnerable version') if rev_num >= 0 && rev_num <= 4
when '2'
return CheckCode::Appears if rev_num >= 0 && rev_num <= 3
return CheckCode::Appears('The target appears to be a vulnerable version') if rev_num >= 0 && rev_num <= 3
when '3'
return CheckCode::Appears if rev_num >= 0 && rev_num <= 2
return CheckCode::Appears('The target appears to be a vulnerable version') if rev_num >= 0 && rev_num <= 2
when '4'
return CheckCode::Appears if rev_num == 0 || rev_num == 1
return CheckCode::Appears('The target appears to be a vulnerable version') if rev_num == 0 || rev_num == 1
end
end

CheckCode::Detected
CheckCode::Detected('The target application was detected but the version could not be confirmed as vulnerable')
end

def default_branch
Expand Down
6 changes: 3 additions & 3 deletions modules/exploits/multi/http/bolt_file_upload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def initialize(info = {})

def check
cookie = bolt_login(username, password)
return Exploit::CheckCode::Detected unless cookie
return Exploit::CheckCode::Detected('The target application was detected but requires authentication') unless cookie

res = send_request_cgi(
'method' => 'GET',
Expand All @@ -62,10 +62,10 @@ def check
)

if res && res.code == 200 && res.body.include?('Bolt 2.2.4</b>: Sophisticated, lightweight & simple CMS')
return Exploit::CheckCode::Vulnerable
return Exploit::CheckCode::Vulnerable('Successfully verified file upload vulnerability')
end

Exploit::CheckCode::Safe
Exploit::CheckCode::Safe('The target is not vulnerable')
end

def username
Expand Down
4 changes: 2 additions & 2 deletions modules/exploits/multi/http/builderengine_upload_exec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ def check
})

if res && res.code == 200 && !res.body.blank?
return Exploit::CheckCode::Appears
return Exploit::CheckCode::Appears('The target appears to be vulnerable based on the response')
else
return Exploit::CheckCode::Safe
return Exploit::CheckCode::Safe('The target is not vulnerable')
end
end

Expand Down
2 changes: 1 addition & 1 deletion modules/exploits/multi/http/cacti_graph_template_rce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def check
end

@logged_in = true
CheckCode::Vulnerable
CheckCode::Vulnerable('Successfully verified code execution on the target')
end

def csrf_magic_token
Expand Down
2 changes: 1 addition & 1 deletion modules/exploits/multi/http/cacti_package_import_rce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def check
return CheckCode::Safe('Could not access `package_import.php` - insufficient permissions')
end

CheckCode::Appears
CheckCode::Appears("Cacti version #{cacti_version} appears to be vulnerable")
end

def generate_package
Expand Down
2 changes: 1 addition & 1 deletion modules/exploits/multi/http/cacti_pollers_sqli_rce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def check
print_status('Attempting SQLi to check if the target is vulnerable')
return CheckCode::Safe('Blind SQL injection test failed') unless sqli.test_vulnerable

CheckCode::Vulnerable
CheckCode::Vulnerable('Blind SQL injection confirmed')
end

def get_ext_link_id
Expand Down
4 changes: 2 additions & 2 deletions modules/exploits/multi/http/caidao_php_backdoor_exec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ def check
flag = Rex::Text.rand_text_alpha(16)
res = http_send_command("printf(\"#{flag}\");")
if res && res.body =~ /#{flag}/m
Exploit::CheckCode::Vulnerable
Exploit::CheckCode::Vulnerable('Successfully executed the injected code')
else
Exploit::CheckCode::Safe
Exploit::CheckCode::Safe('The target is not vulnerable')
end
end

Expand Down
10 changes: 5 additions & 5 deletions modules/exploits/multi/http/cisco_dcnm_upload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def check

unless res
vprint_error("Connection timed out")
return Exploit::CheckCode::Unknown
return Exploit::CheckCode::Unknown('Could not connect to the target')
end

if res.code == 200 and
Expand All @@ -105,16 +105,16 @@ def check
version = $1
vprint_status("Cisco Primer Data Center Network Manager version #{version} found")
if version =~ /6\.1/
return Exploit::CheckCode::Appears
return Exploit::CheckCode::Appears('The target appears to be a vulnerable version')
else
return Exploit::CheckCode::Detected
return Exploit::CheckCode::Detected('The target application was detected but the version could not be confirmed as vulnerable')
end

elsif res.code == 200 and res.body.to_s =~ /Data Center Network Manager/
return Exploit::CheckCode::Detected
return Exploit::CheckCode::Detected('The target application was detected but the version could not be confirmed as vulnerable')
end

Exploit::CheckCode::Safe
Exploit::CheckCode::Safe('The target is not running a vulnerable version')
end

def exploit
Expand Down
4 changes: 2 additions & 2 deletions modules/exploits/multi/http/cisco_dcnm_upload_2019.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ def check
'method' => 'GET'
)
if res && res.code == 500
return CheckCode::Detected
return CheckCode::Detected('The target service was detected')
end
end

CheckCode::Unknown
CheckCode::Unknown('Received an unexpected response from the target')
end

def target_select
Expand Down
2 changes: 1 addition & 1 deletion modules/exploits/multi/http/cleo_rce_cve_2024_55956.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def check
return CheckCode::Safe(res.headers['Server'])
end

CheckCode::Unknown
CheckCode::Unknown('Could not connect to the target')
end

def exploit
Expand Down
Loading
Loading