2008-07-22 19:37:05 +00:00
|
|
|
##
|
2008-10-23 02:43:21 +00:00
|
|
|
# $Id$
|
2008-07-22 19:37:05 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
##
|
|
|
|
# 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/projects/Framework/
|
|
|
|
##
|
|
|
|
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
require 'scruby'
|
|
|
|
|
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
class Metasploit3 < Msf::Auxiliary
|
2008-07-22 19:37:05 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::Ip
|
|
|
|
include Msf::Auxiliary::Scanner
|
2008-07-22 19:37:05 +00:00
|
|
|
|
|
|
|
def initialize
|
|
|
|
super(
|
|
|
|
'Name' => 'Simple IP Spoofing Tester',
|
2008-10-23 02:43:21 +00:00
|
|
|
'Version' => '$Revision$',
|
2008-07-22 19:37:05 +00:00
|
|
|
'Description' => 'Simple IP Spoofing Tester',
|
|
|
|
'Author' => 'hdm',
|
|
|
|
'License' => MSF_LICENSE
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
def run_host(ip)
|
|
|
|
print_status("Sending a packet to host #{ip}")
|
|
|
|
|
|
|
|
connect_ip if not ip_sock
|
|
|
|
buff = (
|
|
|
|
Scruby::IP.new(
|
|
|
|
:src => ip,
|
|
|
|
:dst => ip,
|
|
|
|
:proto => 17,
|
|
|
|
:ttl => 255,
|
|
|
|
:id => 0xdead
|
|
|
|
)/Scruby::UDP.new(
|
|
|
|
:sport => 53,
|
|
|
|
:dport => 53
|
|
|
|
)/"HELLO WORLD"
|
|
|
|
).to_net
|
|
|
|
|
|
|
|
ip_sock.sendto(buff, ip)
|
|
|
|
end
|
|
|
|
|
|
|
|
|
2008-10-19 21:03:39 +00:00
|
|
|
end
|