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 Control Web Panel (CWP) OS command injection vulnerability. A report is also provided to gain historical visibility into your logs.
For more information about this vulnerability, see the following FortiGuard Outbreak Alert. https://www.fortiguard.com/outbreak-alert/cwp-os-command-injection.
This article contains the files necessary to load an event handler and report into your FortiAnalyzer for either a Fabric ADOM or a FortiGate ADOM. The Fabric report and event handler leverage logs from other Fortinet products that can be used to detect the attack in addition to FortiGate logs.
What is included in Fortinet_CWP OS Command Injection Vulnerability.zip?
1) CWP OS Command Injection_event-handler.json
This event handler helps identify the CWP OS command injection vulnerability detected by FortiGates and other Fortinet products.
2) CWP OS Command Injection_report.dat
This report displays the findings on the CWP OS command injection vulnerability from FortiGates and other Fortinet products.
3) fgt_CWP OS Command Injection_event-handler.json
The event handler for FortiGate ADOMs is configured for FortiGate logs only.
4) fgt_CWP OS Command Injection _report.dat
The report for FortiGate ADOMs includes FortiGate charts only.
1) Download the Fortinet_CWP OS Command Injection Vulnerability.zip file (contains 4 files).
2) Unzip Fortinet_CWP OS Command Injection Vulnerability.zip.
3) Import CWP OS Command Injection_event-handler.json or fgt_CWP OS Command Injection_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.
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 CWP OS Command Injection_report.dat or fgt_CWP OS Command Injection_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 CWP OS Command Injection Vulnerability_report can be run anytime as determined by an admin user.