FortiAnalyzer
FortiAnalyzer can receive logs and Windows host events directly from endpoints connected to EMS, and you can use FortiAnalyzer to analyze the logs and run reports.
ck_FTNT
Staff
Staff

 

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:

 

Anthony_E_0-1649419024535.png

 

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.

 

Spring4Shell_Event_Handler.PNG

 

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.
- Choose the Report module.
- Select the Import option under 'More'.

- Select the appropriate file for the ADOM type to add the report to the ADOM.

 

Spring4Shell_Report.PNG

 

Result

The Spring4Shell Vulnerability_report can be run anytime as determined by an administrator.

 

Comments
axel_gonzalez_FTNT

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?