RE: IPv6 address fuzzing?
Tim Broberg <Tim.Broberg <at> exar.com>
2009-08-04 16:49:31 GMT
What I typed is below, with similar actions for IPv4 and IPv6.
What I'm doing is poking at an API, so I don't much care what the addresses really are.
I'm just surprised to see fuzz generate a machine value and send it to pton, which appears to want an internal
value passed in.
You're probably right, James, that there isn't much sense fuzzing these values out to the network, even if
limited to 64-bit scope.
Sounds like this is a "Why would you do that?!" condition.
- Tim.
>>> class MyIPv4Packet(Packet):
... name = "MyIPv4Packet"
... fields_desc = [
... SourceIPField("src","dst"),
... IPField("dst", "127.0.0.1")
... ]
...
>>> class MyIPv6Packet(Packet):
... name = "MyIPv6Packet"
... fields_desc = [
... SourceIP6Field("src", "dst"), # dst is for src <at> selection
... IP6Field("dst", "::1")
... ]
...
>>> print "Gen Packets"
Gen Packets
>>> p4=MyIPv4Packet()
>>> print "Show Packets"
Show Packets
>>> p4.show()
###[ MyIPv4Packet ]###
src= 127.0.0.1
dst= 127.0.0.1
>>> print "Build Packets"
Build Packets
>>> p4.show2()
###[ MyIPv4Packet ]###
src= 0.0.0.0
dst= 127.0.0.1
>>> print "Fuzz Packets"
Fuzz Packets
>>> q4=fuzz(p4)
>>> print "Show Fuzzed Packets"
Show Fuzzed Packets
>>> q4.show()
###[ MyIPv4Packet ]###
src= 10.0.2.15
dst= 242.100.68.35
>>> print "Build Fuzzed Packets"
Build Fuzzed Packets
>>> q4.show()
###[ MyIPv4Packet ]###
src= 10.0.2.15
dst= 68.78.121.178
>>>
>>> print "Gen Packets"
Gen Packets
>>> p6=MyIPv6Packet()
>>> print "Show Packets"
Show Packets
>>> p6.show()
###[ MyIPv6Packet ]###
src= ::1
dst= ::1
>>> print "Build Packets"
Build Packets
>>> p6.show2()
###[ MyIPv6Packet ]###
src= ::1
dst= ::1
>>> print "Fuzz Packets"
Fuzz Packets
>>> q6=fuzz(p6)
>>> print "Show Fuzzed Packets"
Show Fuzzed Packets
>>> q6.show()
###[ MyIPv6Packet ]###
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/scapy/packet.py", line 794, in show
vcol(f.i2repr(self,fvalue)))
File "/usr/lib/python2.6/site-packages/scapy/layers/inet6.py", line 200, in i2repr
return self.i2h(pkt,x)
File "/usr/lib/python2.6/site-packages/scapy/layers/inet6.py", line 231, in i2h
iff,x,nh = conf.route6.route(dst)
File "/usr/lib/python2.6/site-packages/scapy/route6.py", line 192, in route
dst = socket.getaddrinfo(savedst, None, socket.AF_INET6)[0][-1][0]
socket.gaierror: [Errno -2] Name or service not known
>>> print "Build Fuzzed Packets"
Build Fuzzed Packets
>>> q6.show()
###[ MyIPv6Packet ]###
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/scapy/packet.py", line 794, in show
vcol(f.i2repr(self,fvalue)))
File "/usr/lib/python2.6/site-packages/scapy/layers/inet6.py", line 200, in i2repr
return self.i2h(pkt,x)
File "/usr/lib/python2.6/site-packages/scapy/layers/inet6.py", line 231, in i2h
iff,x,nh = conf.route6.route(dst)
File "/usr/lib/python2.6/site-packages/scapy/route6.py", line 192, in route
dst = socket.getaddrinfo(savedst, None, socket.AF_INET6)[0][-1][0]
socket.gaierror: [Errno -2] Name or service not known
>>>
________________________________________
From: Guillaume Valadon / ギョーム バラドン [guedou <at> hongo.wide.ad.jp]
Sent: Tuesday, August 04, 2009 1:43 AM
To: scapy.ml <at> secdev.org
Subject: Re: [scapy.ml] IPv6 address fuzzing?
> Is it practical to fuzz IPv6 addresses?
>
> When I try this, I get "socket.gaierror: [Errno -2] Name or service
> not known" at scapy/route6.py:192.
What did you type ?
Guillaume
--
Guillaume Valadon / ギョーム バラドン
guedou <at> hongo.wide.ad.jp
---------------------------------------------------------------------
To unsubscribe, send a mail to scapy.ml-unsubscribe <at> secdev.org
The information and any attached documents contained in this message
may be confidential and/or legally privileged. The message is
intended solely for the addressee(s). If you are not the intended
recipient, you are hereby notified that any use, dissemination, or
reproduction is strictly prohibited and may be unlawful. If you are
not the intended recipient, please contact the sender immediately by
return e-mail and destroy all copies of the original message.
---------------------------------------------------------------------
To unsubscribe, send a mail to scapy.ml-unsubscribe <at> secdev.org