/mandos/trunk

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