1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4
<!ENTITY TIMESTAMP "2011-08-08">
5
<!ENTITY % common SYSTEM "common.ent">
9
<refentry xmlns:xi="http://www.w3.org/2001/XInclude">
11
<title>Mandos Manual</title>
12
<!-- NWalsh’s docbook scripts use this to generate the footer: -->
13
<productname>Mandos</productname>
14
<productnumber>&version;</productnumber>
15
<date>&TIMESTAMP;</date>
18
<firstname>Björn</firstname>
19
<surname>Påhlsson</surname>
21
<email>belorn@fukt.bsnet.se</email>
25
<firstname>Teddy</firstname>
26
<surname>Hogeborn</surname>
28
<email>teddy@fukt.bsnet.se</email>
34
<holder>Teddy Hogeborn</holder>
35
<holder>Björn Påhlsson</holder>
37
<xi:include href="legalnotice.xml"/>
41
<refentrytitle>intro</refentrytitle>
42
<manvolnum>8mandos</manvolnum>
46
<refname>intro</refname>
48
Introduction to the Mandos system
52
<refsect1 id="description">
53
<title>DESCRIPTION</title>
55
This is the the Mandos system, which allows computers to have
56
encrypted root file systems and at the same time be capable of
57
remote and/or unattended reboots.
60
The computers run a small client program in the initial RAM disk
61
environment which will communicate with a server over a network.
62
All network communication is encrypted using TLS. The clients
63
are identified by the server using an OpenPGP key; each client
64
has one unique to it. The server sends the clients an encrypted
65
password. The encrypted password is decrypted by the clients
66
using the same OpenPGP key, and the password is then used to
67
unlock the root file system, whereupon the computers can
68
continue booting normally.
72
<refsect1 id="introduction">
73
<title>INTRODUCTION</title>
75
You know how it is. You’ve heard of it happening. The Man
76
comes and takes away your servers, your friends’ servers, the
77
servers of everybody in the same hosting facility. The servers
78
of their neighbors, and their neighbors’ friends. The servers
79
of people who owe them money. And like
80
<emphasis>that</emphasis>, they’re gone. And you doubt you’ll
84
That is why your servers have encrypted root file systems.
85
However, there’s a downside. There’s no going around it:
86
rebooting is a pain. Dragging out that rarely-used keyboard and
87
screen and unraveling cables behind your servers to plug them in
88
to type in that password is messy, especially if you have many
89
servers. There are some people who do clever things like using
90
serial line consoles and daisy-chain it to the next server, and
91
keep all the servers connected in a ring with serial cables,
92
which will work, if your servers are physically close enough.
93
There are also other out-of-band management solutions, but with
94
<emphasis>all</emphasis> these, you still have to be on hand and
95
manually type in the password at boot time. Otherwise the
96
server just sits there, waiting for a password.
99
Wouldn’t it be great if you could have the security of encrypted
100
root file systems and still have servers that could boot up
101
automatically if there was a short power outage while you were
102
asleep? That you could reboot at will, without having someone
103
run over to the server to type in the password?
106
Well, with Mandos, you (almost) can! The gain in convenience
107
will only be offset by a small loss in security. The setup is
111
The server will still have its encrypted root file system. The
112
password to this file system will be stored on another computer
113
(henceforth known as the Mandos server) on the same local
114
network. The password will <emphasis>not</emphasis> be stored
115
in plaintext, but encrypted with OpenPGP. To decrypt this
116
password, a key is needed. This key (the Mandos client key)
117
will not be stored there, but back on the original server
118
(henceforth known as the Mandos client) in the initial RAM disk
119
image. Oh, and all network Mandos client/server communications
120
will be encrypted, using TLS (SSL).
123
So, at boot time, the Mandos client will ask for its encrypted
124
data over the network, decrypt it to get the password, use it to
125
decrypt the root file, and continue booting.
128
Now, of course the initial RAM disk image is not on the
129
encrypted root file system, so anyone who had physical access
130
could take the Mandos client computer offline and read the disk
131
with their own tools to get the authentication keys used by a
132
client. <emphasis>But</emphasis>, by then the Mandos server
133
should notice that the original server has been offline for too
134
long, and will no longer give out the encrypted key. The timing
135
here is the only real weak point, and the method, frequency and
136
timeout of the server’s checking can be adjusted to any desired
140
(The encrypted keys on the Mandos server is on its normal file
141
system, so those are safe, provided the root file system of
142
<emphasis>that</emphasis> server is encrypted.)
147
<title>FREQUENTLY ASKED QUESTIONS</title>
149
Couldn’t the security be defeated by…
151
<refsect2 id="quick">
152
<title>Grabbing the Mandos client key from the
153
initrd <emphasis>really quickly</emphasis>?</title>
155
This, as mentioned above, is the only real weak point. But if
156
you set the timing values tight enough, this will be really
157
difficult to do. An attacker would have to physically
158
disassemble the client computer, extract the key from the
159
initial RAM disk image, and then connect to a <emphasis>still
160
online</emphasis> Mandos server to get the encrypted key, and do
161
all this <emphasis>before</emphasis> the Mandos server timeout
162
kicks in and the Mandos server refuses to give out the key to
166
Now, as the typical procedure seems to be to barge in and turn
167
off and grab <emphasis>all</emphasis> computers, to maybe look
168
at them months later, this is not likely. If someone does that,
169
the whole system <emphasis>will</emphasis> lock itself up
170
completely, since Mandos servers are no longer running.
173
For sophisticated attackers who <emphasis>could</emphasis> do
174
the clever thing, <emphasis>and</emphasis> had physical access
175
to the server for enough time, it would be simpler to get a key
176
for an encrypted file system by using hardware memory scanners
177
and reading it right off the memory bus.
181
<refsect2 id="replay">
182
<title>Replay attacks?</title>
184
Nope, the network stuff is all done over TLS, which provides
185
protection against that.
190
<title>Man-in-the-middle?</title>
192
No. The server only gives out the passwords to clients which
193
have <emphasis>in the TLS handshake</emphasis> proven that
194
they do indeed hold the OpenPGP private key corresponding to
199
<refsect2 id="physgrab">
200
<title>Physically grabbing the Mandos server computer?</title>
202
You could protect <emphasis>that</emphasis> computer the
203
old-fashioned way, with a must-type-in-the-password-at-boot
204
method. Or you could have two computers be the Mandos server
208
Multiple Mandos servers can coexist on a network without any
209
trouble. They do not clash, and clients will try all
210
available servers. This means that if just one reboots then
211
the other can bring it back up, but if both reboot at the same
212
time they will stay down until someone types in the password
217
<refsect2 id="fakeping">
218
<title>Faking ping replies?</title>
220
The default for the server is to use
221
<quote><literal>fping</literal></quote>, the replies to which
222
could be faked to eliminate the timeout. But this could
223
easily be changed to any shell command, with any security
224
measures you like. It could, for instance, be changed to an
225
SSH command with strict keychecking, which could not be faked.
226
Or IPsec could be used for the ping packets, making them
232
<refsect1 id="security">
233
<title>SECURITY</title>
235
So, in summary: The only weakness in the Mandos system is from
241
The power to come in and physically take your servers,
242
<emphasis>and</emphasis>
247
The cunning and patience to do it carefully, one at a time,
248
and <emphasis>quickly</emphasis>, faking Mandos
249
client/server responses for each one before the timeout.
254
While there are some who may be threatened by people who have
255
<emphasis>both</emphasis> these attributes, they do not,
256
probably, constitute the majority.
259
If you <emphasis>do</emphasis> face such opponents, you must
260
figure that they could just as well open your servers and read
261
the file system keys right off the memory by running wires to
265
What Mandos is designed to protect against is
266
<emphasis>not</emphasis> such determined, focused, and competent
267
attacks, but against the early morning knock on your door and
268
the sudden absence of all the servers in your server room.
269
Which it does nicely.
273
<refsect1 id="plugins">
274
<title>PLUGINS</title>
276
In the early designs, the
277
<citerefentry><refentrytitle>mandos-client</refentrytitle
278
><manvolnum>8mandos</manvolnum></citerefentry> program (which
279
retrieves a password from the Mandos server) also prompted for a
280
password on the terminal, in case a Mandos server could not be
281
found. Other ways of retrieving a password could easily be
282
envisoned, but this multiplicity of purpose was seen to be too
283
complex to be a viable way to continue. Instead, the original
284
program was separated into <citerefentry><refentrytitle
285
>mandos-client</refentrytitle><manvolnum>8mandos</manvolnum
286
></citerefentry> and <citerefentry><refentrytitle
287
>password-prompt</refentrytitle><manvolnum>8mandos</manvolnum
288
></citerefentry>, and a <citerefentry><refentrytitle
289
>plugin-runner</refentrytitle><manvolnum>8mandos</manvolnum
290
></citerefentry> exist to run them both in parallel, allowing
291
the first successful plugin to provide the password. This
292
opened up for any number of additional plugins to run, all
293
competing to be the first to find a password and provide it to
297
Four additional plugins are provided:
302
<citerefentry><refentrytitle>plymouth</refentrytitle>
303
<manvolnum>8mandos</manvolnum></citerefentry>
307
This prompts for a password when using <citerefentry>
308
<refentrytitle>plymouth</refentrytitle><manvolnum
309
>8</manvolnum></citerefentry>.
315
<citerefentry><refentrytitle>usplash</refentrytitle>
316
<manvolnum>8mandos</manvolnum></citerefentry>
320
This prompts for a password when using <citerefentry>
321
<refentrytitle>usplash</refentrytitle><manvolnum
322
>8</manvolnum></citerefentry>.
328
<citerefentry><refentrytitle>splashy</refentrytitle>
329
<manvolnum>8mandos</manvolnum></citerefentry>
333
This prompts for a password when using <citerefentry>
334
<refentrytitle>splashy</refentrytitle><manvolnum
335
>8</manvolnum></citerefentry>.
341
<citerefentry><refentrytitle>askpass-fifo</refentrytitle>
342
<manvolnum>8mandos</manvolnum></citerefentry>
346
To provide compatibility with the "askpass" program from
347
cryptsetup, this plugin listens to the same FIFO as
354
More plugins can easily be written and added by the system
355
administrator; see the section called "WRITING PLUGINS" in
356
<citerefentry><refentrytitle>plugin-runner</refentrytitle>
357
<manvolnum>8mandos</manvolnum></citerefentry> to learn the
362
<refsect1 id="see_also">
363
<title>SEE ALSO</title>
365
<citerefentry><refentrytitle>mandos</refentrytitle>
366
<manvolnum>8</manvolnum></citerefentry>,
367
<citerefentry><refentrytitle>mandos.conf</refentrytitle>
368
<manvolnum>5</manvolnum></citerefentry>,
369
<citerefentry><refentrytitle>mandos-clients.conf</refentrytitle>
370
<manvolnum>5</manvolnum></citerefentry>,
371
<citerefentry><refentrytitle>mandos-ctl</refentrytitle>
372
<manvolnum>8</manvolnum></citerefentry>,
373
<citerefentry><refentrytitle>mandos-monitor</refentrytitle>
374
<manvolnum>8</manvolnum></citerefentry>,
375
<citerefentry><refentrytitle>plugin-runner</refentrytitle>
376
<manvolnum>8mandos</manvolnum></citerefentry>,
377
<citerefentry><refentrytitle>mandos-client</refentrytitle>
378
<manvolnum>8mandos</manvolnum></citerefentry>,
379
<citerefentry><refentrytitle>password-prompt</refentrytitle>
380
<manvolnum>8mandos</manvolnum></citerefentry>,
381
<citerefentry><refentrytitle>plymouth</refentrytitle>
382
<manvolnum>8mandos</manvolnum></citerefentry>,
383
<citerefentry><refentrytitle>usplash</refentrytitle>
384
<manvolnum>8mandos</manvolnum></citerefentry>,
385
<citerefentry><refentrytitle>splashy</refentrytitle>
386
<manvolnum>8mandos</manvolnum></citerefentry>,
387
<citerefentry><refentrytitle>askpass-fifo</refentrytitle>
388
<manvolnum>8mandos</manvolnum></citerefentry>,
389
<citerefentry><refentrytitle>mandos-keygen</refentrytitle>
390
<manvolnum>8</manvolnum></citerefentry>
395
<ulink url="http://www.fukt.bsnet.se/mandos">Mandos</ulink>
399
The Mandos home page.
406
<!-- Local Variables: -->
407
<!-- time-stamp-start: "<!ENTITY TIMESTAMP [\"']" -->
408
<!-- time-stamp-end: "[\"']>" -->
409
<!-- time-stamp-format: "%:y-%02m-%02d" -->