Skip to content

Instantly share code, notes, and snippets.

@daimoniac
Last active September 22, 2022 23:50
Show Gist options
  • Save daimoniac/5f71902410b21a679d77a7d8d8c4a353 to your computer and use it in GitHub Desktop.
Save daimoniac/5f71902410b21a679d77a7d8d8c4a353 to your computer and use it in GitHub Desktop.
# this fixes log4shell on all your software
# you also need to restart all java services.
# be aware that although jndilookup in log4j is almost nowhere in use, if your software uses it it will produce exceptions.
locate '*log4j-core*jar' | xargs -L 1 -I swot zip -d swot org/apache/logging/log4j/core/lookup/JndiLookup.class
# reference: https://nvd.nist.gov/vuln/detail/CVE-2021-44228#:~:text=removing%20the%20JndiLookup%20class%20from%20the%20classpath%20(example%3A%20zip%20%2Dq%20%2Dd%20log4j%2Dcore%2D*.jar%20org/apache/logging/log4j/core/lookup/JndiLookup.class).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment