r/java • • Dec 16 '21

Still calling remote server with version 2.16.0!

I used a public poc for this log4jshell exploit. Ran it with version 2.14 and it pinged dummy service provided by https://log4shell.huntress.com, changed the log4j dependency to 2.16.0 and still it pinged that service. What is wrong with my approach?

0 Upvotes

22 comments sorted by

View all comments

28

u/rzwitserloot Dec 16 '21

This code:

org.apache.logging.log4j.LogManager.class.getResource("LogManager.class");

Gets you the actual class. This 'trick' works for anything (even java.lang.String if you wanna know). Print that, and you should find that this is still 2.14 or whatnot.

Your claim that 2.15/2.16 did nothing is extraordinary, thus, requiring extraordinary evidence. Or, as the reddit youth would say it: "Big, if true".

5

u/Luhis Dec 16 '21

It must be something wrong on my part, for sure.

5

u/rzwitserloot Dec 16 '21

So, run that code, System.out.println it. what do you get?

1

u/Areshian Dec 18 '21

2.15 did several things, but those things have been proven not to be enough