/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to intro.xml

  • Committer: Teddy Hogeborn
  • Date: 2015-07-20 03:03:33 UTC
  • Revision ID: teddy@recompile.se-20150720030333-203m2aeblypcsfte
Bug fix for GnuTLS 3: be compatible with old 2048-bit DSA keys.

The mandos-keygen program in Mandos version 1.6.0 and older generated
2048-bit DSA keys, and when GnuTLS uses these it has trouble
connecting using the Mandos default priority string.  This was
previously fixed in Mandos 1.6.2, but the bug reappeared when using
GnuTLS 3, so the default priority string has to change again; this
time also the Mandos client has to change its default, so now the
server and the client should use the same default priority string:

SECURE256:!CTYPE-X.509:+CTYPE-OPENPGP:!RSA:+SIGN-DSA-SHA256

* mandos (main/server_defaults): Changed default priority string.
* mandos-options.xml (/section/para[id="priority_compat"]): Removed.
  (/section/para[id="priority"]): Changed default priority string.
* mandos.conf ([DEFAULT]/priority): - '' -
* mandos.conf.xml (OPTIONS/priority): Refer to the id "priority"
                                      instead of "priority_compat".
* mandos.xml (OPTIONS/--priority): - '' -
* plugins.d/mandos-client.c (main): Changed default priority string.

Show diffs side-by-side

added added

removed removed

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