Mirror upstream PacketFu fix on ICMP size
parent
121353b360
commit
c695f429d5
|
@ -124,7 +124,7 @@ module PacketFu
|
||||||
attr_accessor :eth_header, :ip_header, :icmp_header
|
attr_accessor :eth_header, :ip_header, :icmp_header
|
||||||
|
|
||||||
def self.can_parse?(str)
|
def self.can_parse?(str)
|
||||||
return false unless str.size >= 54
|
return false unless str.size >= 38
|
||||||
return false unless EthPacket.can_parse? str
|
return false unless EthPacket.can_parse? str
|
||||||
return false unless IPPacket.can_parse? str
|
return false unless IPPacket.can_parse? str
|
||||||
return false unless str[23,1] == "\x01"
|
return false unless str[23,1] == "\x01"
|
||||||
|
|
|
@ -34,7 +34,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
'References' =>
|
'References' =>
|
||||||
[
|
[
|
||||||
# packetfu
|
# packetfu
|
||||||
['URL','http://code.google.com/p/packetfu/'],
|
['URL','https://github.com/todb/packetfu'],
|
||||||
# nping
|
# nping
|
||||||
['URL', 'http://nmap.org/book/nping-man.html'],
|
['URL', 'http://nmap.org/book/nping-man.html'],
|
||||||
# simple icmp
|
# simple icmp
|
||||||
|
@ -98,6 +98,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
|
|
||||||
def icmp_listener
|
def icmp_listener
|
||||||
# start icmp listener
|
# start icmp listener
|
||||||
|
$stderr.puts "Starting for real"
|
||||||
|
|
||||||
print_status("ICMP Listener started on #{@interface} (#{@iface_ip}). Monitoring for trigger packet containing #{datastore['START_TRIGGER']}")
|
print_status("ICMP Listener started on #{@interface} (#{@iface_ip}). Monitoring for trigger packet containing #{datastore['START_TRIGGER']}")
|
||||||
if datastore['FNAME_IN_PACKET']
|
if datastore['FNAME_IN_PACKET']
|
||||||
|
@ -114,6 +115,8 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
cap.stream.each do | pkt |
|
cap.stream.each do | pkt |
|
||||||
packet = PacketFu::Packet.parse(pkt)
|
packet = PacketFu::Packet.parse(pkt)
|
||||||
data = packet.payload[4..-1]
|
data = packet.payload[4..-1]
|
||||||
|
$stderr.puts packet.inspect
|
||||||
|
$stderr.puts packet.inspect_hex
|
||||||
|
|
||||||
if packet.is_icmp? and data =~ /#{datastore['START_TRIGGER']}/
|
if packet.is_icmp? and data =~ /#{datastore['START_TRIGGER']}/
|
||||||
# start of new file detected
|
# start of new file detected
|
||||||
|
|
Loading…
Reference in New Issue