File: README

package info (click to toggle)
packeth 3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,116 kB
  • sloc: ansic: 11,823; makefile: 111; xml: 29; sh: 1
file content (160 lines) | stat: -rw-r--r-- 9,996 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
packETHcli is a cli (command line) version of packETH. It allows you to easily send packets from pcap file. 
It has different sending options although not all features from packETH are supported. 
It also has a receiver mode where packets sent by packETH or packETHcli can be captured and checked for errors.

NEWS: 
JUL 2019:  
- added burst mode (-m 6)

NOV 2018:
- added receiver option (mode -m -9) to count received packets
- added option to incluce pattern (predifined or custom) which can be checked by packETHcli in receiver mode  
  if all packets that were sent were also correctly received at the receiver site
- nanoseconds support
- added option to change packet rate while sending (ramp mode) in both directions
- added option to change packet size while sending (ramp mode) at constant pps or constant bandwidth
- option to select which packet should be sent in case there are many stored in pcap file
- added option to specify time to transmit (not only number of packets)
- IDS test mode included in main repo

INSTALLATION
~/packETH/cli# make

USAGE: ./packETHcli -m <mode > -i <interface> -f <file> [options]

 There are 5 diffent modes, use ./packETHcli -m <mode> to get detailed help for particular mode

   -m 1   - SEND PACKET ONCE (default mode): send packet from the pcap file once
   -m 2   - SEND PACKET CONTINUOUSLY WITH CONSTANT RATE: send (first) packet from pcap file at constant rate
   -m 3   - SEND PACKET CONTINUOUSLY WITH VARIABLE RATE (SPEED RAMP)
   -m 4   - SEND PACKET CONTINUOUSLY WITH VARIABLE SIZE (SIZE RAMP)
   -m 5   - SEND SEQUENCE OF PACKETS (IDS TEST MODE)  
   -m 6   - SEND PACKETS IN BURST MODE (CONSTANT BURST)
   -m 9   - RECEIVER MODE (count packets sent by packETHcli or packETH

 -f <file> - file name where packet is stored in pcap format (or attack definitions file in Snort rule format in mode 5)
 -I <seconds> - time interval to display results (default 1s)

FOR EXAMPLES SEE: ./packETHcli -e

FOR COMPLETE HELP: ./packETHcli -h

MODES:

 -m 1   - SEND PACKET ONCE (default mode): send packet from the pcap file once
          Usage: ./packETHcli -m 1 -i <interface> -f <file> [-c]
          Optional parameter:
               -c <number>  - sequence number of packet stored in pcap file (by default first packet will be sent)
                              to see sequence numbers of packets inside pcap file: tcpdump -# -r filename
               -I <seconds> - time interval to display results (default 1s)
          Example: packETHcli -i lo -f packet.pcap

 -m 2   - SEND PACKET CONTINUOUSLY WITH CONSTANT RATE: send (first) packet from pcap file at constant rate
          Usage: ./packETHcli -m 2 -i <interface> -f <file> [options]
          Required parameters:
              Number of packets to send or duration in seconds (only one option possible)
               -n <number, 0> - number of packets to send or 0 for infinite
               -t <seconds> - seconds to transmit
              Delay between packets or sendrate (only one option possible)
               -D <ns>        - delay between packets in nano seconds;
               -d <us>        - delay between packets in micro seconds;
               -d 0           - maximum speed with counters
               -d -1          - maximum speed without counters
               -b <bandwidth> - desired sending rate in kbit/s
               -B <bandwidth> - desired sending rate in Mbit/s
          Optional parameters:
               -c <number>  - sequence number of packet stored in pcap file (by default first packet will be sent)
               -I <seconds> - time interval to display results (default 1s)
              Insert predifined pattern into packet:
               -x             - insert pattern "a9b8c7d6" and counter inside last 10 bytes of packet
              Insert custom pattern at custom positon and counter at custom position
               -q <offset>    - where should the pattern be (bytes offset)
               -w <pattern>   - what should be the pattern to match
               -o <offset>    - where should the inceremented counter be (bytes offset)

          Example: ./packETHcli -i eth0 -m 2 -B 100 -n 10000 -f p1.pcap

 -m 3   - SEND PACKET CONTINUOUSLY WITH VARIABLE RATE (SPEED RAMP)
          Usage: ./packETHcli -m 3 -i <interface> -f <file> [options]
          Required parameters:
              Number of packets to send or duration in seconds (only one option possible)
               -n <number, 0> - number of packets to send or 0 for infinite
               -t <seconds> - seconds to transmit
              Startrate, Stoprate, Steprate and Step duration (only one option possible):
               -z "<startrate stoprate steprate)" in kbit/s
               -Z "<startrate stoprate steprate)" in Mbit/s
              Step duration:
               -p <seconds> - period between steps in seconds
          Optional parameters:
               -c <number>  - sequence number of packet stored in pcap file (by default first packet will be sent)
               -I <seconds> - time interval to display results (default 1s)
              Insert predifined pattern into packet:
               -x             - insert pattern "a9b8c7d6" and counter inside last 10 bytes of packet
              Insert custom pattern at custom positon and counter at custom position
               -q <offset>    - where should the pattern be (bytes offset)
               -w <pattern>   - what should be the pattern to match
               -o <offset>    - where should the inceremented counter be (bytes offset)

          Example: ./packETHcli -i eth1 -m 3 -t 3600 -Z "500 100 1" -p 5 -f p1.pcap

 -m 4   - SEND PACKET CONTINUOUSLY WITH VARIABLE SIZE (SIZE RAMP)
          Usage: ./packETHcli -m 4 -i <interface> -f <file> [options]
          Required parameters:
              Number of packets to send or duration in seconds (only one option possible)
               -n <number, 0> - number of packets to send or 0 for infinite
               -t <seconds> - seconds to transmit
              Delay between packets or sendrate (only one option possible).  
              Choose first option for constant pps and second one for constant bandwidth
               -d <us, 0> - delay between packets in micro seconds; select 0 for maximum speed
               -D <ns, 0, -1> - delay between packets in nano seconds;  
                                select 0 for maximum speed with counters; select -1 for max speed without counters)
               -b <bandwidth> - desired sending rate in kbit/s
               -B <bandwidth> - desired sending rate in Mbit/s
              Startsize, Stopsize, Stepsize and Step duration number
               -s "<startsize stopsize stepsize>" in bytes (please note that TCP&UDP checksums are not recalculated!)
               -p <seconds> - period between steps in seconds
          Optional parameters:
               -c <number>  - sequence number of packet stored in pcap file (by default first packet will be sent)
               -I <seconds> - time interval to display results (default 1s)
              Insert predifined pattern into packet:
               -x             - insert pattern "a9b8c7d6" and counter inside last 10 bytes of packet
          Example: ./packETHcli -i eth1 -m 4 -d 2000 -n 0 -s "100 1500 100" -p 5 -f p1.pcap

 -m 5   - SEND SEQUENCE OF PACKETS (IDS TEST MODE)
          Usage: ./packETHcli -m 5 -i <interface> -f <attack definitions file> [options]
          Required parameters
            -f <attack definitions file in Snort rule format>
            -a <numbers from 0 to 4> - innocent traffic for 0, 25% attack for 1, 50% attack for 2, 75% attack for 3, 100% attack for 4>
            -S <packet size in bytes OR -s "<startsize stopsize stepsize>" -p <step period>
            -d <us, 0, -1> - delay between packets OR -b <bandwidth in kbit/s>  OR -B <bandwidth in Mbit/s
            -n <number, 0> - number of packets to send (0 for infinite) OR -t <duration in seconds>
           Example: ./packETHcli -i lo -f sample_snort_rules.txt -B 10 -m 5 -t 60 -S 1000 -a 2

 -m 6   - SEND PACKETS IN BURST MODE (CONSTANT BURST)
          Usage: ./packETHcli -m 4 -i <interface> -f <pcap file> [options]
          Required parameters:
              Number of packets to send or duration in seconds (only one option possible)
               -n <number, 0> - number of packets to send or 0 for infinite
               -t <seconds> - seconds to transmit
              Number of packets in burst, delay between packets in burst (us), delay till next burst (us)
               -L "<packets_in_burst  delay_between_packets_in_burst_us  delay_between_bursts_us>"
          Optional parameters:
               -c <number>  - sequence number of packet stored in pcap file (by default first packet will be sent)
               -I <seconds> - time interval to display results (default 1s)
              Insert predifined pattern into packet:
               -x             - insert pattern "a9b8c7d6" and counter inside last 10 bytes of packet
          Example: ./packETHcli -i eth1 -m 6 -n 0 -L "100 1 100" -f p1.pcap

 -m 9   - RECEIVER MODE: COUNT PACKETS (FROM packETHcli)
          Usage: ./packETHcli -m 9 -i <interface> [-x OR -o <offset counter> -q <offset pattern> -w <pattern>]
          Optional parameter:
          To count packets with predifined pattern sent by packETHcli use -x option on both sides (sender and receiver):
            -x   - Last 10 bytes in received packets will be checked for pattern "a8b7c7d6" and counter
          To count packets with custom pattern at custom positon and counter at custom position:
            -q <offset>   - where should the pattern be (bytes offset)
            -w <pattern>  - what should be the pattern to match
            -o <offset>   - where should the inceremented counter be (bytes offset)
          Examples:
          ./packETHcli -i eth0
          ./packETHcli -i eth0 -x
          ./packETHcli -i eth0 -o 60 -q 70 -w 12345678