NSE LIB

Back to library
Unofficial intrusive Discovery

http-log4shell

Apache Log4j2 <=2.14.1 JNDI features used in configuration, log messages, and parameters do not protect against attacker controlled LDAP and other JNDI related endpoints. An attacker who can control log messages or log message parameters can execute arbitrary code loaded from LDAP servers when message lookup substitution is enabled.

Ports

Any

Protocols

n/a

Attribution

Sanoop Thomas (upstream: s4n7h0/NSE)

Usage

Copy the command and adjust the target or script arguments as needed.

nmap --script=http-log4shell --script-args='callback_type=[collaborator, canary, interactsh, dnslog, huntress, requestbin],\
                             callback_token=[token],inject=[header,x-api-version]' <target>

Overview

Imported from the upstream repository s4n7h0/NSE. Apache Log4j2 <=2.14.1 JNDI features used in configuration, log messages, and parameters do not protect against attacker controlled LDAP and other JNDI related endpoints. An attacker who can control log messages or log message parameters can execute arbitrary code loaded from LDAP servers when message lookup substitution is enabled. Reference https://www.lunasec.io/docs/blog/log4j-zero-day/ https://github.com/advisories/GHSA-jfh8-c2jp-5v3q https://issues.apache.org/jira/browse/LOG4J2-3221 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228