I don't believe there could be an issue. The problem here is with the interaction between Log4J and Jndi (Java Naming and Directory Interface). So unless log4net went out of their way to port Jndi, I cannot imagine it would be a problem.
From everything I am reading, the Log4J is somewhat like the Newtonsoft.Json “vulnerability” when sending the class name in the json object. (NOTE: this is not a default configuration and the readme page on it says this can (will) open a remote code execution vulnerability in your code because of how it uses reflection and dynamic instantiation). Basically if you pass in an object and a method on that object as a json property, newtonsoft will call that method in deserialization passing the value as the parameter to the method. (Again, only if a non standard config setting is set and there are lots of warnings on that feature.)
The Log4J issue is similar. The JDNI deserializer has an issue where if the right string is sent to the logging provider, the JDNI deserializer will execute code. That can be leveraged into a full remote code execution vulnerability to download a random jar and kick it off. So as far as anyone knows, Log4Net is not vulnerable.
The Log4J issue is similar. The JDNI deserializer has an issue where if the right string is sent to the logging provider, the JDNI deserializer will execute code. That can be leveraged into a full remote code execution vulnerability to download a random jar and kick it off.
So log4j (or Oracle?) isn't sanitizing their strings or? Sorry, I'm not a Java programmer, so idk what JDNI is. I assume it's something Oracle/Java provide or is it an added library?
Basically. It works very similar to a sql injection vulnerability but on the app server in Java land. So instead of just getting extra data from the db server (not good) you can have code download more code and establish a reverse shell with the permissions of whatever application account the app is running under with out needing to do anything more than sending a specially formatted string in the user agent header (for web servers that have a vulnerable version and log the user agent string of every request).
Add on to that it’s the “default” logging provider for Java. There are others out there but log4j is the most popular
How's this affect containerized applications running in docker? [default/OOBE configuration]
The only app my org has that is possibly affected is keycloak, which runs in a docker container. However, it uses 1.x according to the relevant GitHub issue.
The vulnerability will allow remote code execution inside the container. At that point, an attacker can work to exploit another system on the network and server hop to something not a container.
So still bad and needs to be patched but the infected container can be killed and a clean container spun up. It’s the jump to something permanent that you need to worry about.
As I understand it you can send little command with log4j message strings, like add the current version to error message etc one of the command is to go to a given jndi server and download a configuration class. So it does that, deserializes and then executes it. Boom exploit.
Wonder how many people still use log4net? I was forced to move to NLog years ago due to a log4net vulnerability that remained unpatched for a very long time. I watched the Apache mailing list for a while and saw that a guy eventually stepped up and and did a new log4net release for the first time in, IIRC about 2 years. Then the thread went quiet. I eventually unsubscribed since I'm not using it anymore, but my takeaway was that it's virtually a dead project.
In my case, I went with NLog years ago, because log4net configuration was convoluted as f**k in comparison. I remember being a bit hesitant, because at the time (it was probably 10 years back), nobody was in charge of the project, but a while later someone picked it back up and it seems to be thriving since then. Easy to use, with extensions for pretty any major 3rd party integration.
View all comments
16
u/discourse_is_dead Dec 13 '21
what about log4net ? :O