Registration Weakness in Linux Kernel's Binary formats
I sincerely think you're all missing the point here.
The observation is in fact something that can be used by rootkit writers or developers of other forms of malware. Meaning that this is always something else that people who work to make Linux a safer environment will have to watch and look for (think of rootkit detectors, for an example). I'm glad they've reported it, as someone might be using it already for God knows how long. All very stealthy. All I can think is that this is a very good opportunity for us to rethink some designs and see if a little bit of effort wouldn't be worth the advantages a patch might bring.
Don't get me wrong. I truly appreciate the freedom that Linux provides, but this "well, root should be able to do anything, anyway" mentality won't get this OS anywhere security-wise. If everyone thought like that, then I'd guess that sys_call_table would be an exported symbol until now, linux-gate wouldn't be randomized, and so on.
Just a thought.
Cheers,
Julio Auto
Quoted 31 lines · Chase Venters
Quoted 8 lines · SHELLCODE Security Research
Hello,
The present document aims to demonstrate a design weakness found in the handling of simplylinked lists used to register binary formats handled by Linux kernel, and affects all the kernel families(2.0/2.2/2.4/2.6), allowing the insertion of infection modules in kernel space that can be used by malicious users to create infection tools, for example rootkits.
Yay, you've been Slashdotted!
Question: Why did you personally submit this to Slashdot when it is absolutely clear that the observation is akin to figuring out a process can call
fork()andexec()and become "/bin/rm" with an argv of "/bin/rm", "-rf", and "*"?Is this what you call good marketing?
Quoted 4 lines
POC, details and proposed solution at:
English version: http://www.shellcode.com.ar/docz/binfmt-en.pdf
Spanish version: http://www.shellcode.com.ar/docz/binfmt-es.pdfThanks,
Chase
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 12 lines · Julio Auto
I sincerely think you're all missing the point here.
The observation is in fact something that can be used by rootkit writers or developers of other forms of malware. Meaning that this is always something else that people who work to make Linux a safer environment will have to watch and look for (think of rootkit detectors, for an example). I'm glad they've reported it, as someone might be using it already for God knows how long. All very stealthy. All I can think is that this is a very good opportunity for us to rethink some designs and see if a little bit of effort wouldn't be worth the advantages a patch might bring.
Quoted 6 lines
Don't get me wrong. I truly appreciate the freedom that Linux provides, but this "well, root should be able to do anything, anyway" mentality won't get this OS anywhere security-wise. If everyone thought like that, then I'd guess that
sys_call_tablewould be an exported symbol until now, linux-gate wouldn't be randomized, and so on.
Julio,
No one is trying to paper over any real problem here. This attack relies on
being able to insert an arbitrary kernel module into the running kernel. If you can do that, you can literally load _any_ code you want. Attaching to the binfmt callback list is one of about a billion things you could do.
If you're worried about this kind of attack, the only way to be safe is to
turn off kernel module support or use another mechanism to restrict who can load them.
I think it's a little bit silly for a "security researcher" to simultaneously
publish stuff in the news and in a developer community, especially if the threat is totally phony to begin with.
Quoted 5 lines
Just a thought.
Cheers,
Julio Auto
Thanks,
Chase
Quoted 37 lines · Chase Venters
Quoted 23 lines · SHELLCODE Security Research
Quoted 8 lines
Hello,
The present document aims to demonstrate a design weakness found in the handling of simplylinked lists used to register binary formats handled by Linux kernel, and affects all the kernel families(2.0/2.2/2.4/2.6), allowing the insertion of infection modules in kernel space that can be used by malicious users to create infection tools, for example rootkits.
Yay, you've been Slashdotted!
Question: Why did you personally submit this to Slashdot when it is absolutely clear that the observation is akin to figuring out a process can call
fork()andexec()and become "/bin/rm" with an argv of "/bin/rm", "-rf", and "*"?Is this what you call good marketing?
Quoted 3 lines
POC, details and proposed solution at:
English version: http://www.shellcode.com.ar/docz/binfmt-en.pdf
Spanish version: http://www.shellcode.com.ar/docz/binfmt-es.pdfQuoted 7 lines
Thanks,
Chase
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Ar Maw, 2006-10-03 am 23:25 -0500, ysgrifennodd Chase Venters:
Quoted 3 lines
I think it's a little bit silly for a "security researcher" to simultaneously
publish stuff in the news and in a developer community, especially if the threat is totally phony to begin with.
Given the way it was carefully fed to slashdot I suspect it may in fact be someone with brains who wanted to make slashdot look stupid and spoof them. If so they certainly scored 10/10 on that.
Quoted 8 lines · Alan Cox
Ar Maw, 2006-10-03 am 23:25 -0500, ysgrifennodd Chase Venters:
Quoted 3 lines
I think it's a little bit silly for a "security researcher" to simultaneously
publish stuff in the news and in a developer community, especially if the threat is totally phony to begin with.Given the way it was carefully fed to slashdot I suspect it may in fact be someone with brains who wanted to make slashdot look stupid and spoof them. If so they certainly scored 10/10 on that.
Brains are required to make slashdot look stupid ?
Quoted 1 line · Julio Auto
I sincerely think you're all missing the point here.
No, _you're_ missing the point.
Quoted 1 line
The observation is in fact something that can be used by rootkit writers or developers of other forms of malware.
This attack relies on being able to load an arbitrary attacker-defined kernel module. Full Stop. If you can load code into privileged mode it's game over regardless of what other designs and restrictions are in place. The "default" security model is that only root can load kernel code, but using SELinux or other methods it's possible to entirely prevent anything from being loaded after system boot or written to the kernel or bootloader images.
If the attacker gains kernel code access, it doesn't matter what "simply linked list" or whatever other garbage is being used, they can just overwrite the existing ELF loader with their shellcode if they want. Or they could insert a filesystem patch which always loads a virus into any ELF binary at load. Or they could just fork a kernel thread and run their shellcode there. Or they could load a copy of Windows from the CD drive and boot into that from Linux.
Kernel-level access implies ultimate trust and security, and *nothing* is going to change that.
Cheers,
Kyle Moffett
I'm thinking of starting a 'security research' firm and pointing out that if you can physically swap the boot device on a machine and reboot you can run 'arbitrary code'.
I might also point out the new boot device could have NetBSD on it, and gloss over the hundreds of other things that would be both possible and expectedly so...
Quoted 36 lines · Kyle Moffett
Quoted 1 line · Julio Auto
I sincerely think you're all missing the point here.
No, _you're_ missing the point.
Quoted 2 lines
The observation is in fact something that can be used by rootkit writers or developers of other forms of malware.
This attack relies on being able to load an arbitrary attacker- defined kernel module. Full Stop. If you can load code into privileged mode it's game over regardless of what other designs and restrictions are in place. The "default" security model is that only root can load kernel code, but using SELinux or other methods it's possible to entirely prevent anything from being loaded after system boot or written to the kernel or bootloader images.
If the attacker gains kernel code access, it doesn't matter what "simply linked list" or whatever other garbage is being used, they can just overwrite the existing ELF loader with their shellcode if they want. Or they could insert a filesystem patch which always loads a virus into any ELF binary at load. Or they could just fork a kernel thread and run their shellcode there. Or they could load a copy of Windows from the CD drive and boot into that from Linux.
Kernel-level access implies ultimate trust and security, and *nothing* is going to change that.
Cheers,
Kyle Moffett-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/