tcpreplay

Packages and Binaries:

tcpreplay

Tcpreplay is aimed at testing the performance of a NIDS by replaying real background network traffic in which to hide attacks. Tcpreplay allows you to control the speed at which the traffic is replayed, and can replay arbitrary tcpdump traces. Unlike programmatically-generated artificial traffic which doesn’t exercise the application/protocol inspection that a NIDS performs, and doesn’t reproduce the real-world anomalies that appear on production networks (asymmetric routes, traffic bursts/lulls, fragmentation, retransmissions, etc.), tcpreplay allows for exact replication of real traffic seen on real networks. It included the following executables tcpprep, tcprewrite, tcpreplay-edit, tcpbridge and pcap based captures are possible.

Installed size: 1.91 MB How to install: sudo apt install tcpreplay

Dependencies:
  • libc6

  • libdumbnet1

  • libpcap0.8

tcpbridge

Bridge network traffic across two interfaces

:~# tcpbridge --help
tcpbridge (tcpbridge) - Bridge network traffic across two interfaces
Usage:  tcpbridge [ -<flag> [<val>] | --<name>[{=| }<val>] ]...


:

   -r, --portmap=str          Rewrite TCP/UDP ports
				- may appear up to 9999 times
   -s, --seed=num             Randomize src/dst IPv4/v6 addresses w/ given seed
				- prohibits the option 'fuzz-seed'
   -N, --pnat=str             Rewrite IPv4/v6 addresses using pseudo-NAT
				- prohibits the option 'srcipmap'
				- may appear up to 2 times
   -S, --srcipmap=str         Rewrite source IPv4/v6 addresses using pseudo-NAT
				- prohibits the option 'pnat'
   -D, --dstipmap=str         Rewrite destination IPv4/v6 addresses using pseudo-NAT
				- prohibits the option 'pnat'
       --tcp-sequence=num     Change TCP Sequence (and ACK) numbers /w given seed
				- it must be in the range:
				  greater than or equal to 1
   -b, --skipbroadcast        Skip rewriting broadcast/multicast IPv4/v6 addresses
   -C, --fixcsum              Force recalculation of IPv4/TCP/UDP header checksums
   -m, --mtu=num              Override default MTU length (1500 bytes)
				- it must be in the range:
				  1 to 262144
       --mtu-trunc            Truncate packets larger then specified MTU
   -E, --efcs                 Remove Ethernet checksums (FCS) from end of frames
       --ttl=str              Modify the IPv4/v6 TTL/Hop Limit
       --tos=num              Set the IPv4 TOS/DiffServ/ECN byte
				- it must be in the range:
				  0 to 255
       --tclass=num           Set the IPv6 Traffic Class byte
				- it must be in the range:
				  0 to 255
       --flowlabel=num        Set the IPv6 Flow Label
				- it must be in the range:
				  0 to 1048575
   -F, --fixlen=str           Pad or truncate packet data to match header length
       --fuzz-seed=num        Fuzz 1 in X packets.  Edit bytes, length, or emulate packet drop
				- it must be in the range:
				  greater than or equal to 0
       --fuzz-factor=num      Set the Fuzz 1 in X packet ratio (default 1 in 8 packets)
				- requires the option 'fuzz-seed'
				- it must be in the range:
				  greater than or equal to 1
       --skipl2broadcast      Skip rewriting broadcast/multicast Layer 2 addresses
       --dlt=str              Override output DLT encapsulation
       --enet-dmac=str        Override destination ethernet MAC addresses
       --enet-smac=str        Override source ethernet MAC addresses
       --enet-subsmac=str     Substitute MAC addresses
				- may appear up to 9999 times
       --enet-mac-seed=num    Randomize MAC addresses
				- prohibits these options:
				enet-smac
				enet-dmac
				enet-subsmac
       --enet-mac-seed-keep-bytes=num Randomize MAC addresses
				- requires the option 'enet-mac-seed'
				- it must be in the range:
				  1 to 6
       --enet-vlan=str        Specify ethernet 802.1q VLAN tag mode
       --enet-vlan-tag=num    Specify the new ethernet 802.1q VLAN tag value
				- requires the option 'enet-vlan'
				- it must be in the range:
				  0 to 4095
       --enet-vlan-cfi=num    Specify the ethernet 802.1q VLAN CFI value
				- requires the option 'enet-vlan'
				- it must be in the range:
				  0 to 1
       --enet-vlan-pri=num    Specify the ethernet 802.1q VLAN priority
				- requires the option 'enet-vlan'
				- it must be in the range:
				  0 to 7
       --enet-vlan-proto=str  Specify VLAN tag protocol 802.1q or 802.1ad
       --hdlc-control=num     Specify HDLC control value
       --hdlc-address=num     Specify HDLC address
       --user-dlt=num         Set output file DLT type
       --user-dlink=str       Rewrite Data-Link layer with user specified data
				- may appear up to 2 times
   -d, --dbug=num             Enable debugging output
				- it must be in the range:
				  0 to 5
   -i, --intf1=str            Primary interface (listen in uni-directional mode)
   -I, --intf2=str            Secondary interface (send in uni-directional mode)
   -u, --unidir               Send and receive in only one direction
       --listnics             List available network interfaces and exit
   -L, --limit=num            Limit the number of packets to send
				- it must be in the range:
				  greater than or equal to 1
   -M, --mac=str              MAC addresses of local NIC's
				- may appear up to 2 times
   -x, --include=str          Include only packets matching rule
				- prohibits the option 'exclude'
   -X, --exclude=str          Exclude any packet matching this rule
				- prohibits the option 'include'
   -P, --pid                  Print the PID of tcpbridge at startup
   -v, --verbose              Print decoded packets via tcpdump to STDOUT
   -A, --decode=str           Arguments passed to tcpdump decoder
				- requires the option 'verbose'
   -V, --version              Print version information
   -h, --less-help            Display less usage information and exit

Version, usage and configuration options:

   -H, --help                 display extended usage information and exit
   -!, --more-help            extended usage information passed thru pager
       --save-opts[=arg]      save the option state to a config file
       --load-opts=str        load options from a config file
				- disabled as '--no-load-opts'
				- may appear multiple times

Options are specified by doubled hyphens and their name or by a single
hyphen and the flag character.
tcpbridge is a tool for selectively bridging network traffic across two
interfaces and optionally modifying the packets in between

The following option preset mechanisms are supported:
 - reading file /usr/bin/.tcpbridgerc
The basic operation of tcpbridge is to be a network bridge between two
subnets.  All packets received on one interface are sent via the other.

Optionally, packets can be edited in a variety of ways according to your
needs.

For more details, please see the Tcpreplay Manual at:
http://tcpreplay.appneta.com

Please send bug reports to:  <>

tcpcapinfo

Pcap file dissector for debugging broken pcap files


tcpliveplay

Replays network traffic stored in a pcap file on live networks using new TCP connections


tcpprep

Create a tcpreplay cache cache file from a pcap file.


tcpreplay

Replay network traffic stored in pcap files


tcpreplay-edit

Replay network traffic stored in pcap files


tcprewrite

Rewrite the packets in a pcap file.


Updated on: 2023-Mar-08


Last updated

Was this helpful?