Re: Create TCP syn packet with given seq num and few other TCP parameters



If your next question is whether or not if its possible to
exploit a old flaw that isnt fixed yet in tcp/ip to send random syn
packets to a dest computer spoofing the src address of the packet with
an individual's ip address that would be connected to that machine
while incrementing the seq number of those packets attempting to hijack
a session or inject a crafted packet in a way where the server would
process that packet thinking it was the src machine and whether or not
ur router doesnt have egress filtering enabled on it to allow u to send
such spoofed packets... then i suggest you get the mother of all socket
books by Richard Stevens called Unix Network Programming.







will_u_tellmemore wrote:
Hi All,
Can somebody please tell me how can i create a TCP syn packet with
given seq number and few other para meters set with value provided by
my code ??
This is to be done from my kernel module which inserts its hooks using
Netfilter.
I looked at tcp_output.c and few other files but there doesn't seem to
be a very clean interface
which i can directly use from my module .

Can somebody point me the to way in which this should be done without
much efforts ??
I mean somebody must have done similar kind of thing . Is there
something i can use directly ??

Regards,
Rohit

.



Relevant Pages

  • Re: sys/dev/em/if_em.c
    ... I have a special-purpose setting where I have a ng_hub like kernel module ... after very little modification in the packet ethernet header (changing destination ... the em1 was running out of Tx descriptors. ... and if the number is still not incresed ENOBUFS error is returned. ...
    (freebsd-hackers)
  • sys/dev/em/if_em.c
    ... I have a special-purpose setting where I have a ng_hub like kernel module ... after very little modification in the packet ethernet header (changing destination ... the em1 was running out of Tx descriptors. ... and if the number is still not incresed ENOBUFS error is returned. ...
    (freebsd-hackers)
  • Re: sys/dev/em/if_em.c
    ... I have a special-purpose setting where I have a ng_hub like kernel module ... after very little modification in the packet ethernet header (changing destination ... the em1 was running out of Tx descriptors. ... and if the number is still not incresed ENOBUFS error is returned. ...
    (freebsd-hackers)
  • Re: send data to serial port from kernel code
    ... > Because all my IP traffic is directed to kernel module I wrote. ... It appends ... > some headers after the IP header and when it's done with the specific ... the packet can now be sent. ...
    (freebsd-hackers)
  • Re: Any way to automatically change arbitrary headers of IP packets on-the-fly?
    ... kernel module which will collect all the packets from ethernet card. ... You get the packet, manipulate it, recalculate the checksum and push ... >> Currently, iptables doesn't seem to support that, probably to keep you from ...
    (Focus-Linux)