/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: Björn Påhlsson
  • Date: 2008-07-20 02:52:20 UTC
  • Revision ID: belorn@braxen-20080720025220-r5u0388uy9iu23h6
Added following support:
Pluginbased client handler
rewritten Mandos client
       Avahi instead of udp server discovery
       openpgp encrypted key support
Passprompt stand alone application for direct console input
Added logging for Mandos server

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