| 1 |
.TH HUNT 1 |
| 2 |
.\" |
| 3 |
.\" |
| 4 |
.SH HUNT |
| 5 |
hunt \- Network security auditing tool. |
| 6 |
.SH SYNOPSIS |
| 7 |
.B hunt |
| 8 |
.I "[-V] [-v] [-i interface]" |
| 9 |
.br |
| 10 |
.SH "DESCRIPTION" |
| 11 |
This manual page documents briefly the |
| 12 |
.BR hunt |
| 13 |
command. |
| 14 |
This manual page was written for the Debian GNU/Linux distribution |
| 15 |
because the original program does not have a manual page. |
| 16 |
Instead, it has documentation in the GNU Info format; see below. |
| 17 |
.SH READ FIRST |
| 18 |
Please make sure you KNOW what you are doing before using hunt. |
| 19 |
It is recommended that you should test how it behaves on some test |
| 20 |
connections and then use it wisely. |
| 21 |
.SH OVERVIEW |
| 22 |
Hunt is a program for intruding into a connection, watching it and resetting |
| 23 |
it. It has several features, which I didn't find in any product like |
| 24 |
Juggernaut or T-sight that inspired me in my development. |
| 25 |
I found Juggernaut not flexible enough for further development so I |
| 26 |
started from scratch (see FEATURES and DESIGN OVERVIEW). |
| 27 |
Note that hunt is operating on Ethernet and is best used for connections |
| 28 |
which can be watched through it. However, it is possible to do something |
| 29 |
even for hosts on another segments or hosts that are on switched ports. |
| 30 |
The hunt doesn't distinguish between local network connections and connections |
| 31 |
going to/from Internet. It can handle all connections it sees. |
| 32 |
.PP |
| 33 |
Connection hijacking is aimed primarily at the telnet or rlogin traffic but |
| 34 |
it can be used for another traffic too. |
| 35 |
The reset, watching, arp, ... features are common to all connections. |
| 36 |
.SH FEATURES |
| 37 |
.TP |
| 38 |
.B Connection Management |
| 39 |
.B * |
| 40 |
Setting what connections you are interested in. |
| 41 |
.br |
| 42 |
.B * |
| 43 |
Detecting an ongoing connection (not only SYN started). |
| 44 |
.br |
| 45 |
.B * |
| 46 |
Normal active hijacking with the detection of the ACK storm. |
| 47 |
.br |
| 48 |
.B * |
| 49 |
ARP spoofed/Normal hijacking with the detection of successful ARP spoof. |
| 50 |
.br |
| 51 |
.B * |
| 52 |
Synchronization of the true client with the server after hijacking (so that the connection don't have to be reset). |
| 53 |
.br |
| 54 |
.B * |
| 55 |
Resetting connection. |
| 56 |
.br |
| 57 |
.B * |
| 58 |
Watching connection. |
| 59 |
.TP |
| 60 |
.B Daemons |
| 61 |
.B * |
| 62 |
Reset daemon for automatic connection resetting. |
| 63 |
.B * |
| 64 |
ARP spoof/relayer daemon for ARP spoofing of hosts with the ability to relay all packets from spoofed hosts. |
| 65 |
.B * |
| 66 |
MAC discovery daemon for collecting MAC addresses. |
| 67 |
.B * |
| 68 |
Sniff daemon for logging TCP traffic with the ability to search for a particular string. |
| 69 |
.TP |
| 70 |
.B Host Resolving |
| 71 |
.B * |
| 72 |
Deferred host resolving through dedicated DNS helper servers. |
| 73 |
.TP |
| 74 |
.B Packet Engine |
| 75 |
.B * |
| 76 |
Extensible packet engine for watching TCP, UDP, ICMP and ARP traffic. |
| 77 |
.B * |
| 78 |
Collecting TCP connections with sequence numbers and the ACK storm detection. |
| 79 |
.TP |
| 80 |
.B Misc |
| 81 |
.B * |
| 82 |
Determining which hosts are up. |
| 83 |
.TP |
| 84 |
.B Switched Environment |
| 85 |
.B * |
| 86 |
Hosts on switched ports can be spoofed, sniffed and hijacked too. |
| 87 |
.SH COMMAND LINE PARAMETERS |
| 88 |
.B -V |
| 89 |
Print Version |
| 90 |
.br |
| 91 |
.B -v |
| 92 |
Verbose (print pids of created threads) |
| 93 |
.br |
| 94 |
.B -i |
| 95 |
.I interface |
| 96 |
Listen on this interface. Default is eth0 |
| 97 |
.SH TECHNICAL EXPLANATION |
| 98 |
Let me explain some technical issues which I use in hunt and which are |
| 99 |
essential for understanding how it works and what you should expect. |
| 100 |
The important terms are IP spoofing, ARP spoofing and ACK storm. |
| 101 |
Even if you are familiar with them, you can get some new information. |
| 102 |
.TP |
| 103 |
.B IP spoofing |
| 104 |
You set the packet source address to the IP address of |
| 105 |
the host you pretend to be. |
| 106 |
.TP |
| 107 |
.B ARP spoofing |
| 108 |
You set the packet source hardware address |
| 109 |
(source MAC address) to the address of the host you pretend to be. |
| 110 |
.TP |
| 111 |
.B Simple Active Attack against TCP connections - It is a well known type |
| 112 |
of attack in which you send a packet with spoofed IP addresses and possibly |
| 113 |
also with spoofed ARP addresses (true MAC addresses of client and server - not |
| 114 |
fake ones as explained further). In this way, you can force a command to the |
| 115 |
stream but you are likely to receive the ACK storm (as explained further) |
| 116 |
unless the original client host of the connection is running Linux. |
| 117 |
.TP |
| 118 |
.B ARP spoofing |
| 119 |
I use this term also for forcing the remote host |
| 120 |
to think that the host I want to be has a different MAC address so the remote |
| 121 |
host sends replies to that MAC address and the original client host is not |
| 122 |
able to receive them (but hunt is watching carefully and handles all |
| 123 |
consequences) (Explaining how to force a host on the network to think that |
| 124 |
the other host has a different MAC I leave as an exercise - I encourage you |
| 125 |
to read the source code). Please note that I use the term ARP spoofing |
| 126 |
instead of the term ARP forcing or something like that. So don't be confused, |
| 127 |
if I say ARP spoofing, I mean using some MAC address of a host or just some |
| 128 |
fake MAC address. Note that ARP spoofing (with my meaning to force some MAC) |
| 129 |
doesn't work on Solaris2.5 because it has expiration timers on ARP entries |
| 130 |
so you can't easily force Solaris to drop an ARP entry. The entry usually |
| 131 |
expires after 20min or less (but you have a chance to force it and hunt |
| 132 |
supports this mode). The expiration timers on Solaris are set by: |
| 133 |
.IP |
| 134 |
.B ndd -set /dev/ip ip_ire_flush_interval 60000 |
| 135 |
.I /* 1 min */ |
| 136 |
.br |
| 137 |
.B ndd -set /dev/arp arp_cleanup_interval 60 |
| 138 |
.I /* 1 min */ |
| 139 |
.IP |
| 140 |
I encourage you to ask your netadmin to set the above values on all |
| 141 |
Solaris machines. The Win95/NT4sp3, Linux2.0, OSF1 V4.0, HP-UX10.20 are not |
| 142 |
protected in this way so you can easily use the described technique on them |
| 143 |
(actually, they have timers, but they are not operating like in Solaris; |
| 144 |
in fact, only Solaris is the exception). Actually, hunt uses this technique |
| 145 |
such that it wants to force a fake MAC of the server to the client and a fake |
| 146 |
MAC of the client to the server. Then both the server and the client are |
| 147 |
sending packets to that faked MACs (and hunt can of course handle them). |
| 148 |
However, it is sufficient that only one host has a fake MAC of the other host. |
| 149 |
The ACK storm can't occur in this situation either. So you can use this |
| 150 |
technique even if one end is Solaris and the other isn't. You will just |
| 151 |
succeed in the other host and that is enough. So the only problem is when the |
| 152 |
connection is between two Solaris machines. However, if there is any root |
| 153 |
connection ongoing you can easily push the commands suggested above without |
| 154 |
ARP spoofing to the connection and alter the expiration timers of the ARP |
| 155 |
cache. |
| 156 |
.TP |
| 157 |
.B ACK Storm |
| 158 |
The ACK storm is caused by majority of TCP stacks (!!! |
| 159 |
Linux2.0 is an exception !!!). Let's imagine that you send some data to an |
| 160 |
ongoing connection to the server (as if sent by the client - with expected seq. |
| 161 |
numbers, ... ). The server responds with the acknowledgment of the data you |
| 162 |
sent but this acknowledgment is received by the original client too. But |
| 163 |
from the original client point of view, the server has acknowledged data |
| 164 |
that doesn't exist on the client. So something strange occurred and the |
| 165 |
original client sends the "right" sequence number with ACK to the server. |
| 166 |
But the TCP rules say that it is required to generate an immediate |
| 167 |
acknowledgment when an out-of-order segment is received. This ACK should not |
| 168 |
be delayed. So the server sends the acknowledgment of non-existent data to the |
| 169 |
client again. And the client responses, ... |
| 170 |
Only if the source host of the connection is Linux then the ACK storm |
| 171 |
doesn't occur. Note that if you use ARP spoofing (forcing) then the ACK |
| 172 |
storm can't come because one or both ends will send packets with fake |
| 173 |
MACs and those packets are received by hunt rather than by the other host. |
| 174 |
.TP |
| 175 |
.B Connection Reset |
| 176 |
With a single properly constructed packet |
| 177 |
you can reset the connection (RST flag in TCP header). Of course, you have |
| 178 |
to know the sequence number but it is not a problem for hunt which is watching |
| 179 |
all the time. You can reset server, client, or both. When you reset |
| 180 |
only one end the other end is reset when it tries to send data to the |
| 181 |
first host which will response with RST because of the connection |
| 182 |
reset on it. |
| 183 |
.TP |
| 184 |
.B Connection sniffing/watching |
| 185 |
The simplest thing you can do is to |
| 186 |
silently sit in you chair and watch hunt output about any connection which |
| 187 |
you choose from the list. |
| 188 |
.TP |
| 189 |
.B Connection Synchronization |
| 190 |
Well, that's one of the main features of |
| 191 |
hunt. If you put some data to the TCP stream (through simple active attack or |
| 192 |
ARP spoofing), you desynchronize the stream from the server/original client |
| 193 |
point of view. After some work done on that connection you can just reset it |
| 194 |
or you can try to synchronize both original ends again. That is not an |
| 195 |
easy task. The user on the client is prompted to type some chars and some chars |
| 196 |
are sent to the client and server. The main goal of all stuff |
| 197 |
is to synchronize the sequence numbers on both client and server again. |
| 198 |
.TP |
| 199 |
.B Switch/Segment traffic rerouting |
| 200 |
With ARP spoofing you can |
| 201 |
even force switch so that it will send you the traffic for hosts |
| 202 |
on another segment/switched port. This is because a switch will think that |
| 203 |
the MAC belongs to your port. Be careful if your switch has some security |
| 204 |
policy and MACs have been explicitly set up on a per port basis - but in |
| 205 |
fact I don't ever see such a configuration on "ordinary" network. |
| 206 |
.TP |
| 207 |
.B ARP-relay daemon |
| 208 |
Don't be confused. I use this term for hunt daemon |
| 209 |
which is responsible for inserting packets to the network (rerouting) |
| 210 |
of all data it receives from ARP spoofed hosts. |
| 211 |
.TP |
| 212 |
.B Switched environment |
| 213 |
Well, the hunt is now capable of watching |
| 214 |
and hijacking hosts that are on switched ports. In common you can't watch |
| 215 |
the hosts traffic on switched ports but if you first ARP spoof them (with |
| 216 |
ARP spoof daemon menu) you are able to look at the connections that |
| 217 |
are between that hosts. First you do arp spoof and the hosts will send you |
| 218 |
the traffic and from that time you can list the connections between them, then |
| 219 |
you can watch and hijack them. It is commonly accepted that the switches |
| 220 |
protect your connections again inside intruders and spoofers. Well, that |
| 221 |
is still true for carefully setuped switches. The switches that are |
| 222 |
plugged to the LAN without any port security configuration are useless in |
| 223 |
the job to protect your LAN. |
| 224 |
.SH DESIGN OVERVIEW |
| 225 |
The development model is based on a packet engine (hunt.c) which runs |
| 226 |
in its own thread and captures packets from the network. The packet engine |
| 227 |
collects information of TCP connections/starting/termination, sequence |
| 228 |
numbers, and MAC addresses. It collects the MACs and seq. numbers from the |
| 229 |
server point of view and separate MACs and seq. numbers from the client point |
| 230 |
of view. So it is prepared for hijacking. This information (seq. num., MAC, |
| 231 |
...) is available to modules so they don't have to analyze and collect it. |
| 232 |
.PP |
| 233 |
Modules can register functions with the packet engine which are then invoked |
| 234 |
when new packets are received. A module function determines if the module is |
| 235 |
interested in a packet or not and can place the packet in a module specific |
| 236 |
list of packets. A module function can also send some packet to the network |
| 237 |
if it is desirable to do it very fast. The module (usually in some other |
| 238 |
thread so it needs to be scheduled to be run) then gets packets from the list |
| 239 |
and analyzes them. In this way, you can easily develop modules which perform |
| 240 |
various activities. |
| 241 |
.PP |
| 242 |
Packets to be sent as a response to the network are described by structures |
| 243 |
so you don't have to care about some default fields or checksums. At this time, |
| 244 |
functions for TCP, ICMP and ARP traffic are already prepared. (UDP is missing |
| 245 |
because I don't use it in any module) |
| 246 |
.PP |
| 247 |
A separate set of daemons is used for host resolving (DNS). That is because |
| 248 |
the gethostbyname/gethostbyname_r function is protected by mutex |
| 249 |
(As far as I know - it was so two years ago - I didn't try it now) so you |
| 250 |
can't run it truly parallel in a multithreaded environment. Therefore, the |
| 251 |
commonly used workaround is to fire up some helper daemons through fork which |
| 252 |
will run gethostbyname. |
| 253 |
.SH USER ENVIRONMENT |
| 254 |
Well, the user environment isn't graphical but I believe that you will like |
| 255 |
it. |
| 256 |
.PP |
| 257 |
In the title of all menus is some status information about hunt. |
| 258 |
First, there is an indication with which menu you are working. Second, the |
| 259 |
number of packets received by hunt is shown. Hunt pre-allocates some buffers |
| 260 |
for packets; the status of free and allocated buffers is displayed as |
| 261 |
the third value. The number of free buffers is low for a high loaded network |
| 262 |
or the ACK storm or if you have poor hardware. In my case, for example, |
| 263 |
the numbers 63/64 were normally indicated meaning that only one buffer was |
| 264 |
used, but after the ACK storm, I have something like 322/323. Note that the |
| 265 |
buffers once allocated are not freed. The low number of free buffers can also |
| 266 |
mean some bug in hunt but I think I carefully debugged all modules to this |
| 267 |
kind of bug. The last indicator reports which daemons (actually threads) |
| 268 |
are running. They are: R - reset daemon, Y - arp relayer, S - sniffer, |
| 269 |
M - MAC discoverer. If you switch on the verbose option you get additional |
| 270 |
information about how many packets were dropped - they were fragments |
| 271 |
(see the bugs) or were malformed, and how many packets belong to other |
| 272 |
protocols than TCP, UDP, ICMP and ARP. |
| 273 |
In the prompt for user input is indicator that will tell you through '*' char |
| 274 |
that hunt added new connection(s) to the connection list since last connection |
| 275 |
listening. |
| 276 |
.TP |
| 277 |
.B General interface |
| 278 |
In all menus the x key works as escape. |
| 279 |
The network mask is denoted by the ip_address/mask notation where mask is the |
| 280 |
number of 1's on the left side of the network mask. For example, 0.0.0.0/0 |
| 281 |
means everything and 192.168.32.10/32 means only that host. |
| 282 |
.IP |
| 283 |
For most modules is used: |
| 284 |
.br |
| 285 |
.B l) |
| 286 |
list items |
| 287 |
.br |
| 288 |
.B a) |
| 289 |
add item |
| 290 |
.br |
| 291 |
.B m) |
| 292 |
modify item |
| 293 |
.br |
| 294 |
.B d) |
| 295 |
delete item |
| 296 |
.br |
| 297 |
They will be referred in this text as l) a) m) d) |
| 298 |
.TP |
| 299 |
.B List/Watch/Reset connection |
| 300 |
You can obtain the list of connections tracked by the hunt packet engine. |
| 301 |
Which connections are tracked is specified in the options menu. You can |
| 302 |
interactively watch or reset these connections. You can also perform |
| 303 |
hijacking on them (next two menu items). |
| 304 |
.TP |
| 305 |
.B ARP/Simple hijack |
| 306 |
ARP/Simple hijack offers you an interactive interface for the insertion of data |
| 307 |
to the selected connection. You can perform ARP spoofing for both connection |
| 308 |
ends, for only one end or you can not to do it at all. If you don't do ARP |
| 309 |
spoofing then you probably receive the ACK storm after typing the first char. |
| 310 |
When you do ARP spoofing, it is checked if it succeeds. If not, you are |
| 311 |
prompted if you want to wait until it succeeds (you can interrupt this |
| 312 |
waiting through CTRL-C of course). After inserting some data to the connection |
| 313 |
you type CTRL-] and then you can synchronize or reset the connection. |
| 314 |
If you choose synchronization, the user is prompted to type some chars and |
| 315 |
after he does so the connection will be in the synchronous state. You can |
| 316 |
interrupt the synchronization process with CTRL-C and then you can reset |
| 317 |
the connection. Note that CTRL-C is used widely for interrupting an ongoing |
| 318 |
process. The CTRL-] (like telnet) is used for finishing the interactive |
| 319 |
insertion of data to the connection. The ARP/Simple hijack doesn't |
| 320 |
automatically reset the connection after it detects the ACK storm so you have |
| 321 |
to do it yourself. Note also that ARP/Simple hijack works with the ARP relayer |
| 322 |
(as described further) so that other connections are not affected. Normally, |
| 323 |
if you ARP spoof two servers then the ARP/Simple hijack handles only one |
| 324 |
selected connection between these two hosts but other connections between |
| 325 |
these two hosts look like they freeze. If you start the ARP relayer, |
| 326 |
then these other connections are handled and rerouted through. So other |
| 327 |
connections from one spoofed host to the other are not affected at all. It is |
| 328 |
recommended to run ARP relayer if you do ARP hijacking of two servers. |
| 329 |
Note that if you ARP spoof (force) some client MAC to the server |
| 330 |
then only connections going from the server to that client are affected. Other |
| 331 |
connections from the server to other machines are untouched. |
| 332 |
.TP |
| 333 |
.B Simple hijack |
| 334 |
Simple hijack allows you to insert a command to the data stream of the |
| 335 |
connection. When you insert the command, hunt waits for it to complete up to |
| 336 |
a certain timeout and if the ACK storm doesn't occur, you are prompted for |
| 337 |
the next command. After that, you can synchronize or reset the connection. |
| 338 |
Note that you can use the interactive interface to simple hijack when you use |
| 339 |
ARP/simple hijack without ARP spoofing but if you use full interactive |
| 340 |
interface of ARP/simple hijack without ARP spoofing you are likely to get the |
| 341 |
ACK storm immediately after typing the first char. So this mode of hijacking |
| 342 |
is useful when you have to deal with the ACK storm because it sends your data |
| 343 |
to the connection in a single packet. When the ACK storm is in progress it is |
| 344 |
very hard to deliver other packets from hunt to the server as the network |
| 345 |
and server are congested. |
| 346 |
.SH DAEMONS |
| 347 |
I call them daemons but they are actually threads. |
| 348 |
All daemons can be started and stooped. Don't be surprised when you |
| 349 |
insert or modify some rule in a daemon and it does nothing. The daemon is |
| 350 |
not running - you have to start it. All daemons are by default stopped |
| 351 |
even though you can alter the configuration. Common commands in the daemons |
| 352 |
menu are: |
| 353 |
.IP |
| 354 |
.B s) |
| 355 |
start the daemon |
| 356 |
.br |
| 357 |
.B k) |
| 358 |
stop the daemon |
| 359 |
.br |
| 360 |
.B l) |
| 361 |
list configuration items |
| 362 |
.br |
| 363 |
.B a) |
| 364 |
add config. item |
| 365 |
.br |
| 366 |
.B m) |
| 367 |
modify config. item |
| 368 |
.br |
| 369 |
.B d) |
| 370 |
delete config. item |
| 371 |
.TP |
| 372 |
.B Reset daemon |
| 373 |
This daemon can be used to perform automatic resets of ongoing connections |
| 374 |
that hunt can see. You can describe which connections should be terminated |
| 375 |
by giving src/dst host/mask and src/dst ports. The SYN flag off means that |
| 376 |
all specified connections should be terminated (even ongoing). The SYN |
| 377 |
flag on means that only newly started connections are reset. So the |
| 378 |
connections that are in progress are not affected. Don't forget to start the |
| 379 |
daemon. |
| 380 |
.TP |
| 381 |
.B ARP daemon |
| 382 |
Here you can do ARP spoofing of hosts. You enter src and dst addresses and |
| 383 |
desired srcMAC. The dst is then forced to think that src has srcMAC. You can |
| 384 |
use some fake MAC or better MAC of host that is currently down. You just want |
| 385 |
that the hosts will send you all the data (so you can even look at packets |
| 386 |
that are on a different segment or switched port that you will not normally |
| 387 |
see) The ARP module looks carefully for packets which will break ARP spoofing |
| 388 |
of hosts and handle them but you can even specify the refresh interval for ARP |
| 389 |
spoofing but it is not necessary to do it. Set the refresh interval only if |
| 390 |
you are experienced with some bad or strange behavior of spoofed hosts. |
| 391 |
Also there is the possibility to test the hosts for successful spoof with |
| 392 |
the ability to force that spoof - it is recommended to test the ARP spoof |
| 393 |
if something looks like it is wrong or the computer doesn't send the traffic |
| 394 |
to the hunt. The force option is handful if the first spoofing packets |
| 395 |
are discarded with switch so if you are running hunt against hosts on |
| 396 |
switched ports you can try to run the force mode by example for 10s and |
| 397 |
then break it with CTRL-C if the spoof continues to fail. |
| 398 |
The ARP relayer daemon is used to perform ARP relaying of ARP spoofed |
| 399 |
connections. When you insert some ARP spoof of hosts the ARP spoofing is |
| 400 |
performed immediately even if the relayer isn't running!!!. But if the ARP |
| 401 |
spoofing succeeds, the connections will look like they freeze. For rerouting |
| 402 |
(not IP routing !) these connections through your hunt you need to start |
| 403 |
the ARP relayer. The relayer works well with ARP/simple hijack so once you |
| 404 |
have hosts ARP spoofed with ARP relaying you can easily do ARP/simple |
| 405 |
hijack which will detect that the hosts are already ARP spoofed and takes |
| 406 |
over the connection immediately. With this technique you can easily become |
| 407 |
man in the middle from the beginning of the connection even though your |
| 408 |
host with hunt isn't an IP gateway. I encourage you to write other |
| 409 |
application specific protocol handlers for the man in the middle attack as it |
| 410 |
is really simple with this framework. |
| 411 |
.TP |
| 412 |
.B Sniff daemon |
| 413 |
The purpose of the sniff daemon is to log specified packets. |
| 414 |
The sniff daemon can also search for a simple pattern (string) in the data |
| 415 |
stream (see the bugs section). You can specify which connection you are |
| 416 |
interested in, where to search (src, dst, both), what do you want to search, |
| 417 |
how many bytes you want to log, from what direction (src, dst, both) and to |
| 418 |
what file should the daemon write. All logged files are stored in the .sniff |
| 419 |
directory. The default file name for logging is composed of the host and port |
| 420 |
names. In the options submenu you can set how to log new lines (\r,\n) |
| 421 |
(as new-lines or as hex num.). |
| 422 |
.TP |
| 423 |
.B MAC discovery daemon |
| 424 |
This daemon is used to collect MAC addresses corresponding to the specified |
| 425 |
IP range. You can enter the time after which the daemon will try collecting |
| 426 |
again (default is 5min). |
| 427 |
.TP |
| 428 |
.B Host up menu |
| 429 |
The host up module determines which hosts are up (with TCP/IP stack). |
| 430 |
You just specify the IP range and that space is then searched for running |
| 431 |
hosts. |
| 432 |
It is capable to determine which hosts have network interface in |
| 433 |
promiscuous mode. The promiscuous mode usually shows that the host is |
| 434 |
running some kind of sniffer/network analyzer. |
| 435 |
.TP |
| 436 |
.B Options menu |
| 437 |
In the options menu you can tune different things: |
| 438 |
.TP |
| 439 |
.B l) a) m) d) |
| 440 |
.I List/Add/Mod/Del Connection Policy Entry |
| 441 |
.br |
| 442 |
First of all you can select which connections should be tracked. The |
| 443 |
default setting is to look at telnet connections from all hosts but |
| 444 |
you can adjust this behavior by the specification of src/dst |
| 445 |
address/mask src/dst port pairs. With commands: l) a) m) d) you set |
| 446 |
what you are interested in. |
| 447 |
.TP |
| 448 |
.B c) |
| 449 |
.I Connection Listening Properties |
| 450 |
.br |
| 451 |
You can set whether the sequence numbers and MACs of ongoing |
| 452 |
connections will be displayed during connection listening. |
| 453 |
.TP |
| 454 |
.B h) |
| 455 |
.I Host Resolving |
| 456 |
.br |
| 457 |
You can turn on resolving of hosts to their names. As the resolving |
| 458 |
is deferred you don't get the names of hosts immediately. |
| 459 |
Just try to list connections several times and you will |
| 460 |
see the hosts names. (I used this deferred approach because I |
| 461 |
didn't want any delay of interface that the resolving can cause). |
| 462 |
.TP |
| 463 |
.BR r) |
| 464 |
.I Reset ACK Storm Timeout |
| 465 |
.br |
| 466 |
This timeout is used in simple hijack to automatically reset the |
| 467 |
connection after the ACK storm is detected. Note that you can receive |
| 468 |
the ACK storm even in arp/simple hijack in case you don't perform |
| 469 |
ACK spoofing of any host. |
| 470 |
.TP |
| 471 |
.B s) |
| 472 |
.I Simple Hijack Timeout For Next cmd |
| 473 |
.br |
| 474 |
Simple hijack has not an interactive connection interface. That |
| 475 |
means you write the whole command which will be inserted into |
| 476 |
the connection data stream. If no data is transferred through the |
| 477 |
connection up to this timeout, you are prompted for the next command. |
| 478 |
.TP |
| 479 |
.B q) |
| 480 |
.I ARP Request/Reply Packets |
| 481 |
.br |
| 482 |
Number of request or reply packets hunt will send when it is doing |
| 483 |
arp spoofing. |
| 484 |
.TP |
| 485 |
.B t) |
| 486 |
.I ARP Request Spoof Through Request |
| 487 |
.br |
| 488 |
Option whether hunt will send ARP spoof request or ARP spoof reply |
| 489 |
when it receives broadcasted ARP request which will break ARP spoof. |
| 490 |
.TP |
| 491 |
.B w) |
| 492 |
.I Switched Environment |
| 493 |
.br |
| 494 |
Some optimization for switched environment. It works perfectly for non |
| 495 |
switched environment also. |
| 496 |
.TP |
| 497 |
.B y) |
| 498 |
.I ARP Spoof With My MAC |
| 499 |
.br |
| 500 |
Set the originating MAC address of sent spoofed ARP to my (hunt) |
| 501 |
ethernet MAC - sometimes helps in switched environment. |
| 502 |
.TP |
| 503 |
.B e) |
| 504 |
.I Learn MAC From IP Traffic |
| 505 |
.br |
| 506 |
You can enable that MAC addresses will be learned from all |
| 507 |
IP traffic not just from ARP. |
| 508 |
.TP |
| 509 |
.B p) |
| 510 |
Number Of Printed Lines Per Page In Listening |
| 511 |
.br |
| 512 |
Self explanatory |
| 513 |
.TP |
| 514 |
.B v) |
| 515 |
Verbose On/Off |
| 516 |
.br |
| 517 |
Self explanatory |
| 518 |
.SH TESTED ENVIRONMENT |
| 519 |
.B HUNT program requirements: |
| 520 |
.br |
| 521 |
.B * |
| 522 |
Linux >= 2.2 |
| 523 |
.br |
| 524 |
.B * |
| 525 |
Glibc with linuxthreads |
| 526 |
.br |
| 527 |
.B * |
| 528 |
Ethernet |
| 529 |
.PP |
| 530 |
.B Tested hosts: |
| 531 |
.br |
| 532 |
Linux 2.0, Linux 2.1, Linux 2.2, Solaris 2.5.1, NT4sp3/4, Win95, OSF V4.0D, HPUX 10.20, IRIX 6.2 |
| 533 |
.PP |
| 534 |
.B Tested network equipment: |
| 535 |
.br |
| 536 |
BayNetworks 28115, 28200, 300 switches |
| 537 |
3Com SuperStack II 3000, 1000 switches |
| 538 |
.SH SECURITY NOTES |
| 539 |
Please note the already known truth that telnet and similar programs which send |
| 540 |
passwords in clear text are vulnerable to the described attacks. Programs |
| 541 |
using one time passwords are also easily attacked and in fact they are useless |
| 542 |
if someone can run a program like hunt. Only full encrypted traffic isn't |
| 543 |
vulnerable to these attacks but note that you can become a man in the middle |
| 544 |
if you use ARP spoofing (forcing) without the ACK storm and you can try to do |
| 545 |
something. Also unconfigured switch doesn't protect you from sniffing or |
| 546 |
hijacking. It is necessary to carefully configure port security on the switches |
| 547 |
in order to protect the computers on the switched ports. |
| 548 |
.PP |
| 549 |
Detecting attacks isn't an easy task. For ARP spoofing there are |
| 550 |
tools which can detect it. The ACK storm is detectable by some sophisticated |
| 551 |
network analyzers (you can detect the pattern of the ACK storm or the |
| 552 |
statistics of ACKs without data). If you run hunt on your network you can |
| 553 |
detect the ACK storm because the hunt can detect the ACK storm pattern. |
| 554 |
.SH PERFORMANCE NOTE |
| 555 |
Make sure you are running hunt on idle machine with sufficient power |
| 556 |
(I used PII-233 with 128MB RAM) and without any other packet |
| 557 |
analyzer because if you use advanced features like arp spoofing or hijacking |
| 558 |
hunt needs to reply fast with it's own packets inserted into the traffic on |
| 559 |
the network. |
| 560 |
.SH DOWNLOAD |
| 561 |
This software can be found at |
| 562 |
.B http://www.gncz.cz/kra/index.html |
| 563 |
.br |
| 564 |
or at |
| 565 |
.br |
| 566 |
.B ftp://ftp.gncz.cz/pub/linux/hunt/ |
| 567 |
.SH KNOWN BUGS |
| 568 |
.B * |
| 569 |
some structures are poorly locked through mutexes |
| 570 |
.br |
| 571 |
.B * |
| 572 |
if you watch connection then some escape sequences from that connection |
| 573 |
can influent your terminal. Note that your terminal is named "Linux" |
| 574 |
("xterm" - if you run it from X, ...) but the escape sequences are |
| 575 |
for the client side terminal which may or may not be Linux so you can get |
| 576 |
some mess. |
| 577 |
.br |
| 578 |
.B * |
| 579 |
sniff is not capable to search for a pattern which crosses the packet |
| 580 |
boundary. That means it can't search for a pattern of the user typed input |
| 581 |
as this input is usually transferred with 1B data long packets. |
| 582 |
.br |
| 583 |
.B * |
| 584 |
hunt doesn't support defragmentation so the IP fragments have to be dropped. |
| 585 |
.SH BUG FIXES, SUGGESTIONS |
| 586 |
Please send bug descriptions, patches, suggestions, new modules or |
| 587 |
successful stories to |
| 588 |
.B [email protected] |
| 589 |
.SH ACKNOWLEDGMENTS |
| 590 |
I would like to thank |
| 591 |
Sven Ubik |
| 592 |
< |
| 593 |
[email protected] |
| 594 |
> for his invaluable input and feedback. |
| 595 |
.SH FINAL WORD |
| 596 |
Note that this software was written only for my fun in my free time and it |
| 597 |
was a great exercise of TCP/IP protocols. I am now familiar with seq. numbers, |
| 598 |
ACKs, timeouts, MACs, checksums, ... to the finest level. As I have some |
| 599 |
pretty good background this "hunt" challenge made me think that I hadn't |
| 600 |
known TCP/IP as great as I had thought. You are welcome to read the source |
| 601 |
code and to try to modify it or write your own modules. |
| 602 |
.SH DEBIAN |
| 603 |
This manpage was converted from internal documentation by |
| 604 |
.B Jon Marler |
| 605 |
< |
| 606 |
.I [email protected] |
| 607 |
> for the Debian GNU/Linux operating system. |