In August 2023, Rapid7 discovered a Java deserialization vulnerability in Redwood Software’s JSCAPE MFT secure managed file transfer product. The vulnerability was later assigned CVE-2023-4528. It can be exploited by sending an XML-encoded Java object to the Manager Service port, which, by default, is TCP port 10880 (over SSL). Successful exploitation can run arbitrary Java code as the root
on Linux or the SYSTEM
user on Windows. CVE-2023-4528 is trivial to exploit if an attacker has network-level access to the management port and the Manager Service is enabled (which is the default). We strongly recommend taking the server down (or disabling the Manager Service) until it can be patched.
Product description
CVE-2023-4528 affects all versions of JSCAPE MFT Server prior to version 2023.1.9 on all platforms (Windows, Linux, and MacOS). See the JSCAPE advisory for more information.
Discoverer
This issue was discovered by Ron Bowes of Rapid7. It is being disclosed in accordance with Rapid7’s vulnerability disclosure policy.
Vendor statement
CVE-2023-4528 has been addressed in JSCAPE version 2023.1.9 which is now available for customer deployment. JSCAPE customers have been notified and our support teams are available 24/7 to assist. Redwood appreciates the collaboration with Rapid7 and our cybersecurity partners. For more information, please see: https://www.jscape.com/blog/binary-management-service-patch-cve-2023-4528
Impact
Successful exploitation executes arbitrary Java code as the Linux root
or Windows SYSTEM
user. The most likely attack vector will run Java code such as java.lang.Runtime.getRuntime().exec("...shell command...");
, but it's also possible to create a Java-only payload to avoid executing another process (and therefore wouldn’t be as easily detectable).
Once an attacker executes code at that level, they have full control of the system. They can steal data, pivot to attack other network devices, remove evidence of the intrusion, establish persistence, and anything else they choose. Notably, there appear to be very few (if any) instances of JSCAPE MFT Server with their management ports exposed to the internet, which significantly reduces attackers’ ability to reach the affected service.
Indicators of compromise
Successful exploitation will be evident in log files. The Windows log file is C:\program files\MFT Server\var\log\server0.log
, and Linux is /opt/mft_server/var/log/server0.log
. Any warning or error messages that reference "Management connection" should be investigated — in particular, class casting exceptions such as:
08.22.2023 15:56:51 [WARNING] Management connection error: [10.0.0.77:10880 <-> 10.0.0.227:40085].
com.jscape.util.net.connection.Connection$ConnectionException: class java.lang.Runtime cannot be cast to class com.jscape.inet.mftserver.adapter.management.protocol.messages.Message (java.lang.Runtime is in module java.base of loader 'bootstrap'; com.jscape.inet.mftserver.adapter.management.protocol.messages.Message is in unnamed module of loader 'app')
at com.jscape.util.net.connection.Connection$ConnectionException.wrap(Unknown Source)
at com.jscape.util.net.connection.SyncMessageConnectionSyncRawBase.read(Unknown Source)
at com.jscape.util.net.connection.AsyncMessageConnectionSyncRawBase.readNextMessage(Unknown Source)
at com.jscape.util.net.connection.AsyncMessageConnectionSyncRawBase.run(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.io.IOException: class java.lang.Runtime cannot be cast to class com.jscape.inet.mftserver.adapter.management.protocol.messages.Message (java.lang.Runtime is in module java.base of loader 'bootstrap'; com.jscape.inet.mftserver.adapter.management.protocol.messages.Message is in unnamed module of loader 'app')
at com.jscape.util.at.b(Unknown Source)
at com.jscape.util.az.a(Unknown Source)
at com.jscape.inet.mftserver.adapter.management.protocol.a.a(Unknown Source)
at com.jscape.inet.mftserver.adapter.management.protocol.a.read(Unknown Source)
... 8 more
Caused by: java.lang.ClassCastException: class java.lang.Runtime cannot be cast to class com.jscape.inet.mftserver.adapter.management.protocol.messages.Message (java.lang.Runtime is in module java.base of loader 'bootstrap'; com.jscape.inet.mftserver.adapter.management.protocol.messages.Message is in unnamed module of loader 'app')
... 10 more
The server expects a Message
class, and the exploit sends a different class such as java.lang.Runtime
, which fails and creates an error message.
Note that a more cleverly written exploit may not be this obvious in log files.
Remediation
Rapid7 recommends that JSCAPE MFT Server customers immediately upgrade their instance(s) of MFT Server to version 2023.1.9 (upgrade documentation from Redwood Software here).
JSCAPE MFT customers should also close port 10880 to the public internet, ensuring that external/public access to the binary management service port (typically 10880) that is used by JSCAPE command line utilities is blocked. Settings for this port can be found in the administrative interface under Settings > Manager Service > Manager Service.
As a temporary mitigation before applying the patch, administrators can block access to the Management Service. On the configuration page (http://[server]:11880/settings/settings
), either change the Host/IP option on the Manager Service page to 127.0.0.1
. Alternatively, under the Access tab, set up an IP filter (or block all IP addresses). Rapid7 validated that both options work.
For more information, see Redwood Software’s advisory.
Rapid7 customers
InsightVM and Nexpose customers will be able to assess their exposure to CVE-2023-4528 with a vulnerability check expected to be available in the September 7 content release.
Timeline
- August 22, 2023: Rapid7 discovers the vulnerability
- August 23, 2023: Rapid7 reports the vulnerability to Redwood Software
- August 24, 2023 - September 6, 2023: Rapid7 and Redwood Software discuss patching and disclosure timelines
- September 7, 2023: This disclosure
Source: Rapid7
Source Link: https://blog.rapid7.com/2023/09/07/cve-2023-4528-java-deserialization-vulnerability-in-jscape-mft-fixed/