user270398
user270398

Reputation: 451

tcp packet injection -?

i have TCP client on host 192.168.1.13 reading data from static ip 176.132.74.74 ... i need to inject crafted packets into this connection to test if my firewall can filter out spoofed traffic. I've tried "nemesis" 1.4beta3 from the host 192.168.1.15: nemesis tcp -v -D 192.168.1.13 -S 176.132.74.74 -fS -fA but got an error: "Unable to allocate socket descriptor" TCP urgent pointer: 0 I am making some error in using of nemesis, or can i only use it from the same host ( 192.168.1.13)? Are there other similar tools i could use to this purpose? i'd appreciate some advise: there's not much of it i could find on using of nemesis

Upvotes: 1

Views: 2699

Answers (1)

LarryPel
LarryPel

Reputation: 296

You can give a try to libcrafter. Is a high level library for C++ to generate and sniff network packets. And also contains a very naive implementation of the TCP/IP stack (fragmentation is no handled yet) at USER level that enables working with crafted TCP streams. For example you can control the ACK and SEQ numbers of a connection, or use the SEQ/ACK numbers and IPs of an already established connection. So, is possible to inject traffic to a connection and also hijack it.

At USER level I mean that the library works with TCP streams on "kernel's back". So, to properly use the TCP stream class, you need to work a little with IPTABLES.

Although there isn't a documentation for the TCPConnection class (yet), you can take a look at some examples on the "examples" git repository.

Cheers.

Upvotes: 3

Related Questions