News for hackers. Stuff that matters.
Re:Xz/liblzma: Bash-stage Obfuscation Explained by politelemon on Saturday March 30, 2024 @05:26PM (#39878833)
Thanks the simplified explanation and noisy image comparison is quite appreciated. It gives me a good grasp of what people mean by the sophistication involved.

I also saw a comment on reddit mentioning that the "sandboxing" method was sabotaged with a dot. It's on the line just after "#include <sys/prctl.h>" you can see a dot all the way on the left.

https://git.tukaani.org/?p=xz.git;a=commitdiff;h=328c52da8a2...

https://old.reddit.com/r/linux/comments/1brhlur/xz_utils_bac...

Re:Xz/liblzma: Bash-stage Obfuscation Explained by temp12237792 on Saturday March 30, 2024 @07:55PM (#39879862)
OMG that's evil. The diff just shows:

  +
  +.
  +
and the dot goes unnoticed
Re:Xz/liblzma: Bash-stage Obfuscation Explained by cqqxo4zV46cp on Saturday March 30, 2024 @09:32PM (#39880509)
like a more (ostensibly) malicious “goto fail”
Re:Xz/liblzma: Bash-stage Obfuscation Explained by emmelaich on Saturday March 30, 2024 @10:15PM (#39880731)
I wonder why they didn't use a non-breaking space or similar. I guess it's possible a nbsp would stand out even more.
Re:Xz/liblzma: Bash-stage Obfuscation Explained by jetpks on Saturday March 30, 2024 @11:49PM (#39881234)
the extra dot is easily hand waved away as a mistake. a non breaking space looks intentional.
Re:Xz/liblzma: Bash-stage Obfuscation Explained by IshKebab on Sunday March 31, 2024 @07:26AM (#39883256)
They could have just misspelt one of the constants. Even less obvious and more deniable.

There's multiple things like this in this backdoor that seems like they've been super sneaky (using a compile check to disable Landlock is genius) but then half-assed the last step.

Re:Xz/liblzma: Bash-stage Obfuscation Explained by account42 on Monday April 08, 2024 @04:30AM (#39967491)
Plausible deniability probably. A dot could be a typo, a NBSP is less likely.
Re:Xz/liblzma: Bash-stage Obfuscation Explained by ihsoy on Sunday March 31, 2024 @10:51AM (#39884782)
This is very likely just a mistake and not deliberate.

a) absolutely nobody uses cmake to build this packet

b) if you try to build the packet with cmake and -DENABLE_SANDBOX=landlock, the build just fails: https://i.imgur.com/7xbeWFx.png

The "." does not disable sandboxing, it just makes it impossible to build with cmake. If anyone had ever actually tried building it with cmake, they would get the error and realize that something is wrong. It makes absolutely no sense that this would be malicious attempt to reduce security.

Re:Xz/liblzma: Bash-stage Obfuscation Explained by gravescale on Sunday March 31, 2024 @01:52PM (#39886380)
I really hate writing these compile/build time conditional things. It's hard to have tests that it's enabled when it should be and disabled when it isn't, especially if it's in the build system where there's no unit test framework.

And that's with the failure party being just accidentally borking it so the test always fails or always succeeds when it shouldn't. You can see why it's a juicy target for malicious actions.