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.
How to use Splunk software for this use case
To deploy this use case, make sure that you have the Splunk ES Content Updates installed on your Splunk Enterprise Security deployment. This extensive content library empowers you to deploy out-of-the-box security detections and analytic stories to enhance your investigations and improve your security posture. If you do not have Splunk Enterprise Security, these detections will still give you an idea of what you can accomplish with SPL in the Splunk platform or with the free app, Splunk Security Essentials.
Some of the detections that can help you with this use case include:
- Any Powershell download file
- CMD carry out string command parameter
- Curl download and bash execution
- Detect outbound LDAP traffic
- Hunting for Log4Shell
- 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
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:
- Log4Shell overview and resources for Log4j vulnerabilities
- Log4Shell - Detecting Log4j 2 RCE Using Splunk
Splunk OnDemand Services: Use these credit-based services for direct access to Splunk technical consultants with a variety of technical services from a pre-defined catalog. Most customers have OnDemand Services per their license support plan. Engage the ODS team at OnDemand-Inquires@splunk.