scapy ipv6 extension header packet being dropped
So i am using scapy with linux in order to send an IPv6 HTTP request to a
server after i successfully commence a 3 way TCP handshake.
The http request returns successfully if there are no extension headers (i
am doing it with ipv6), but if there are then i get no response back. I
doubt that the server drops the packet since i am sending it to the top
servers of the world (top 1000 ipv6 enabled servers) as a part of my
dissertation in order to see their compatibility. This is probably a
misconfiguration.
The format atm is:
I create an IPv6 packet/IPv6ExtHdrRouting().
long story short i use all 4 available extension headers and i get no
responses back, whearas if i use without i get full responses back. Why
are my packets getting dropped?
All the packets are sent without any parameters in them. If that is the
problem can you show me a sample initialization for each extension header
in order to get a response back?
EDIT:
my code is quite complex, after all procedures are run however i do
something like this:
site[:-1] is a website i.e. www.google.com
ip is an ipv6 address WITH extension headers.
The 3 way handshake is without extension headers as you can see, and when
i do the HTTP request i use the IP with extension headers.
An ip with extension header looks like this(without lower level details
such as TCP etc):
IPv6(dst=...)/IPv6ExtHdrHopByHop()
or
IPv6(dst=...)/IPv6ExtHdrHopByHop()/IPv6ExtHdrFragment()
destination=getIPv6Addr(site[:-1])
ip.dst=destination
syn =
IPv6(dst=getIPv6Addr(site[:-1]))/TCP(sport=12345,dport=80,
flags='S', seq=1000)#flag S is syn packet
syn_ack_rcv = sr1(syn,timeout=1)
my_ack = syn_ack_rcv.seq + 1
ack=IPv6(dst=getIPv6Addr(site[:-1]))/TCP(sport=12345,dport=80,
flags='A', seq=1001, ack=my_ack)#flag S is syn packet
send(ack)
httpRequest = 'GET / HTTP/1.1\r\nHost:' +site[:-1]
+"\r\n\r\n"
http=ip/TCP(sport=11235,dport=80,seq=1002,
ack=my_ack)/httpRequest
answers = sr1(http,timeout=1)
No comments:
Post a Comment