Skip to content

Commit 4d9db38

Browse files
committed
Update checkcodes and bug fixes
1 parent 19d333d commit 4d9db38

15 files changed

Lines changed: 23 additions & 24 deletions

modules/exploits/linux/http/nagios_xi_chained_rce_2_electric_boogaloo.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ def check
8787
if @version < target[:lower_version]
8888
vprint_bad('Try nagios_xi_chained for this version.')
8989
elsif (@version <= target[:upper_version] && @version >= target[:lower_version])
90-
return CheckCode::Appears("Version #{version} appears to be vulnerable")
90+
return CheckCode::Appears("Version #{@version} appears to be vulnerable")
9191
end
9292
end
93-
CheckCode::Safe("Version #{version} is not vulnerable")
93+
CheckCode::Safe("Version #{@version} is not vulnerable")
9494
end
9595

9696
def set_db_user(usr, passwd)

modules/exploits/linux/http/nagios_xi_mibs_authenticated_rce.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ def check
9696
end
9797

9898
if @version >= Rex::Version.new('5.6.0') && @version <= Rex::Version.new('5.7.3')
99-
return CheckCode::Appears("Version #{version} appears to be vulnerable")
99+
return CheckCode::Appears("Version #{@version} appears to be vulnerable")
100100
end
101101

102-
return CheckCode::Safe("Version #{version} is not vulnerable")
102+
return CheckCode::Safe("Version #{@version} is not vulnerable")
103103
end
104104

105105
def execute_command(cmd, _opts = {})

modules/exploits/linux/http/nagios_xi_plugins_check_plugin_authenticated_rce.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ def check
130130
end
131131

132132
if @version < Rex::Version.new('5.6.6')
133-
return CheckCode::Appears("Version #{version} appears to be vulnerable")
133+
return CheckCode::Appears("Version #{@version} appears to be vulnerable")
134134
end
135135

136-
return CheckCode::Safe("Version #{version} is not vulnerable")
136+
return CheckCode::Safe("Version #{@version} is not vulnerable")
137137
end
138138

139139
def grab_plugins_nsp

modules/exploits/linux/http/nagios_xi_plugins_filename_authenticated_rce.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ def check
9797
end
9898

9999
if @version < Rex::Version.new('5.8.0')
100-
return CheckCode::Appears("Version #{version} appears to be vulnerable")
100+
return CheckCode::Appears("Version #{@version} appears to be vulnerable")
101101
end
102102

103-
return CheckCode::Safe("Version #{version} is not vulnerable")
103+
return CheckCode::Safe("Version #{@version} is not vulnerable")
104104
end
105105

106106
def execute_command(cmd, _opts = {})

modules/exploits/linux/http/netis_unauth_rce_cve_2024_22729.rb

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

122122
return CheckCode::Safe(version[2].chop.to_s)
123123
end
124-
CheckCode::Safe("Version #{version} is not vulnerable")
124+
CheckCode::Safe('Unable to parse target version from response')
125125
end
126126

127127
def exploit

modules/exploits/linux/http/netis_unauth_rce_cve_2024_48456_and_48457.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def check
212212
return CheckCode::Safe(version[1].to_s)
213213
end
214214
end
215-
CheckCode::Safe("Version #{version} is not vulnerable")
215+
CheckCode::Safe('Target version is not vulnerable')
216216
end
217217

218218
def exploit

modules/exploits/linux/http/php_imap_open_rce.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def check
9797
return
9898
end
9999

100-
if res.code = 200
100+
if res.code == 200
101101
return CheckCode::Detected('The target service was detected')
102102
end
103103
elsif target.name =~ /Horde IMP H3/
@@ -246,7 +246,7 @@ def exploit
246246
return
247247
end
248248

249-
if res.code = 200
249+
if res.code == 200
250250
cookie = res.get_cookies
251251
else
252252
print_error("HTTP code #{res.code} found, check options.")

modules/exploits/linux/http/pineapple_preconfig_cmdinject.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,13 @@ def check
241241
'method' => 'GET',
242242
'uri' => brute_uri
243243
)
244-
return Exploit::CheckCode::Safe('The target is not vulnerable') if !brutecheck || !brutecheck.code == 200 || brutecheck.body !~ /own this pineapple/
244+
return Exploit::CheckCode::Safe('The target is not vulnerable') if !brutecheck || brutecheck.code != 200 || brutecheck.body !~ /own this pineapple/
245245

246246
return Exploit::CheckCode::Vulnerable('The target is vulnerable')
247247
end
248248

249249
cmd_success = cmd_inject("echo")
250-
return Exploit::CheckCode::Vulnerable('The target is vulnerable') if cmd_success && cmdSuccess.code == 200 && cmd_success.body =~ /Executing/
250+
return Exploit::CheckCode::Vulnerable('The target is vulnerable') if cmd_success && cmd_success.code == 200 && cmd_success.body =~ /Executing/
251251

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

modules/exploits/linux/http/qnap_qts_rce_cve_2023_47218.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def check
8585
# </Errmsg>
8686
# </Storage>
8787

88-
return Exploit::CheckCode::Detected("Target detected: version #{version}") if res.body.include? '<Result>failure</Result>'
88+
return Exploit::CheckCode::Detected('QNAP QTS target detected') if res.body.include? '<Result>failure</Result>'
8989

9090
CheckCode::Unknown('Could not determine the target status')
9191
end

modules/exploits/linux/http/samsung_srv_1670d_upload_exec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def check
7777
if resp.body =~ /File Version (\d+\.\d+\.\d+\.\d+)/
7878
version = $1
7979
if version == '1.0.0.193'
80-
vprint_good "Found vesrion: #{version}"
80+
vprint_good "Found version: #{version}"
8181
return CheckCode::Appears("Version #{version} appears to be vulnerable")
8282
end
8383
end

0 commit comments

Comments
 (0)