0
votes

when a client sends 10 TCP SYN packets by hping3(not spoofing), server responds and sends 10 TCP SYN+ACK packets. now client should answer to server and Establish the connection by sending 10 ACK packets, but client sends 10 RST and terminates the half-open connections(i guess that's because linux kernel responds).

how can i send 10 SYN packets per second (to the same destination with different source ports ) and in response of SYN+ACKs, send ACK and establish the connections? thanks very much

2

2 Answers

1
votes

hping3 sends raw packets, without opening a connection-oriented socket with the kernel -- thus the RST. In order to get the kernel to establish the connection, you must keep a socket open on your application end. This means the application must keep running, if it shuts down, the kernel will reset all the open sockets.

Your options are limit, you can try 'nc' (netcat), and start a new process for each connection you'd like to open. Or otherwise write a program that opens multiple connections, each using a different socket to ensure the source port is different for each connect. Keep in mind that there's a limit to how many sockets you can open in a single program, and on a system as a whole.

1
votes

You may need to use another tool, like tcpgoon , that completes the handshake for you, keeping open connections while the test is being executed