Log4Shell Explained: Deep Dive into CVE-2021-44228
Log4Shell Vulnerability
Log4Shell Vulnerability , also known as CVE-2021-44228.This vulnerability exposed how we develop secure software systems.No special skill or code was required.Simple text can invoke this vulnerability.
To understand Log4Shell, lets understand Logs or Logging.
Computer keeps logs of every tasks is performed on them.Engineers rely on logs to debug if any incident occurs.Normally they check Timestamp and message beside Timestamp.
Like, from this log file screenshot we see INFO (Information) and ERROR (Error) and Timestamp
But, what is Log4j Its logging library for Java applications
Here, all login attempts are being recorded in log files.
Without, Log4j developers will use System.out.println().
Now apart from writing log files Log4j can also execute commands given to them.
Attacker found out that they can load and execute malicious code using Log4j.
Log4j often hides in
- Apps
- JARs
- Inside Containers
- trivy
- grype
- syft
- SCA tools like Synk
Upgrade Log4j to 2.17.1 or later
If its not possible to upgrade ,
Disable JINDI lookups.
Delete vulnerable class
zip -q -d log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class
Fixing Log4j means upgrading libraries ,disabling and dangerous lookups and blocking exploit paths.
Comments
Post a Comment