Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Without alpine image, Log4j don't follow Exploit*.class #19

Closed
mhagnumdw opened this issue Dec 16, 2021 · 7 comments
Closed

Without alpine image, Log4j don't follow Exploit*.class #19

mhagnumdw opened this issue Dec 16, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@mhagnumdw
Copy link

mhagnumdw commented Dec 16, 2021

If I change container image from openjdk:8u181-jdk-alpine to openjdk:8u181-jdk, the vulnerability does not occur.

Log4j don't follow http://my-ip:8888/Exploit*.class.

@mhagnumdw mhagnumdw changed the title Without alpine imagem, Log4j don't follow Exploit*.class Without alpine image, Log4j don't follow Exploit*.class Dec 16, 2021
@mhagnumdw mhagnumdw changed the title Without alpine image, Log4j don't follow Exploit*.class Without alpine image, Log4j don't follow Exploit*.class Dec 16, 2021
@christophetd
Copy link
Owner

I confirm I'm able to reproduce the behavior. Would you have any guess as to why the exploit is not working on the non-Alpine version? It's using the same JDK version (1.8.0_181), and I don't know of reason why it wouldn't be working

@christophetd christophetd added the bug Something isn't working label Dec 17, 2021
@mhagnumdw
Copy link
Author

I still don't know and I haven't been able to investigate much. But I imagine that log4j changes flow due to some environment difference: environment variable, OS configuration etc.

@christophetd
Copy link
Owner

That's useful info. Given that the goal of this repo is to provide a purposely vulnerable application, I suggest we close the issue.

@venkyr
Copy link

venkyr commented Dec 20, 2021

You need to set com.sun.jndi.ldap.object.trustURLCodebase=true for the JVM via JAVA_TOOL_OPTIONS or any other means to make the app vulnerable. It should then work with any Linux image. I'm using this in a VM directly, and not docker.

Thanks so much for this @christophetd

@ranavikrant3
Copy link

Do you think that the JDK's are being patched to disable this class loading behaviour via JNDI?

@montao
Copy link

montao commented Mar 20, 2022

I could reproduce the attack today in an Ubuntu VM with the JDK 1.8 u181.

@christophetd
Copy link
Owner

To summarize, there seems to be no issue with the current repository, so I'll go ahead and close the issue. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants