shimmer works by cryptographically changing a set of 16 ports (one of which forwards to the real service, and 15 others that lead to a trap to blacklist attackers). The 16 ports change every minute frustrating an attacker, but a legimitate user with access to a secret shared between the client and server can determine the real port, avoid blacklisting, and get a connection.
Since both client and server must be time synchronized to the nearest minute shimmer actual holds 48 ports open at a time (16 for the previous minute, 16 for the current minute and 16 for the next minute) to avoid problems due to small amounts of clock drift.
Figure 1: shimmerd operation
Figure 1 shows a simplifed (8 port rather than 16 port) shimmerd set up. First the standard firewall blocks all ports except the range 10000 to 10999 chosen to work with shimmerd. Connections on those ports are forwarded.
Then shimmerd has selected 8 ports (for the current minute in time) of which 7 cause automatic blacklisting of the incoming connections and associated IP addresses (the IP addresses are recorded and banned from connections for 15 minutes, with the 15 minutes sliding each time a connection is attempted).
One port forwards through to the real SSH server running on the machine.
[common] log = /var/log/shimmer.log [mirage-ssh] secret = password port = 22 range = 10000-10999The log setting in the [common] section tells shimmerd where to write its log file. After [common] come an arbitrary number of mirages each with a unique name. Here, just one named ssh is defined in the section [mirage-ssh].
The port setting tells shimmerd to forward a connection to the right mirage port to the local port 22 (where SSH normally resides). The range setting gives the range of ports over which shimmerd will choose ports to hide behind.
Finally, the secret setting is a shared secret between the shimmerd server and any user connecting with the shimmer client program.
Starting shimmerd is as simple as
$ shimmerd --config=shimmer.conf &The shimmer client does one thing only: it outputs the current legitimate port for a specific mirage, range and secret combination. This output can then be used to configure another program (such as an SSH client) with the port to connect to.
Here's shimmer being used to connect to a hidden SSH server:
ssh user@remote.host -p `./shimmer --open ssh:10000:10999 --secret password`shimmer's --open gives the mirage name and range of ports configured. The secret can be passed on the command-line (with --secret) or entered interactively.
Last modified: Tue Jan 8 09:45:43 CET 2008