I have taken some flak over the years for rolling my own basics like logging, telemetry, tracing, authentication, session management, etc... Incidents like this remind me that it is sometimes OK to ignore those who constantly order you to "vendor it out" over some notion of principled development excellence wherein one never reinvents a single hypothetical wheel. Arguably, writing text to a log file on disk is a simp…
Log4Shell Log4j vulnerability (CVE-2021-44228) – cheat-sheet reference guide
71–80 of 209 posts
Re: Log4Shell Log4j vulnerability (CVE-2021-44228) – cheat-sheet reference guide
#72I'm curious about the disclosure of this vulnerability and why it seems that no prior notice appears to have been given by the researcher who published it. Is it because it was already being exploited in the wild?
> The vulnerability was privately disclosed to Apache by Alibaba's Cloud Security Team on 24 November 2021 and publicly disclosed on 9 December 2021. https://en.wikipedia.org/wiki/Log4Shell
Re: Log4Shell Log4j vulnerability (CVE-2021-44228) – cheat-sheet reference guide
#73Earlier quoted context omitted.
It's still very early, we won't have breach notifications for a while since any attacks would have started in the last few weeks at the earliest, and most would have started last week.
It’s possible that it was exploited before the issue was widely discovered, right? I thought it had been in there for a while.
Re: Log4Shell Log4j vulnerability (CVE-2021-44228) – cheat-sheet reference guide
#74Re: Log4Shell Log4j vulnerability (CVE-2021-44228) – cheat-sheet reference guide
#75Are there any notable systems exploited by this besides minecraft?
Re: Log4Shell Log4j vulnerability (CVE-2021-44228) – cheat-sheet reference guide
#76Clone Git Repo... CTRL+F "log4j"... 0 results... (sigh of relief)... :|
mvn dependency:tree -Dverbose=true | grep log4jRe: Log4Shell Log4j vulnerability (CVE-2021-44228) – cheat-sheet reference guide
#77Earlier quoted context omitted.
The main design mistake in log4j is that it performs ${…} substitution on the complete log message by default. There’s no way for application code using the log4j front-end API to have input data containing such strings be logged verbatim, without nonstandard log4j back-end configuration (someone correct me if there’s actually a way). In principle, each application has to sanitize all strings to be logged by strippin…
The main design mistake is including it, by default, in the first place, rather than requiring you to specify some kinda custom appender or whatever. The idea that a logging framework could lead to an RCE like this is completely bonkers. The vast majority of users just want to log straightforward data.
Re: Log4Shell Log4j vulnerability (CVE-2021-44228) – cheat-sheet reference guide
#78I have taken some flak over the years for rolling my own basics like logging, telemetry, tracing, authentication, session management, etc... Incidents like this remind me that it is sometimes OK to ignore those who constantly order you to "vendor it out" over some notion of principled development excellence wherein one never reinvents a single hypothetical wheel. Arguably, writing text to a log file on disk is a simp…
On the other hand, you don't know what vulnerabilities are hidden in your own code and just haven't been discovered yet, and you're one fuzzing attack away from a vulnerability being discovered/exploited.
It's not like library code is some magical stuff that only senior principal ninja 10x developers can comprehend
Not everything is don't roll your own crypto.
Re: Log4Shell Log4j vulnerability (CVE-2021-44228) – cheat-sheet reference guide
#79Re: Log4Shell Log4j vulnerability (CVE-2021-44228) – cheat-sheet reference guide
#80Earlier quoted context omitted.
The main design mistake in log4j is that it performs ${…} substitution on the complete log message by default. There’s no way for application code using the log4j front-end API to have input data containing such strings be logged verbatim, without nonstandard log4j back-end configuration (someone correct me if there’s actually a way). In principle, each application has to sanitize all strings to be logged by strippin…
> without nonstandard log4j back-end configuration By "nonstandard" do you mean different than default settings? It looks like they changed the default as of v2.15: https://issues.apache.org/jira/browse/LOG4J2-3198 For earlier versions (2.10+) it looks like there's a single setting you can toggle to prevent the lookup behavior: log4j2.formatMsgNoLookups=true (or env var LOG4J_FORMAT_MSG_NO_LOOKUPS=true)