Skip to content

Instantly share code, notes, and snippets.

log4j RCE Exploitation Detection

You can use these commands and rules to search for exploitation attempts against log4j RCE vulnerability CVE-2021-44228 in a MacOS using ZSH.

Based on https://gist.github.com/Neo23x0/e4c8b03ff8cdf1fa63b7d15db6e3860b

Grep / Zgrep

This command searches for exploitation attempts in uncompressed files in folder /var/log and all sub folders.

extension NSAttributedString {
typealias Attributes = [String : NSObject]
convenience init(
prefix: String? = nil,
prefixAttributes: Attributes? = nil,
string: String,
stringAttributes: Attributes,
suffix: String? = nil,