Detection rules › Sigma

Fortinet CVE-2021-22123 Exploitation

Status
test
Severity
critical
Log source
category webserver
Author
Bhabesh Raj, Florian Roth
Source
github.com/SigmaHQ/sigma

Detects CVE-2021-22123 exploitation attempt against Fortinet WAFs

MITRE ATT&CK coverage

TacticTechniques
Initial Access

Rule body

title: Fortinet CVE-2021-22123 Exploitation
id: f425637f-891c-4191-a6c4-3bb1b70513b4
status: test
description: Detects CVE-2021-22123 exploitation attempt against Fortinet WAFs
references:
    - https://www.rapid7.com/blog/post/2021/08/17/fortinet-fortiweb-os-command-injection
author: Bhabesh Raj, Florian Roth
date: 2021-08-19
modified: 2023-01-02
tags:
    - attack.initial-access
    - attack.t1190
    - cve.2021-22123
    - detection.emerging-threats
logsource:
    category: webserver
detection:
    selection:
        cs-uri-query|contains: '/api/v2.0/user/remoteserver.saml'
        cs-method: POST
    filter1:
        cs-referer|contains: '/root/user/remote-user/saml-user/'
    filter2:
        cs-referer: null
    condition: selection and not filter1 and not filter2
falsepositives:
    - Unknown
level: critical

Stages and Predicates

Stage 0: condition

selection and not filter1 and not filter2

Stage 1: selection

selection:
    cs-uri-query|contains: '/api/v2.0/user/remoteserver.saml'
    cs-method: POST

Stage 2: not filter1

filter1:
    cs-referer|contains: '/root/user/remote-user/saml-user/'

Stage 3: not filter2

filter2:
    cs-referer: null

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
cs-referermatch/root/user/remote-user/saml-user/excludes:cs-referer field:"cs-referer" value:"/root/user/remote-user/saml-user/"
cs-refereris_null(no value, null check)excludes:cs-referer

Indicators

These rows show field, operator, and value matches.