How to test if your Linux server is vulnerable to Log4j

Log4j is a critical vulnerability that has swept throughout the IT panorama rapidly. This is a single command you’ll be able to run to check and see you probably have any susceptible packages put in.

open source security

Picture: Shutterstock/LeoWolfert

The Log4j vulnerability is critical enterprise. This zero-day flaw impacts the Log4j library and may enable an attacker to execute arbitrary code on a system that will depend on Log4j to jot down log messages.

SEE: 40+ open supply and Linux phrases it’s essential to know (TechRepublic Premium)

This vulnerability has the very best CVSS rating of 10.0, so it’s essential to listen. One of many huge issues is realizing for those who’re susceptible. That is difficult by the various methods Log4j could be deployed. Are you utilizing it as a part of a Java challenge, is it rolled right into a container, did you put in it along with your distribution package deal supervisor, and (if that’s the case) which log4j packages did you put in? Or did you put in it from supply? Due to this, you won’t even know in case your server is susceptible. 

Happily, for Linux servers, GitHub consumer, Rubo77 created a script that can test for for packages that embrace susceptible Log4j cases. It is in beta, and it is not one 100%, nevertheless it’s an incredible place to begin. Perceive, this script would not take a look at for jar recordsdata that had been packaged with functions, so don’t contemplate it something greater than a launching level to begin your forensics. 

I examined this script towards a server that I knew had a susceptible Log4j package deal put in, and it appropriately tagged it. This is how one can run that very same script in your Linux servers to seek out out for those who could be susceptible. Log into your server and difficulty the command:

wget -q -O - | bash

The output of the command will provide you with some indications in case your server is susceptible. As you’ll be able to see (Determine A), my occasion contains liblog4j2-java model 2.11.2-1, which incorporates the vulnerability. In that case, I ought to instantly improve to 2.15.0. If it is not out there, the issue will persist till the package deal is patched. 

Determine A


My take a look at server is susceptible to the Log4j difficulty.

Keep in mind, this script will not be a assure, however a very good place to begin. Even when it comes again to say your server will not be susceptible, maintain digging to ensure you’ve up to date each needed package deal to keep away from getting hit by this vulnerability.

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the newest tech recommendation for enterprise execs from Jack Wallen.

Additionally see

Recent Articles


Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here

Stay on op - Ge the daily news in your inbox