Skip to content

Commit f8c4099

Browse files
committed
Add human-readable descriptions to CheckCode returns in multi/http exploit modules (A-O)
1 parent 9efc727 commit f8c4099

117 files changed

Lines changed: 344 additions & 346 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

modules/exploits/multi/http/activecollab_chat.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ def check
7373
if (cms and cms.body =~ /powered by activeCollab/)
7474
# detect the chat module
7575
if (chat and chat.code == 200)
76-
return Exploit::CheckCode::Detected
76+
return Exploit::CheckCode::Detected('The target application was detected but the version could not be confirmed as vulnerable')
7777
end
7878
end
79-
return Exploit::CheckCode::Safe
79+
return Exploit::CheckCode::Safe('The target is not running a vulnerable version')
8080
end
8181

8282
def exploit

modules/exploits/multi/http/adobe_coldfusion_rce_cve_2023_26360.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def check
154154
return CheckCode::Detected('ColdFusion detected but version number is unknown.')
155155
end
156156

157-
CheckCode::Unknown
157+
CheckCode::Unknown('Could not connect to the target')
158158
end
159159

160160
def exploit

modules/exploits/multi/http/agent_tesla_panel_rce.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,16 +163,16 @@ def check
163163
if response
164164
if response.redirect? && response.headers['location'] =~ /login.php/ && !(datastore['USERNAME'] && datastore['PASSWORD'])
165165
print_warning('Unauthenticated RCE can\'t be exploited, retry if you gain CnC credentials.')
166-
return Exploit::CheckCode::Unknown
166+
return Exploit::CheckCode::Unknown('No response received from the target')
167167
end
168168

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

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

175-
Exploit::CheckCode::Safe
175+
Exploit::CheckCode::Safe('The target is not vulnerable')
176176
end
177177

178178
def exploit

modules/exploits/multi/http/ajaxplorer_checkinstall_exec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ def check
7575

7676
# If the server doesn't return the default redirection, probably something is wrong
7777
if res and res.code == 200 and res.body =~ /#{clue}/
78-
return Exploit::CheckCode::Vulnerable
78+
return Exploit::CheckCode::Vulnerable('Successfully verified path traversal vulnerability')
7979
end
8080

81-
return Exploit::CheckCode::Safe
81+
return Exploit::CheckCode::Safe('The target is not vulnerable')
8282
end
8383

8484
def exploit

modules/exploits/multi/http/apache_apisix_api_default_token_rce.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def check
100100

101101
if server && server.match(/APISIX/)
102102
vprint_status("Found an #{server} #{version} http server header")
103-
return Exploit::CheckCode::Appears if version > Rex::Version.new('2')
103+
return Exploit::CheckCode::Appears('The target is running a vulnerable version') if version > Rex::Version.new('2')
104104
end
105105
return Exploit::CheckCode::Safe('A vulnerable version if APISIX server is not running')
106106
end

modules/exploits/multi/http/apache_druid_cve_2023_25194.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def check
9797
info: "Module #{fullname} found vulnerable host."
9898
})
9999

100-
Exploit::CheckCode::Vulnerable
100+
Exploit::CheckCode::Vulnerable('Successfully verified code execution on the target')
101101
ensure
102102
cleanup_service
103103
end

modules/exploits/multi/http/apache_flink_jar_upload_exec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def check
7979
return CheckCode::Appears("Apache Flink version #{version}.")
8080
end
8181

82-
CheckCode::Appears
82+
CheckCode::Appears('The target appears to be a vulnerable version')
8383
end
8484

8585
def delete_jar(filename)

modules/exploits/multi/http/apache_mod_cgi_bash_env_exec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ def check
8484
res = req("echo #{marker}", datastore['CVE'])
8585

8686
if res && res.body.include?(marker * 3)
87-
return Exploit::CheckCode::Vulnerable
87+
return Exploit::CheckCode::Vulnerable('Successfully verified code execution on the target')
8888
elsif res && res.code == 500
8989
injected_res_code = res.code
9090
else
91-
return Exploit::CheckCode::Safe
91+
return Exploit::CheckCode::Safe('The target is not vulnerable')
9292
end
9393

9494
res = send_request_cgi({
@@ -97,12 +97,12 @@ def check
9797
})
9898

9999
if res && injected_res_code == res.code
100-
return Exploit::CheckCode::Unknown
100+
return Exploit::CheckCode::Unknown('Received an unexpected response from the target')
101101
elsif res && injected_res_code != res.code
102-
return Exploit::CheckCode::Appears
102+
return Exploit::CheckCode::Appears('The target appears to be vulnerable')
103103
end
104104

105-
Exploit::CheckCode::Unknown
105+
Exploit::CheckCode::Unknown('No response received from the target')
106106
end
107107

108108
def exploit

modules/exploits/multi/http/apache_roller_ognl_injection.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ def check
132132
})
133133

134134
if res and res.code == 200 and res.body =~ /#{sum}/
135-
return Exploit::CheckCode::Vulnerable
135+
return Exploit::CheckCode::Vulnerable('Successfully verified path traversal vulnerability')
136136
end
137137

138-
return Exploit::CheckCode::Safe
138+
return Exploit::CheckCode::Safe('The target is not vulnerable')
139139
end
140140
end

modules/exploits/multi/http/apprain_upload_exec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ def check
6969
})
7070

7171
if res and res.code == 200 and res.body.empty?
72-
return Exploit::CheckCode::Appears
72+
return Exploit::CheckCode::Appears('The target appears to be vulnerable based on the response')
7373
else
74-
return Exploit::CheckCode::Safe
74+
return Exploit::CheckCode::Safe('The target is not vulnerable')
7575
end
7676
end
7777

0 commit comments

Comments
 (0)