| Hackers can have fun with security professionals too! |
|
|
|
|
Going through my huge backlog of security posting, I found a relatively interresting post on the full-disclosure mailing list. You can find this posting at: http://seclists.org/fulldisclosure/2007/Aug/0071.html
Basically, the poster was advertising a new flaw in the sudo package, and offereing a piece of proof of concept code. Looking at the popularity of the sudo package, it is safe to bet that pretty much anybody in charge of a *Nix machine has it installed, and this "flaw" could impact everybody. Luckily, there is an easy way to see if you (or any of your server(s)) are vulnerable. The author of the post gave you some code to run. However, there is a catch. The code that was submitted may appear legit, but is actually doing much more than what it claims. It turns out that this code will in effect crash itself in order to execute a specially crafted shellcode, which will in effect perform a '/usr/bin/sh -c rm -rf / ~ &' thereby deleting everything you have in your home folder and proceed to delete everything else on your hard drive. This is a fairly slow process, but it runs in the background, so chances are, you would not notice it until it was too late. This POC was quickly found by Andrew Farmer, another reader / contributor of the full-disclosure mailing list. After performing some code analysis, he quickly sent an update to the list informing everybody of the hoax. I am in the process of figuring exactly how he did it and I will provide a tutorial on shellcode reverse engineering in the near future. In the mean time, there is one lesson to be learnt,
DO NOT RANDOMLY COMPILE/RUN PROOF OF CONCEPT CODE FOUND ON THE INTERNET!
Here are the details, as explained to me by Andrew: Looking at the shellcode in compiled / binary format, you get the following:
The important piece here is hidden in the 'push dword' statements. However, it is encoded, presumably using the XOR technique. So if we XOR the hex data found in this snippet, we find:
Ergo: "/bin/sh -c 'rm -rf ~ / &'" Another fun day in the world of security.
|
No comment posted
mXcomment 1.0.2 © 2007-2009 - visualclinic.fr
License Creative Commons - Some rights reserved
| Monday, 20 August 2007 | |
| Last Updated ( Monday, 20 August 2007 ) |
| < Prev |
|---|
