Signature
alert tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"SERVER-OTHER Apache Log4j logging remote code execution attempt"; flow:to_server,established; content:"Authorization: Basic JH"; fast_pattern:only; http_header; content:"Authorization: Basic "; http_header; base64_decode:relative; base64_data; pcre:"/\x24\x7b(jndi|lower|upper|.{0,200}\x24\x7b.{0,200}\x3a[\x27\x22\x2d\x5c]*[jndi\x7d\x3a\x2d]{1,4}[\x22\x27]?[\x3a\x7djndi])/i"; metadata:policy balanced-ips drop, policy connectivity-ips drop, policy max-detect-ips drop, policy security-ips drop, ruleset community, service http; reference:cve,2021-44228; reference:cve,2021-44832; reference:cve,2021-45046; reference:cve,2021-45105; classtype:attempted-user; sid:58795; rev:4;)
Recommendations/Investigative actions
Ensure that all servers running Apache Log4j are promptly patched, Authorize the connection. If the connection was approved - archive and baseline the rule. If not - check the connection and investigate relevant IP address.