Webserver detection of Log4j RCE (CVE-2021-44228) JNDI injection patterns

Detects webserver traffic containing Log4Shell-style JNDI injection payload strings, excluding Nessus scan artifacts.

FreeReviewedSigma · High · v5
Category
webserver
Author
Florian Roth (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2021-12-10
Updated
2026-07-31
title: Webserver detection of Log4j RCE (CVE-2021-44228) JNDI injection patterns
id: f01064ca-d825-4cdb-9209-98a90f0c2708
status: test
description: This rule matches webserver requests containing common Log4j JNDI lookup and obfuscation strings associated with the CVE-2021-44228 exploitation attempt. Attackers use these payload patterns to trigger outbound lookups (for example via LDAP/RMI/DNS/others) that can lead to remote code execution. The detection relies on HTTP/webserver telemetry and keyword matches against the request content, while excluding events containing a specific Nessus-related substring.
references:
  - https://web.archive.org/web/20231230220738/https://www.lunasec.io/docs/blog/log4j-zero-day/
  - https://news.ycombinator.com/item?id=29504755
  - https://github.com/tangxiaofeng7/apache-log4j-poc
  - https://gist.github.com/Neo23x0/e4c8b03ff8cdf1fa63b7d15db6e3860b
  - https://github.com/YfryTchsGD/Log4jAttackSurface
  - https://twitter.com/shutingrz/status/1469255861394866177?s=21
  - https://github.com/SigmaHQ/sigma/blob/master/rules-emerging-threats/2021/Exploits/CVE-2021-44228/web_cve_2021_44228_log4j.yml
author: Florian Roth (Nextron Systems), Huntrule Team
date: 2021-12-10
modified: 2022-02-06
tags:
  - attack.initial-access
  - attack.t1190
  - detection.emerging-threats
logsource:
  category: webserver
detection:
  keywords:
    - ${jndi:ldap:/
    - ${jndi:rmi:/
    - ${jndi:ldaps:/
    - ${jndi:dns:/
    - "/$%7bjndi:"
    - "%24%7bjndi:"
    - "$%7Bjndi:"
    - "%2524%257Bjndi"
    - "%2F%252524%25257Bjndi%3A"
    - "${jndi:${lower:"
    - ${::-j}${
    - ${jndi:nis
    - ${jndi:nds
    - ${jndi:corba
    - ${jndi:iiop
    - "Reference Class Name: foo"
    - ${${env:BARFOO:-j}
    - ${::-l}${::-d}${::-a}${::-p}
    - ${base64:JHtqbmRp
    - ${${env:ENV_NAME:-j}ndi${env:ENV_NAME:-:}$
    - "${${lower:j}ndi:"
    - "${${upper:j}ndi:"
    - "${${::-j}${::-n}${::-d}${::-i}:"
  filter:
    - w.nessus.org/nessus
    - /nessus}
  condition: keywords and not filter
falsepositives:
  - Vulnerability scanning
level: high
license: DRL-1.1
related:
  - id: 5ea8faa8-db8b-45be-89b0-151b84c82702
    type: derived