Skip to content

Commit 1ee2131

Browse files
committed
update based on cgranleese-r7 review comments
1 parent 28d6ef9 commit 1ee2131

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

modules/exploits/multi/http/geoserver_unauth_rce_cve_2024_36401.rb

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def initialize(info = {})
5858
'Linux Dropper',
5959
{
6060
'Platform' => ['linux'],
61-
'Arch' => [ARCH_X86, ARCH_X64, ARCH_AARCH64],
61+
'Arch' => [ARCH_X86, ARCH_X64, ARCH_AARCH64, ARCH_ARMLE],
6262
'Type' => :linux_dropper,
6363
'Linemax' => 16384,
6464
'CmdStagerFlavor' => ['curl', 'wget', 'echo', 'printf', 'bourne'],
@@ -167,15 +167,10 @@ def execute_command(cmd, _opts = {})
167167

168168
def check
169169
version_number = check_version
170+
return CheckCode::Unknown('Could not retrieve the version information.') if version_number.nil?
171+
return CheckCode::Vulnerable("Version #{version_number}") if version_number.between?(Rex::Version.new('2.25.0'), Rex::Version.new('2.25.1')) || version_number.between?(Rex::Version.new('2.24.0'), Rex::Version.new('2.24.3')) || version_number < Rex::Version.new('2.23.6')
170172

171-
unless version_number.nil?
172-
if version_number.between?(Rex::Version.new('2.25.0'), Rex::Version.new('2.25.1')) || version_number.between?(Rex::Version.new('2.24.0'), Rex::Version.new('2.24.3')) || version_number < Rex::Version.new('2.23.6')
173-
return CheckCode::Vulnerable("Version #{version_number}")
174-
else
175-
return CheckCode::Safe("Version #{version_number}")
176-
end
177-
end
178-
CheckCode::Unknown('Could not retrieve the version information.')
173+
CheckCode::Safe("Version #{version_number}")
179174
end
180175

181176
def exploit

0 commit comments

Comments
 (0)