Description | This article describes how to use a custom event handler in FortiAnalyzer to raise alerts for incident response related to attacks that attempt to leverage the Spring4Shell Vulnerability. |
Scope | This event handler and report help to detect attempts to send specially crafted HTTP requests to vulnerable Spring Core systems in order to inject custom Tag Library Descriptors (TLD) files when compiling JSP files based on logs from FortiGates, FortiADC, and FortiProxy. |
Solution |
When compiling JSP files in Spring Beans, a class loader (modified by the attacker) will return URLs to resolve TLD files. TLD files support tag files which are essentially plaintext file containing Java code. By controlling this URL, the attacker can supply their own TLD/tag file which may contain arbitrary code such as:
For more information about this attack, see the following FortiGuard Outbreak Alert: FortiGuard Outbreak Alert: Spring4Shell Vulnerability
What is included in Fortinet_Spring4Shell_Vulnerability.zip?
1) Spring4Shell Vulnerability_event-handler.json This event handler helps identify attack packets detected by FortiGates, FortiADC, and FortiProxy logs.
2) Spring4Shell Vulnerability_report.dat This report displays the findings on Spring4Shell attacks from FortiGates, FortiADC, and FortiProxy logs.
3) fgt_Spring4Shell Vulnerability_event-handler.json The event handler for FortiGate ADOMs is configured for FortiGate logs only.
4) fgt_Spring4Shell Vulnerability_report.dat The report for FortiGate ADOMs includes FortiGate charts only.
All screenshots provided below for illustration purposes are taken from FortiAnalyzer 7.0.3.
1) Download the Fortinet_Spring4Shell_Vulnerability.zip file (contains 4 files).
2) Unzip Fortinet_Spring4Shell_Vulnerability.zip.
3) Import Spring4Shell Vulnerability_event-handler.json or fgt_Spring4Shell Vulnerability_event-handler.json event handler: - Choose an ADOM (if ADOMs are enabled). The ADOM may be of type Fabric or FortiGate:
- Choose the FortiSOC module.: - Select Event Handler List. - Select the Import option under More. - Select the appropriate event handler depending on the ADOM type.
Result:
The event handler is enabled and will be triggered if the appropriate logs are received following the import of the event handler. Edit the event handler to customize the notification section.
4) Import Spring4Shell Vulnerability_report.dat or fgt_Spring4Shell Vulnerability_report.dat to Reports:
- Choose an ADOM (if ADOMs are enabled). ADOM may be of type Fabric or FortiGate. - Select the appropriate file for the ADOM type to add the report to the ADOM.
Result: The Spring4Shell Vulnerability_report can be run anytime as determined by an administrator. |
From where we can download Fortinet_Spring4Shell_Vulnerability.zip?
Is this report only for 7.0? What if we need a report on 6.4 or 6.2?
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.