News for hackers. Stuff that matters.
Re:Log4Shell update: second Log4j vulnerability published by freeqaz on Wednesday December 15, 2021 @04:46AM (#29563819)
We just pushed a follow-up post[0] to talk about why the hell we thought this crazy exploit thing might be a good idea. (spoiler: Log4Shell is actually forcing companies to deal with tech debt via dependency hell)

I'll finishing writing up the technical explanation tomorrow and publish that in a separate post. For now, I'm after some much needed sleep!

Good night, y'all. :)

0: https://www.lunasec.io/docs/blog/log4shell-live-patch/

Re:Log4Shell update: second Log4j vulnerability published by freeqaz on Thursday December 16, 2021 @03:06AM (#29576132)
Here is said technical deep dive: https://www.lunasec.io/docs/blog/log4shell-live-patch-techni...

I've gotta add a section on decompiling byte code but I'll finish adding it in the morning. It's close enough as-is to be informative to people, I think. Cheers, y'all!

Re:Log4Shell update: second Log4j vulnerability published by sporkland on Wednesday December 15, 2021 @06:42AM (#29564622)
I'm seeing instances of it making the debt worse rather than better. E.g. some folks are just forcing latest log4j libs into builds even for services that don't have it or need it in central dependencies, as it's more expedient than trying to be precise and only bump where necessary.

Leading to more risk over time.

Re:Log4Shell update: second Log4j vulnerability published by justin_oaks on Wednesday December 15, 2021 @11:33AM (#29568192)
It may not make any sense, but how does it lead to more risk? If you add a Java dependency but nothing calls it, then you're not vulnerable.
Re:Log4Shell update: second Log4j vulnerability published by syntheticcorp on Thursday December 16, 2021 @04:22AM (#29576509)
If it’s in the class path? Deserialisation gadgets.
Re:Log4Shell update: second Log4j vulnerability published by GrizzlyMcGee on Wednesday December 15, 2021 @11:42AM (#29568316)
It sounds better to say "we are patched for the vulnerability" instead of "the vulnerability does not affect us." The ladder leaves a level of uncertainty. Not saying I agree with this methodology.
Re:Log4Shell update: second Log4j vulnerability published by alexfoo on Wednesday December 15, 2021 @06:30PM (#29572892)
I used to have to deal with this at my previous job (including log4j).

We were rarely vulnerable to CVEs mentioned by end users or pinged by our own internal tooling, but that wasn't the point.

The customers (a large percentage of Fortune 500) would just get pinged by their security teams. The customer would come to us, we'd say "yes, a patch is on its way" or "we've researched it, we're not vulnerable, it's fine".

(Our particular bit of product only had Java command line tools, but you never know what customers would do with them and whether they'd end up somewhere in a chain where those command line tools could be, deep down, kicked off from some user input on a public facing webpage).

Also the problem is that "we've researched it, we're not vulnerable, it's fine" often isn't good enough for the customer's internal security team, and our customers would just get hassled by them each time a scan was run.

We'd also spend a disproportionate amount of support time responding to "what about CVE-2021-xxxxx?" and arguing the case, even if it is just copy-and-paste the same old response again and again, it's still toil.

So, quite often, the easiest solution was to say "we've researched it, we're not vulnerable, but we're patching it anyway".

The problem with this approach is that you slowly build up a considerable number of third party packages that need to be version bumped each time you do a new maintenance release, and that puts quite a load on QA departments, etc.

Anyway, don't do that kind of thing any more and I certainly don't miss it.

Re:Log4Shell update: second Log4j vulnerability published by watwut on Wednesday December 15, 2021 @08:43AM (#29565769)
You mean that they are adding log4j maven dependency where there was none?
Re:Log4Shell update: second Log4j vulnerability published by dboreham on Wednesday December 15, 2021 @09:45AM (#29566596)
Reminds me of the advice to use two STOP statements in a Fortran program if you run it on a Cray. It's so fast that it could blow straight through the first one.
Re:Log4Shell update: second Log4j vulnerability published by sporkland on Wednesday December 15, 2021 @11:01AM (#29567819)
Yes
Re:Log4Shell update: second Log4j vulnerability published by Hallucinaut on Wednesday December 15, 2021 @07:07PM (#29573181)
Whilst that is ridiculous if they're bringing in a new dependency, if I squint I can see the thought process. Transitive dependencies are far harder to be certain about. It took a few seconds to scan our company's entire code base for log4j2.

But there's no easy way to verify that none of them might depend on, say, Spring Boot Web Starter, which brings in umpteen other dependencies.

Sure, you can resolve dependencies in each project and check at the individual level that the resolved dependencies for runtime don't include log4j2 but it's much more onerous. And you can take away that risk by declaring it in your parent POM so the version is fixed, regardless of what transitive deps may use.

Of course, I would always say if this what was being done, using the dependencyManagement would be a better solution. But a lot of this work will be under duress and in my experience the majority of people using systems like Maven don't really understand it.

Re:Log4Shell update: second Log4j vulnerability published by john-shaffer on Thursday December 16, 2021 @04:05AM (#29576415)
I just added a test case that importing org.apache.logging.log4j.core.lookup.JndiLookup throws a ClassNotFoundException. Any log4j2 class would work too.