3 .\" Manual for the malicious proxy
5 .\" (c) 2008 Straylight/Edgeware
8 .\"----- Licensing notice ---------------------------------------------------
10 .\" This file is part of Trivial IP Encryption (TrIPE).
12 .\" TrIPE is free software: you can redistribute it and/or modify it under
13 .\" the terms of the GNU General Public License as published by the Free
14 .\" Software Foundation; either version 3 of the License, or (at your
15 .\" option) any later version.
17 .\" TrIPE is distributed in the hope that it will be useful, but WITHOUT
18 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 .\" You should have received a copy of the GNU General Public License
23 .\" along with TrIPE. If not, see <https://www.gnu.org/licenses/>.
25 .\"--------------------------------------------------------------------------
26 .so ../common/defs.man \" @@@PRE@@@
28 .\"--------------------------------------------------------------------------
29 .TH tripe-mitm 8tripe "14 October 2003" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
31 .\"--------------------------------------------------------------------------
34 tripe-mitm \- malicious proxy for TrIPE
36 .\"--------------------------------------------------------------------------
44 .\"--------------------------------------------------------------------------
53 Its purpose is to test the robustness of the TrIPE implementation, by
54 deliberately introducing communication problems such as dropped,
55 repeated or corrupted packets.
57 The command line contains a sequence of directives, each of which has
61 (The delimiter character can be changed using the
64 A list of directives can be stored in a file, one per line, and included
68 .SS "Command line options"
69 The following options are recognized.
72 Write a very brief help message to standard output, and exit
76 Write the program's version number to standard output, and exit
80 Write a usage message to standard output, and exit successfully.
82 .BI "\-d, \-\-delimiter=" char
85 as the delimiter to separate argument names in directives, rather than
88 .BI "\-k, \-\-keyring=" file
91 The default keyring file is
93 in the current directory.
95 A directive is ignored if it is empty, or if its first character is a
97 Directives consist of a name followed by zero or more arguments,
98 separated by a delimiter character. The default delimiter is
100 but this can be overridden using the
102 option (see above); this manual uses
104 consistently as the delimiter character.
105 The following directives are recognized.
107 .BI peer: name : local-port : remote-addr : remote-port
108 Register a peer. We listen for packets on
116 identifies the public key which that peer uses to authenticate itself.
117 (Currently this is checked, but not used for anything.)
124 may be a hostname or an IP address in dotted-quad format. Exactly two
126 directives must be present. The one first registered is the
128 peer; the second is the
130 peer. The two peers must use
135 Read more directives from
137 Directives should appear one per line. Empty lines and comments are
138 permitted. An included file may include other files. It may even
139 include itself, though this is just a good way to tie the program in
140 knots until it runs out of file handles.
142 .BI filt: filter : args : \fR...
143 Apply a given filter to packets received from either peer. See the
144 description of filters below for more details.
146 .BI lfilt: filter : args : \fR...
147 Apply a given filter to packets received from the left peer.
149 .BI rfilt: filter : args :\fR...
150 Apply a given filter to packets received from the right peer.
152 .BI next: tag :\fR...
153 Begin the next branch of the first fork filter node named
155 in each filter chain. See below for more about filter chains.
157 .BI flood\fR[\fP: type : millis : size\fR]
158 Flood both peers with random packets. If
160 is given, it is interpreted as a TrIPE message type code in hexadecimal,
161 and the messages sent will have this type; otherwise the messages have
162 random type. Messages are sent approximately once every
164 milliseconds; the default interval is 10 milliseconds. The messages
167 bytes long each; the default size is 128 bytes.
169 .BI lflood\fR[\fP: type : millis : size\fR]
172 above, but only flood the left peer.
174 .BI rflood\fR[\fP: type : millis : size\fR]
177 above, but only flood the right peer.
179 Each peer has a filter chain associated with it. Messages received from
180 that peer get processed by the filter chain. Only if the filter chain
181 decides to send the message is it actually sent. (See the
183 filter, described below.)
184 Messages generated by a
186 directive (above) are also processed by a filter chain, just like normal
187 messages. The filters in a chain are processed in the order they were
190 The filters currently supported are as follows.
193 Send the message to the destination peer. This is the
195 way messages are sent. If your filter chains don't end in a
197 filter then nothing will get through!
200 Introduce a fork in a filter chain. A fork may have multiple branches
201 leading off it. The end of a branch is indicated by a
203 directive which names the fork
205 further filters added to the chain form a new parallel branch of that
206 fork. (If there are two forks with the same tag on a peer's chain, then
207 only the earliest is matched. This isn't helpful behaviour.)
209 .BI delay: qlen \fR[\fP: millis : p-replay\fR]
210 Delay, replay and reorder messages. A queue of
212 messages is maintained. If the queue fills up, or every
214 milliseconds (default 100), a message from the queue is chosen at random
215 and transmitted (i.e., processed by the rest of the filter chain). If
216 the message was transmitted due to a timer (rather than lack of space in
217 the queue) then it has a 1 in
219 probability (default 1 in 20) of being left in the queue.
221 .BI drop\fR[\fP: p-drop\fR]
222 Randomly drop messages. Each message has a 1 in
224 probability (default 1 in 5) of being discarded.
226 .BI corrupt\fR[\fP: p-corrupt\fR]
227 Randomly corrupt messages. Each message has a 1 in
229 probability (default 1 in 5) of being corrupted by having a
230 randomly chosen byte mangled. The message might be further corrupted,
235 .\"--------------------------------------------------------------------------
238 The parser is currently very primitive, and error handling is rather
239 poor. There are lots of pointless restrictions which wouldn't take very
240 long to fix. The program generally lacks polish. The program doesn't
241 understand the TrIPE protocol to a sufficient extent to really attack it
244 .\"--------------------------------------------------------------------------
249 .\"--------------------------------------------------------------------------
252 Mark Wooding, <mdw@distorted.org.uk>
254 .\"----- That's all, folks --------------------------------------------------