Packet Spoofing using Libnet (Issue)
I am doing packet spoofing but getting an issue.
I am capturing packet using SOCK_RAW, working with the TCP packets. doing Ethernet spoofing or just packet spoofing using LIBNET.
1 - Used RAW socket to start Sniffing
2 - When receive packet with SYN flag
- - then send a packet with SYN+ACK flags to complete second way of handshake of TCP connection
- - it is desirable that the receiver of the SYN+ACK packet must reply with an ACK packet to complete the handshake, but it is rather sending RESET flagged packet.
I am using following functions of Libnet in given order
libnet_init();
libnet_build_tcp_options();
libnet_build_tcp();
libnet_build_ipv4();
libnet_build_ethernet();
libnet_write();
libnet_destroy();
I am using temporary window size say it 500 in libnet_build_tcp(), while I am using some the string "\003\003\012\001\002\004\001\011\010\012\077\077\ 077\077\000\000\000\000\000\000" as tcp options in libnet_build_tcp_options().
Please tell where the problem is