News for hackers. Stuff that matters.
Re:The Linux Backdoor Attempt of 2003 by seliopou on Wednesday October 09, 2013 @12:48PM (#6522327)
What's clever about that code is that the conditional will always fail. The assignment expression setting the uid to 0 will itself evaluate to 0, which will cause the conjunction to evaluate to "false." On first glance, the code makes you believe that the body of the conditional is necessary, when it's in fact dead code. That's nice camouflage.
Re:The Linux Backdoor Attempt of 2003 by cjensen on Wednesday October 09, 2013 @07:29PM (#6524651)
I like the extra parens in the if condition. It's genius.

On the face of it, it appears that the parens are to ensure correct operator precedence because a bitwise OR is used (a common idiom because bitwise operators have the wrong precedence versus comparison in C).

But that's not what the parens are really for! They are there because gcc complains about assignments inside of conditionals unless you put parens around it.

Re:The Linux Backdoor Attempt of 2003 by cynwoody on Wednesday October 09, 2013 @03:28PM (#6523270)
Also clever is the fact that the first clause acts as a password, so that the backdoor opens only if called with the supposedly invalid option combination.