Skip to content

Commit c695f42

Browse files
committed
Mirror upstream PacketFu fix on ICMP size
1 parent 121353b commit c695f42

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/packetfu/packetfu/protos/icmp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class ICMPPacket < Packet
124124
attr_accessor :eth_header, :ip_header, :icmp_header
125125

126126
def self.can_parse?(str)
127-
return false unless str.size >= 54
127+
return false unless str.size >= 38
128128
return false unless EthPacket.can_parse? str
129129
return false unless IPPacket.can_parse? str
130130
return false unless str[23,1] == "\x01"

modules/auxiliary/server/icmp_exfil.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def initialize
3434
'References' =>
3535
[
3636
# packetfu
37-
['URL','http://code.google.com/p/packetfu/'],
37+
['URL','https://github.com/todb/packetfu'],
3838
# nping
3939
['URL', 'http://nmap.org/book/nping-man.html'],
4040
# simple icmp
@@ -98,6 +98,7 @@ def run
9898

9999
def icmp_listener
100100
# start icmp listener
101+
$stderr.puts "Starting for real"
101102

102103
print_status("ICMP Listener started on #{@interface} (#{@iface_ip}). Monitoring for trigger packet containing #{datastore['START_TRIGGER']}")
103104
if datastore['FNAME_IN_PACKET']
@@ -114,6 +115,8 @@ def icmp_listener
114115
cap.stream.each do | pkt |
115116
packet = PacketFu::Packet.parse(pkt)
116117
data = packet.payload[4..-1]
118+
$stderr.puts packet.inspect
119+
$stderr.puts packet.inspect_hex
117120

118121
if packet.is_icmp? and data =~ /#{datastore['START_TRIGGER']}/
119122
# start of new file detected

0 commit comments

Comments
 (0)