Skip to content

Commit 50ce997

Browse files
committed
Add human-readable descriptions to CheckCode returns in unix/webapp exploit modules
1 parent 9efc727 commit 50ce997

112 files changed

Lines changed: 355 additions & 355 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/unix/webapp/actualanalyzer_ant_cookie_exec.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,19 @@ def check
7070
res = send_request_raw('uri' => normalize_uri(target_uri.path, 'aa.php'))
7171
if !res
7272
vprint_error("Connection failed")
73-
return Exploit::CheckCode::Unknown
73+
return Exploit::CheckCode::Unknown('Could not determine the target status')
7474
elsif res.code == 404
7575
vprint_error("Could not find aa.php")
76-
return Exploit::CheckCode::Safe
76+
return Exploit::CheckCode::Safe('The target is not vulnerable')
7777
elsif res.code == 200 && res.body =~ /ActualAnalyzer Lite/ && res.body =~ /Admin area<\/title>/
7878
vprint_error("ActualAnalyzer is not installed. Try installing first.")
79-
return Exploit::CheckCode::Detected
79+
return Exploit::CheckCode::Detected('The target service was detected')
8080
end
8181
# check version
8282
res = send_request_raw('uri' => normalize_uri(target_uri.path, 'view.php'))
8383
if !res
8484
vprint_error("Connection failed")
85-
return Exploit::CheckCode::Unknown
85+
return Exploit::CheckCode::Unknown('Could not determine the target status')
8686
elsif res.code == 200 && /title="ActualAnalyzer Lite \(free\) (?<version>[\d\.]+)"/ =~ res.body
8787
vprint_status("Found version: #{version}")
8888
if Rex::Version.new(version) <= Rex::Version.new('2.81')
@@ -92,13 +92,13 @@ def check
9292
info: "Module #{fullname} detected ActualAnalyzer #{version}",
9393
refs: references
9494
)
95-
return Exploit::CheckCode::Vulnerable
95+
return Exploit::CheckCode::Vulnerable('The target is vulnerable')
9696
end
97-
return Exploit::CheckCode::Detected
97+
return Exploit::CheckCode::Detected('The target service was detected')
9898
elsif res.code == 200 && res.body =~ /ActualAnalyzer Lite/
99-
return Exploit::CheckCode::Detected
99+
return Exploit::CheckCode::Detected('The target service was detected')
100100
end
101-
Exploit::CheckCode::Safe
101+
Exploit::CheckCode::Safe('The target is not vulnerable')
102102
end
103103

104104
#

modules/exploits/unix/webapp/ajenti_auth_username_cmd_injection.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ def check
5959

6060
unless res
6161
vprint_error 'Connection failed'
62-
return CheckCode::Unknown
62+
return CheckCode::Unknown('Could not determine the target status')
6363
end
6464

6565
unless res.body =~ /ajenti/i
66-
return CheckCode::Safe
66+
return CheckCode::Safe('The target is not vulnerable')
6767
end
6868

6969
version = res.body.scan(/'ajentiVersion', '([\d\.]+)'/).flatten.first
@@ -73,10 +73,10 @@ def check
7373
end
7474

7575
if version == '2.1.31'
76-
return CheckCode::Appears
76+
return CheckCode::Appears("Version #{version} appears to be vulnerable")
7777
end
7878

79-
CheckCode::Detected
79+
CheckCode::Detected("Detected version #{version}")
8080
end
8181

8282
def exploit

modules/exploits/unix/webapp/arkeia_upload_exec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ def check
7171
if res and res.code == 200 and res.body =~ /v(\d+\.\d+\.\d+)/
7272
version = $1
7373
else
74-
return Exploit::CheckCode::Unknown
74+
return Exploit::CheckCode::Unknown('Could not determine the target status')
7575
end
7676

7777
vprint_status("Version #{version} detected")
7878

7979
if version > "10.0.10"
80-
return Exploit::CheckCode::Safe
80+
return Exploit::CheckCode::Safe("Version #{version} is not vulnerable")
8181
end
8282

8383
# Check for vulnerable component
@@ -90,10 +90,10 @@ def check
9090
})
9191

9292
if res and res.code == 200 and res.body =~ /Les versions brutes des messages est affichee ci-dessous/
93-
return Exploit::CheckCode::Appears
93+
return Exploit::CheckCode::Appears("Version #{version} appears to be vulnerable")
9494
end
9595

96-
return Exploit::CheckCode::Safe
96+
return Exploit::CheckCode::Safe("Version #{version} is not vulnerable")
9797
end
9898

9999
def exploit

modules/exploits/unix/webapp/awstats_configdir_exec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ def check
6666
}, 25)
6767

6868
if (res and res.body.match(/localhost/))
69-
return Exploit::CheckCode::Vulnerable
69+
return Exploit::CheckCode::Vulnerable('The target is vulnerable')
7070
end
7171

72-
return Exploit::CheckCode::Safe
72+
return Exploit::CheckCode::Safe('The target is not vulnerable')
7373
end
7474

7575
def exploit

modules/exploits/unix/webapp/awstats_migrate_exec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ def check
7070
}, 25)
7171

7272
if (res and res.body.match(/localhost/))
73-
return Exploit::CheckCode::Vulnerable
73+
return Exploit::CheckCode::Vulnerable('The target is vulnerable')
7474
end
7575

76-
return Exploit::CheckCode::Safe
76+
return Exploit::CheckCode::Safe('The target is not vulnerable')
7777
end
7878

7979
def exploit

modules/exploits/unix/webapp/awstatstotals_multisort.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ def check
6464
}, 25)
6565

6666
if (res and res.body.match(/localhost/))
67-
return Exploit::CheckCode::Vulnerable
67+
return Exploit::CheckCode::Vulnerable('The target is vulnerable')
6868
end
6969

70-
return Exploit::CheckCode::Safe
70+
return Exploit::CheckCode::Safe('The target is not vulnerable')
7171
end
7272

7373
def exploit

modules/exploits/unix/webapp/barracuda_img_exec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ def check
6666
}, 25)
6767

6868
if (res and res.body.match(/localhost/))
69-
return Exploit::CheckCode::Vulnerable
69+
return Exploit::CheckCode::Vulnerable('The target is vulnerable')
7070
end
7171

72-
return Exploit::CheckCode::Safe
72+
return Exploit::CheckCode::Safe('The target is not vulnerable')
7373
end
7474

7575
def exploit

modules/exploits/unix/webapp/basilic_diff_exec.rb

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

7777
if res and res.code == 200 and res.body =~ /#{sig}/
78-
return Exploit::CheckCode::Vulnerable
78+
return Exploit::CheckCode::Vulnerable('The target is vulnerable')
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/unix/webapp/byob_unauth_rce.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,11 @@ def check
128128
})
129129

130130
if res&.code == 500
131-
return CheckCode::Vulnerable
131+
return CheckCode::Vulnerable('The target is vulnerable')
132132
else
133133
case res&.code
134134
when 200
135-
return CheckCode::Safe
135+
return CheckCode::Safe('The target is not vulnerable')
136136
when nil
137137
return CheckCode::Unknown('The target did not respond.')
138138
else

modules/exploits/unix/webapp/carberp_backdoor_exec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ def check
5959
confirm_string = rand_text_alpha(8)
6060
cmd = "echo '#{confirm_string}';"
6161
shell = http_send_command(cmd)
62-
check_code = Exploit::CheckCode::Safe
62+
check_code = Exploit::CheckCode::Safe('The target is not vulnerable')
6363

6464
if shell and shell.body.include?(confirm_string)
65-
check_code = Exploit::CheckCode::Vulnerable
65+
check_code = Exploit::CheckCode::Vulnerable('The target is vulnerable')
6666
end
6767

6868
check_code

0 commit comments

Comments
 (0)