|
Topic: Dr.Web 4.33 antivirus LHA long directory name heap
overflow
Announced: 2006-09-19
Product: Dr.Web antivirus
Vendor: http://www.drweb.com/
Impact: Code execution
Affected product: Dr.Web 4.33, probably earlier versions also
Credits: Jean-S=E9bastien Guay-Leroux
CVE ID: CVE-2006-4438
I. BACKGROUND
Dr.Web, a new generation of a virus scanner, searches and kills file
and boot viruses, as well as combination viruses, which infect both
files and boot sectors.
The SpIDer intercepts all attempts to access files and disk system
areas and checks them for viruses "on-the-fly" first. Having detected
a virus, SpIDer removes or locks it, granting access to the infected
file only if it has been successfully cured.
A highlight of Dr.Web that differ it from other scanners is the
heuristic analyzer along with the traditional mechanism for detecting
viruses by signatures (a specific byte string in the virus code that
definitely identifies the virus).
Updates for new virus-extensions online via Internet
o Available for following systems:
o Windows 9x, Me, XP, 2000, 2003
o LINUX
o FreeBSD, OpenBSD
o Solaris
o Novell
o OS/2
II. DESCRIPTION
When building a special LHA archive with a long directory name in an
extended directory header, a fixed size buffer on the heap is
overflowed.
When processing this malicious archive, it is then possible to make
Dr.Web run arbitrary code by overwriting some internal malloc
management informations.
III. IMPACT
Denial of service and possibly code execution.
IV. EXPLOIT
A working exploit version was developped for Dr.Web (R) Scanner for
Linux v4.33 (4.33.0.09211). See appendix 1.
V. SOLUTION
The vendor did not provide any patch or workarounds for this security
flaw. It is suggested to either change your antivirus software or to
disable archive scanning until the vendor releases a patch.
Disabling archive scanning greatly reduces DrWeb's power to detect
viruses. To disable it, you need to modify drweb.ini and change the
"CheckArchives" line to:
CheckArchives = No
VI. CREDITS
Vulnerability was discovered by Jean-Seastien Guay-Leroux.
VII. TIMELINE
2006-04-xx : Bug is discovered (I don't remember when exactly :-)
2006-08-11 : Proof of concept code is written.
2006-08-25 : Vendor is notified via security@drweb.com and
support@drweb.com.
2006-08-29 : Vendor says the bug was submitted to the developpers for
review.
2006-09-05 : Vendor is asked to provide an update on the bug.
2006-09-06 : Vendor says the request has been forwarded to the
developpers.
2006-09-11 : Vendor is asked, again, to provide an update on the bug.
2006-09-11 : Vendor replies with : "Sorry, no action yet."
2006-09-19 : Advisory is published.
VIII. APPENDIX 1
/********************************************************************
stetoscope.c:
Dr.Web 4.33 antivirus LHA directory name heap overflow for linux
- Howto:
Find a valid GOT entry to hijack with objdump -R /opt/drweb/drweb .
I guess that you can use the address of free(), but my exploit
uses the address of realpath(). There was a NULL byte in the GOT
entry of free() so I had to find something else ;-)
Calling the exploit will produce a file. Scan this file with a
vulnerable version of drweb and you will, hopefully, get a shell :-)
Good luck!
- Exploit particularities:
- There is a NOP sled using \xeb\x0a . Increases exploit
reliability
- 0xff and 0x00 are filtered caracters
- Bypass some malloc security checks added in malloc.c:
Little security check which won't hurt performance: the
allocator never wrapps around at the end of the address space.
Therefore we can exclude some size values which might appear
here by accident or by "design" from some intruder.
This thread helped me a lot :-) :
http://archives.neohapsis.com/archives/dailydave/2006-
q1/thread.html#149
- Shellcode took from Metasploit's shellcode generator.
- Coded by:
Jean-Sebastien Guay-Leroux
http://www.guay-leroux.com
*********************************************************************/
#include