/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release
237.7.41 by Teddy Hogeborn
* Makefile (DOCS): Added "intro.8mandos".
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" [
237.7.437 by Teddy Hogeborn
Add comment in documentation source with clarifying text.
4
<!ENTITY TIMESTAMP "2016-11-27">
237.7.41 by Teddy Hogeborn
* Makefile (DOCS): Added "intro.8mandos".
5
<!ENTITY % common SYSTEM "common.ent">
6
%common;
7
]>
8
9
<refentry xmlns:xi="http://www.w3.org/2001/XInclude">
10
   <refentryinfo>
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>
16
    <authorgroup>
17
      <author>
18
	<firstname>Björn</firstname>
19
	<surname>Påhlsson</surname>
20
	<address>
237.11.2 by Teddy Hogeborn
Change "fukt.bsnet.se" to "recompile.se" throughout.
21
	  <email>belorn@recompile.se</email>
237.7.41 by Teddy Hogeborn
* Makefile (DOCS): Added "intro.8mandos".
22
	</address>
23
      </author>
24
      <author>
25
	<firstname>Teddy</firstname>
26
	<surname>Hogeborn</surname>
27
	<address>
237.11.2 by Teddy Hogeborn
Change "fukt.bsnet.se" to "recompile.se" throughout.
28
	  <email>teddy@recompile.se</email>
237.7.41 by Teddy Hogeborn
* Makefile (DOCS): Added "intro.8mandos".
29
	</address>
30
      </author>
31
    </authorgroup>
32
    <copyright>
33
      <year>2011</year>
237.7.92 by Teddy Hogeborn
Updated year in copyright notices.
34
      <year>2012</year>
237.7.326 by Teddy Hogeborn
Update copyright year.
35
      <year>2013</year>
36
      <year>2014</year>
37
      <year>2015</year>
237.7.355 by Teddy Hogeborn
Update copyright year.
38
      <year>2016</year>
237.7.41 by Teddy Hogeborn
* Makefile (DOCS): Added "intro.8mandos".
39
      <holder>Teddy Hogeborn</holder>
40
      <holder>Björn Påhlsson</holder>
41
    </copyright>
42
    <xi:include href="legalnotice.xml"/>
43
  </refentryinfo>
44
  
45
  <refmeta>
46
    <refentrytitle>intro</refentrytitle>
47
    <manvolnum>8mandos</manvolnum>
48
  </refmeta>
49
  
50
  <refnamediv>
51
    <refname>intro</refname>
52
    <refpurpose>
53
      Introduction to the Mandos system
54
    </refpurpose>
55
  </refnamediv>
56
  
57
  <refsect1 id="description">
58
    <title>DESCRIPTION</title>
59
    <para>
60
      This is the the Mandos system, which allows computers to have
61
      encrypted root file systems and at the same time be capable of
62
      remote and/or unattended reboots.
63
    </para>
64
    <para>
65
      The computers run a small client program in the initial RAM disk
66
      environment which will communicate with a server over a network.
67
      All network communication is encrypted using TLS.  The clients
68
      are identified by the server using an OpenPGP key; each client
69
      has one unique to it.  The server sends the clients an encrypted
70
      password.  The encrypted password is decrypted by the clients
71
      using the same OpenPGP key, and the password is then used to
72
      unlock the root file system, whereupon the computers can
73
      continue booting normally.
74
    </para>
75
  </refsect1>
76
  
77
  <refsect1 id="introduction">
78
    <title>INTRODUCTION</title>
79
    <para>
237.7.437 by Teddy Hogeborn
Add comment in documentation source with clarifying text.
80
      <!-- This paragraph is a combination and paraphrase of two
81
           quotes from the 1995 movie “The Usual Suspects”. -->
237.7.41 by Teddy Hogeborn
* Makefile (DOCS): Added "intro.8mandos".
82
      You know how it is.  You’ve heard of it happening.  The Man
83
      comes and takes away your servers, your friends’ servers, the
84
      servers of everybody in the same hosting facility. The servers
85
      of their neighbors, and their neighbors’ friends.  The servers
86
      of people who owe them money.  And like
87
      <emphasis>that</emphasis>, they’re gone.  And you doubt you’ll
88
      ever see them again.
89
    </para>
90
    <para>
91
      That is why your servers have encrypted root file systems.
92
      However, there’s a downside.  There’s no going around it:
93
      rebooting is a pain.  Dragging out that rarely-used keyboard and
94
      screen and unraveling cables behind your servers to plug them in
95
      to type in that password is messy, especially if you have many
96
      servers.  There are some people who do clever things like using
97
      serial line consoles and daisy-chain it to the next server, and
98
      keep all the servers connected in a ring with serial cables,
99
      which will work, if your servers are physically close enough.
100
      There are also other out-of-band management solutions, but with
101
      <emphasis>all</emphasis> these, you still have to be on hand and
102
      manually type in the password at boot time.  Otherwise the
103
      server just sits there, waiting for a password.
104
    </para>
105
    <para>
106
      Wouldn’t it be great if you could have the security of encrypted
107
      root file systems and still have servers that could boot up
108
      automatically if there was a short power outage while you were
109
      asleep?  That you could reboot at will, without having someone
110
      run over to the server to type in the password?
111
    </para>
112
    <para>
113
      Well, with Mandos, you (almost) can!  The gain in convenience
114
      will only be offset by a small loss in security.  The setup is
115
      as follows:
116
    </para>
117
    <para>
118
      The server will still have its encrypted root file system.  The
119
      password to this file system will be stored on another computer
120
      (henceforth known as the Mandos server) on the same local
121
      network.  The password will <emphasis>not</emphasis> be stored
122
      in plaintext, but encrypted with OpenPGP.  To decrypt this
123
      password, a key is needed.  This key (the Mandos client key)
124
      will not be stored there, but back on the original server
125
      (henceforth known as the Mandos client) in the initial RAM disk
126
      image.  Oh, and all network Mandos client/server communications
127
      will be encrypted, using TLS (SSL).
128
    </para>
129
    <para>
130
      So, at boot time, the Mandos client will ask for its encrypted
131
      data over the network, decrypt it to get the password, use it to
132
      decrypt the root file, and continue booting.
133
    </para>
134
    <para>
135
      Now, of course the initial RAM disk image is not on the
136
      encrypted root file system, so anyone who had physical access
137
      could take the Mandos client computer offline and read the disk
138
      with their own tools to get the authentication keys used by a
139
      client.  <emphasis>But</emphasis>, by then the Mandos server
140
      should notice that the original server has been offline for too
141
      long, and will no longer give out the encrypted key.  The timing
142
      here is the only real weak point, and the method, frequency and
143
      timeout of the server’s checking can be adjusted to any desired
144
      level of paranoia
145
    </para>
146
    <para>
147
      (The encrypted keys on the Mandos server is on its normal file
148
      system, so those are safe, provided the root file system of
149
      <emphasis>that</emphasis> server is encrypted.)
150
    </para>
151
  </refsect1>
152
  
153
  <refsect1 id="faq">
154
    <title>FREQUENTLY ASKED QUESTIONS</title>
155
    <para>
156
      Couldn’t the security be defeated by…
157
    </para>
158
    <refsect2 id="quick">
159
      <title>Grabbing the Mandos client key from the
160
      initrd <emphasis>really quickly</emphasis>?</title>
161
    <para>
162
      This, as mentioned above, is the only real weak point.  But if
163
      you set the timing values tight enough, this will be really
164
      difficult to do.  An attacker would have to physically
165
      disassemble the client computer, extract the key from the
166
      initial RAM disk image, and then connect to a <emphasis>still
167
      online</emphasis> Mandos server to get the encrypted key, and do
168
      all this <emphasis>before</emphasis> the Mandos server timeout
169
      kicks in and the Mandos server refuses to give out the key to
170
      anyone.
171
    </para>
172
    <para>
173
      Now, as the typical procedure seems to be to barge in and turn
174
      off and grab <emphasis>all</emphasis> computers, to maybe look
175
      at them months later, this is not likely.  If someone does that,
176
      the whole system <emphasis>will</emphasis> lock itself up
177
      completely, since Mandos servers are no longer running.
178
    </para>
179
    <para>
180
      For sophisticated attackers who <emphasis>could</emphasis> do
181
      the clever thing, <emphasis>and</emphasis> had physical access
182
      to the server for enough time, it would be simpler to get a key
183
      for an encrypted file system by using hardware memory scanners
184
      and reading it right off the memory bus.
185
    </para>
186
    </refsect2>
187
    
188
    <refsect2 id="replay">
189
      <title>Replay attacks?</title>
190
      <para>
191
	Nope, the network stuff is all done over TLS, which provides
192
	protection against that.
193
      </para>
194
    </refsect2>
195
    
196
    <refsect2 id="mitm">
197
      <title>Man-in-the-middle?</title>
198
      <para>
199
	No.  The server only gives out the passwords to clients which
200
	have <emphasis>in the TLS handshake</emphasis> proven that
201
	they do indeed hold the OpenPGP private key corresponding to
202
	that client.
203
      </para>
204
    </refsect2>
205
    
237.7.290 by Teddy Hogeborn
Add ":!RSA" to GnuTLS priority string, to disallow non-DHE kx.
206
    <refsect2 id="sniff">
207
      <title>How about sniffing the network traffic and decrypting it
208
      later by physically grabbing the Mandos client and using its
209
      key?</title>
210
      <para>
211
	We only use <acronym>PFS</acronym> (Perfect Forward Security)
212
	key exchange algorithms in TLS, which protects against this.
213
      </para>
214
    </refsect2>
215
    
237.7.41 by Teddy Hogeborn
* Makefile (DOCS): Added "intro.8mandos".
216
    <refsect2 id="physgrab">
217
      <title>Physically grabbing the Mandos server computer?</title>
218
      <para>
219
	You could protect <emphasis>that</emphasis> computer the
220
	old-fashioned way, with a must-type-in-the-password-at-boot
221
	method.  Or you could have two computers be the Mandos server
222
	for each other.
223
      </para>
224
      <para>
225
	Multiple Mandos servers can coexist on a network without any
226
	trouble.  They do not clash, and clients will try all
227
	available servers.  This means that if just one reboots then
228
	the other can bring it back up, but if both reboot at the same
229
	time they will stay down until someone types in the password
230
	on one of them.
231
      </para>
232
    </refsect2>
233
    
237.7.256 by Teddy Hogeborn
mandos-keygen: Generate "checker" option to use SSH fingerprints.
234
    <refsect2 id="fakecheck">
235
      <title>Faking checker results?</title>
237.7.41 by Teddy Hogeborn
* Makefile (DOCS): Added "intro.8mandos".
236
      <para>
237.7.256 by Teddy Hogeborn
mandos-keygen: Generate "checker" option to use SSH fingerprints.
237
	If the Mandos client does not have an SSH server, the default
238
	is for the Mandos server to use
237.7.41 by Teddy Hogeborn
* Makefile (DOCS): Added "intro.8mandos".
239
	<quote><literal>fping</literal></quote>, the replies to which
240
	could be faked to eliminate the timeout.  But this could
241
	easily be changed to any shell command, with any security
237.7.256 by Teddy Hogeborn
mandos-keygen: Generate "checker" option to use SSH fingerprints.
242
	measures you like.  If the Mandos client
243
	<emphasis>has</emphasis> an SSH server, the default
244
	configuration (as generated by
245
	<command>mandos-keygen</command> with the
246
	<option>--password</option> option) is for the Mandos server
247
	to use an <command>ssh-keyscan</command> command with strict
248
	keychecking, which can not be faked.  Alternatively, IPsec
249
	could be used for the ping packets, making them secure.
237.7.41 by Teddy Hogeborn
* Makefile (DOCS): Added "intro.8mandos".
250
      </para>
251
    </refsect2>
252
  </refsect1>
253
  
254
  <refsect1 id="security">
255
    <title>SECURITY</title>
256
    <para>
257
      So, in summary:  The only weakness in the Mandos system is from
258
      people who have:
259
    </para>
260
    <orderedlist>
261
      <listitem>
262
	<para>
263
	  The power to come in and physically take your servers,
264
	  <emphasis>and</emphasis>
265
	</para>
266
      </listitem>
267
      <listitem>
268
	<para>
269
	  The cunning and patience to do it carefully, one at a time,
270
	  and <emphasis>quickly</emphasis>, faking Mandos
271
	  client/server responses for each one before the timeout.
272
	</para>
273
      </listitem>
274
    </orderedlist>
275
    <para>
276
      While there are some who may be threatened by people who have
277
      <emphasis>both</emphasis> these attributes, they do not,
278
      probably, constitute the majority.
279
    </para>
280
    <para>
281
      If you <emphasis>do</emphasis> face such opponents, you must
282
      figure that they could just as well open your servers and read
283
      the file system keys right off the memory by running wires to
284
      the memory bus.
285
    </para>
286
    <para>
287
      What Mandos is designed to protect against is
288
      <emphasis>not</emphasis> such determined, focused, and competent
289
      attacks, but against the early morning knock on your door and
290
      the sudden absence of all the servers in your server room.
291
      Which it does nicely.
292
    </para>
293
  </refsect1>
294
  
295
  <refsect1 id="plugins">
296
    <title>PLUGINS</title>
297
    <para>
298
      In the early designs, the
299
      <citerefentry><refentrytitle>mandos-client</refentrytitle
300
      ><manvolnum>8mandos</manvolnum></citerefentry> program (which
301
      retrieves a password from the Mandos server) also prompted for a
302
      password on the terminal, in case a Mandos server could not be
303
      found.  Other ways of retrieving a password could easily be
304
      envisoned, but this multiplicity of purpose was seen to be too
305
      complex to be a viable way to continue.  Instead, the original
306
      program was separated into <citerefentry><refentrytitle
307
      >mandos-client</refentrytitle><manvolnum>8mandos</manvolnum
308
      ></citerefentry> and <citerefentry><refentrytitle
309
      >password-prompt</refentrytitle><manvolnum>8mandos</manvolnum
310
      ></citerefentry>, and a <citerefentry><refentrytitle
311
      >plugin-runner</refentrytitle><manvolnum>8mandos</manvolnum
312
      ></citerefentry> exist to run them both in parallel, allowing
313
      the first successful plugin to provide the password.  This
314
      opened up for any number of additional plugins to run, all
315
      competing to be the first to find a password and provide it to
316
      the plugin runner.
317
    </para>
318
    <para>
319
      Four additional plugins are provided:
320
    </para>
321
    <variablelist>
322
      <varlistentry>
323
	<term>
324
	  <citerefentry><refentrytitle>plymouth</refentrytitle>
325
	  <manvolnum>8mandos</manvolnum></citerefentry>
326
	</term>
327
	<listitem>
328
	  <para>
329
	    This prompts for a password when using <citerefentry>
330
	    <refentrytitle>plymouth</refentrytitle><manvolnum
331
	    >8</manvolnum></citerefentry>.
332
	  </para>
333
	</listitem>
334
      </varlistentry>
335
      <varlistentry>
336
	<term>
337
	  <citerefentry><refentrytitle>usplash</refentrytitle>
338
	  <manvolnum>8mandos</manvolnum></citerefentry>
339
	</term>
340
	<listitem>
341
	  <para>
342
	    This prompts for a password when using <citerefentry>
343
	    <refentrytitle>usplash</refentrytitle><manvolnum
344
	    >8</manvolnum></citerefentry>.
345
	  </para>
346
	</listitem>
347
      </varlistentry>
348
      <varlistentry>
349
	<term>
350
	  <citerefentry><refentrytitle>splashy</refentrytitle>
351
	  <manvolnum>8mandos</manvolnum></citerefentry>
352
	</term>
353
	<listitem>
354
	  <para>
355
	    This prompts for a password when using <citerefentry>
356
	    <refentrytitle>splashy</refentrytitle><manvolnum
357
	    >8</manvolnum></citerefentry>.
358
	  </para>
359
	</listitem>
360
      </varlistentry>
361
      <varlistentry>
362
	<term>
363
	  <citerefentry><refentrytitle>askpass-fifo</refentrytitle>
364
	  <manvolnum>8mandos</manvolnum></citerefentry>
365
	</term>
366
	<listitem>
367
	  <para>
368
	    To provide compatibility with the "askpass" program from
369
	    cryptsetup, this plugin listens to the same FIFO as
370
	    askpass would do.
371
	  </para>
372
	</listitem>
373
      </varlistentry>
374
    </variablelist>
375
    <para>
376
      More plugins can easily be written and added by the system
377
      administrator; see the section called "WRITING PLUGINS" in
378
      <citerefentry><refentrytitle>plugin-runner</refentrytitle>
379
      <manvolnum>8mandos</manvolnum></citerefentry> to learn the
380
      plugin requirements.
381
    </para>
382
  </refsect1>
383
  
237.7.369 by Teddy Hogeborn
Add bug reporting information to manual pages
384
  <refsect1 id="bugs">
385
    <title>BUGS</title>
386
    <xi:include href="bugs.xml"/>
387
  </refsect1>
388
  
237.7.41 by Teddy Hogeborn
* Makefile (DOCS): Added "intro.8mandos".
389
  <refsect1 id="see_also">
390
    <title>SEE ALSO</title>
391
    <para>
392
      <citerefentry><refentrytitle>mandos</refentrytitle>
393
      <manvolnum>8</manvolnum></citerefentry>,
394
      <citerefentry><refentrytitle>mandos.conf</refentrytitle>
395
      <manvolnum>5</manvolnum></citerefentry>,
396
      <citerefentry><refentrytitle>mandos-clients.conf</refentrytitle>
397
      <manvolnum>5</manvolnum></citerefentry>,
398
      <citerefentry><refentrytitle>mandos-ctl</refentrytitle>
399
      <manvolnum>8</manvolnum></citerefentry>,
400
      <citerefentry><refentrytitle>mandos-monitor</refentrytitle>
401
      <manvolnum>8</manvolnum></citerefentry>,
402
      <citerefentry><refentrytitle>plugin-runner</refentrytitle>
403
      <manvolnum>8mandos</manvolnum></citerefentry>,
404
      <citerefentry><refentrytitle>mandos-client</refentrytitle>
405
      <manvolnum>8mandos</manvolnum></citerefentry>,
406
      <citerefentry><refentrytitle>password-prompt</refentrytitle>
407
      <manvolnum>8mandos</manvolnum></citerefentry>,
408
      <citerefentry><refentrytitle>plymouth</refentrytitle>
409
      <manvolnum>8mandos</manvolnum></citerefentry>,
410
      <citerefentry><refentrytitle>usplash</refentrytitle>
411
      <manvolnum>8mandos</manvolnum></citerefentry>,
412
      <citerefentry><refentrytitle>splashy</refentrytitle>
413
      <manvolnum>8mandos</manvolnum></citerefentry>,
414
      <citerefentry><refentrytitle>askpass-fifo</refentrytitle>
415
      <manvolnum>8mandos</manvolnum></citerefentry>,
416
      <citerefentry><refentrytitle>mandos-keygen</refentrytitle>
417
      <manvolnum>8</manvolnum></citerefentry>
418
    </para>
419
    <variablelist>
420
      <varlistentry>
421
	<term>
237.7.392 by Teddy Hogeborn
Use HTTPS in home page links
422
	  <ulink url="https://www.recompile.se/mandos">Mandos</ulink>
237.7.41 by Teddy Hogeborn
* Makefile (DOCS): Added "intro.8mandos".
423
	</term>
424
	<listitem>
425
	  <para>
426
	    The Mandos home page.
427
	  </para>
428
	</listitem>
429
      </varlistentry>
430
    </variablelist>
431
  </refsect1>
432
</refentry>
433
<!-- Local Variables: -->
434
<!-- time-stamp-start: "<!ENTITY TIMESTAMP [\"']" -->
435
<!-- time-stamp-end: "[\"']>" -->
436
<!-- time-stamp-format: "%:y-%02m-%02d" -->
437
<!-- End: -->