How to intercept packets during handshake using Socket Filters in NKE?
How to intercept packets during handshake using Socket Filters in NKE?
- Subject: How to intercept packets during handshake using Socket Filters in NKE?
- From: Mike Chen <email@hidden>
- Date: Wed, 9 Feb 2011 18:05:51 +0800
Hi fellow kernel developers,
I'm writing this network kernel extension to inject packets during TCP
handshake. The client initiating a TCP connection sends a packet, with
a selected sequence number and SYN flag on, to the remote server. As
soon as the server receives client's request, it replies with a packet
containing both SYN+ACK numbers. I'll inject my packets after server's
confirmation, using the SYN and ACK numbers provided in packet sent by
server. I tried to intercept the data I need in sf_data_in_func, yet
packets during handshake don't go though sf_data_in_func (or out).
Therefore,
1) Is there any way to get the TCP parameters of a particular socket_t
without using filters?
2) Is there any way of intercepting packets during handshake using
Socket filters?
I was also thinking that I can use both IP and Socket filters, former
for reading TCP parameters and latter for connection tracking. But
that could mean a ton of works and potentially buggy kernel extension.
Can you suggest me of a better solution if the existing kernel APIs
don't fit?
Thanks,
Mike Chen.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden