Detecting Log4j remote code execution
A serious vulnerability (CVE-2021-44228) in the popular open source Apache Log4j logging library poses a threat to thousands of applications and third-party services that leverage this library, allowing attackers to execute arbitrary code from an external source.
You are a security analyst who needs to respond to this. As well as applying an emergency patch for the vulnerability or applying the appropriate mitigations if upgrading is not possible, you also need to look for the presence of Log4j executing remote code in your systems.
Required data
How to use Splunk software for this use case
- Any Powershell download file
- CMD carry out string command parameter
- Curl download and bash execution
- Detect outbound LDAP traffic
- Java class file download by Java user agent
- Linux Java spawning shell
- Log4Shell CVE-2021-44228 exploitation
- Log4Shell JNDI payload injection attempt
- Log4Shell JNDI payload injection with outbound connection
- Outbound network connection from java using default ports
- PowerShell connect to internet with hidden window
- Wget download and bash execution
- Windows Powershell connect to internet with hidden window
- Windows Powershell download file
Next steps
If you determine that you have exposure to Log4j in your environment or Github projects, review the guidance from The Apache Software Foundation on patching for the vulnerability. You should also upgrade to Log4j 2.15.0 as soon as possible or apply the appropriate mitigations if upgrading is not possible. If your searching detects that active exploitation of Log4j has occurred, you'll need to follow your organization's processes for assessing the scale of and mitigating for the attack.
In addition, these Splunk resources might help you understand and implement this use case: