Spring4Shell
Incident Report for Ascend Security Events
Resolved
Spring4Shell
CVE-2022-22965


A vulnerability in the Spring Framework has been reported and a CVE has been issued. This notice advises of the vulnerability, remediation, and initial steps taken by Ascend.

What is Spring Framework?

Spring Framework is used to develop enterprise-level applications in Java. It is a platform that provides comprehensive infrastructure to support model-view-controller- or MVC-based applications developed to reduce manual configuration and enhance memory management. It also makes code more reusable and easier to maintain by implementing some design patterns universally.

Who is vulnerable ?

• Spring Framework versions before 5.2.20, 5.3.18, and Java Development Kit (JDK) version 9 or higher

• Apache Tomcat

• Spring-webmvc or spring-webflux dependency

• Using Spring parameter binding that is configured to use a non-basic parameter type, such as Plain Old Java Objects (POJOs)

• Deployable, packaged as a web application archive (WAR)

• Writable file system such as web apps or ROOT

Vulnerability exploitation

The vulnerability occurs when special objects or classes are exposed under the specific conditions describe above. It is quite common for request parameters to be bound to a POJO that is not annotated with @RequestBody, which helps in extracting parameters from HTTP requests. The class variable contains a reference to the POJO object that the HTTP parameters are mapped to.

Threat actors can directly access an object by specifying the class variable in their requests. All child properties of an object can also be accessed by malicious actors through the class objects. As a result, they can get access to all kinds of other valuable objects on the system simply by following the chains of properties. (see sources for full technical write up.)

Remediation

A patch for Spring4shell has already been released, The Spring framework strongly urges enterprises to do the following:

• Upgrade Spring Framework to versions 5.3.18+ and 5.2.20+.

• Upgrade Spring Boot to versions 2.6.6+ and2.5.12+.

Workarounds

If patching is not immediately available the following workarounds have been recommended.

• Maintaining a disallow or blocklist in web application firewall to block strings that contain values such as "class.*", "Class.*", "*.class.*", and "*.Class.*"

• Downgrading to a lower JDK version such as version 8 might help. However, it could impact application features and open doors to other attacks mitigated in higher versions of JDK.

Additional Ascend Actions.

We have blocked all known IOC’s through out our environments. These consist of SHA values, IP address, and a url. (see below.)

SHA Values

5fb0c8f3daef02b9d2ab285d0bf348cf1cb7c36708b0034ad0dee4998a16b9e9
af06644dd95a30d55162666331ea6de0832cdf6f3d1897b276fde7c94d45ad84
3d8291da28ab42ba18a58efc18fb62e1d114af631cab678f823f7c28ff84e876
0d4ad08e561a3e285000a0c211063d58b543442d2208729aa142883f69a6f5f1
220179663c5a0974958caddf23709de8f26cdaee2c92c5920f3b4188e5a44b6f
95e9e8e5e412813ff8e949946a5f8c1fbbfc3ead2e74233e432a833777086407
9dc7ec24c42cbddb07f8a475297a52d64f8bcb9dc1a1090ac72e8ac27f56cc37
2c34b00ef26f5ca061177c31990726b91471c7e0efbeb5a5384d5ed4fcec3ff7
83d3e7198f82ba06e87264a71b6dc9678a77738bfa90b32a847d8d396f1082a8
afe718cc1ef596b4b7fc12060aca215b91ee6b48978cee6bc49864c4c86f3b9b
4b6b7b1a62cdeff56ce476b65447655af3f6c63e90e849e7db5d04233cbd843f
00338c7ea14917bc085ae308d76a947defd1a7e3b3c1207f2cb9001b7f86e94c
8a4dedca3f21129c4759f065d0672433dc3ec9625c7c4e68ff7b0bba60ba97e1
74e6c938d4a2bc6d63c191588779fdb106fb215d9c57a165cb77074bc4148c0a

[URLs]
http://[45].[95].[169].[143]/The420[smokeplace].dns/


Sources:

https://www.trendmicro.com/en_us/research/22/d/cve-2022-22965-analyzing-the-exploitation-of-spring4shell-vulner.html

https://spring.io/blog/2022/03/31/spring-framework-rce-early-announcement


Author: Jeff Frickel
Posted Apr 09, 2022 - 11:13 CDT