<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.hermann-uwe.de" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Uwe Hermann - Towards a moderately paranoid Debian laptop setup [Update] - Comments</title>
 <link>http://www.hermann-uwe.de/blog/towards-a-moderately-paranoid-debian-laptop-setup--part-1-base-system</link>
 <description>Comments for &quot;Towards a moderately paranoid Debian laptop setup [Update]&quot;</description>
 <language>en</language>
<item>
 <title>HOWTO</title>
 <link>http://www.hermann-uwe.de/blog/towards-a-moderately-paranoid-debian-laptop-setup--part-1-base-system#comment-78129</link>
 <description>&lt;p&gt;Maybe I&#039;ll update the HOWTO a bit, but there&#039;s no need to write a new one, the instructions are pretty much the same for newer Debian versions.&lt;/p&gt;
</description>
 <pubDate>Sat, 29 Aug 2009 21:06:29 +0200</pubDate>
 <dc:creator>Uwe Hermann</dc:creator>
 <guid isPermaLink="false">comment 78129 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Uwe:
Don&#039;t you think it&#039;s</title>
 <link>http://www.hermann-uwe.de/blog/towards-a-moderately-paranoid-debian-laptop-setup--part-1-base-system#comment-78072</link>
 <description>&lt;p&gt;Uwe:&lt;/p&gt;
&lt;p&gt;Don&#039;t you think it&#039;s time to an not-so-moderated paranoid Debian 5.x laptop setup?&lt;/p&gt;
&lt;p&gt;I&#039;ve my tin foil hat ready!&lt;/p&gt;
</description>
 <pubDate>Mon, 24 Aug 2009 18:03:10 +0200</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 78072 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Enable password in the menu.list</title>
 <link>http://www.hermann-uwe.de/blog/towards-a-moderately-paranoid-debian-laptop-setup--part-1-base-system#comment-77982</link>
 <description>&lt;p&gt;Hi. I got a question. I tried following what you said about putting a password under every title in the menu.list then upon reboot it does seems to put security having to type the password first before you can  login to whatever OS installed in your box. But how come I can edit the menu list and delete the line with the password and successfully boot the box before typing the password? Does it suppose to do that? Isn&#039;t the password suppose to prevent access to your box? Or, did I miss something?&lt;/p&gt;
</description>
 <pubDate>Mon, 17 Aug 2009 02:47:22 +0200</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 77982 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Great article. Gave me</title>
 <link>http://www.hermann-uwe.de/blog/towards-a-moderately-paranoid-debian-laptop-setup--part-1-base-system#comment-76138</link>
 <description>&lt;p&gt;Great article. Gave me something to think about.&lt;/p&gt;
</description>
 <pubDate>Sat, 09 May 2009 04:06:57 +0200</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 76138 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Nice</title>
 <link>http://www.hermann-uwe.de/blog/towards-a-moderately-paranoid-debian-laptop-setup--part-1-base-system#comment-62879</link>
 <description>&lt;p&gt;Now I know what &quot;sightly paranoid&quot; is meaning :-)&lt;/p&gt;
&lt;p&gt;Consider filling your laptop with epoxy for a more difficult physical access (but I guess this would result in overheating problems)&lt;br /&gt;
For me, encrypting home + swap is enough. I just came to your site to figure out how I can block the firewire DMA access.&lt;/p&gt;
&lt;p&gt;But if I ever need a PC for developing my world dominion plans, I will come back to your HOWTO.&lt;/p&gt;
</description>
 <pubDate>Fri, 09 Jan 2009 20:49:28 +0100</pubDate>
 <dc:creator>Alien23</dc:creator>
 <guid isPermaLink="false">comment 62879 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Coldbooting will crack HD encryption</title>
 <link>http://www.hermann-uwe.de/blog/towards-a-moderately-paranoid-debian-laptop-setup--part-1-base-system#comment-57671</link>
 <description>&lt;p&gt;It should be noted that, unless the machine has been powered OFF (or hibernated, not suspended) for at least several minutes, it is possible for a determined attacker to overcome any disk encryption by cooling/freezing the RAM modules, transferring them to a different machine and looking for the disk encryption (session) key.&lt;/p&gt;
&lt;p&gt;This will obviously render all the nice paranoid tactics void.  So make sure you don&#039;t leave your machine unattended in a hostile environment unless it has been powered down for at least a few minutes (a few more in winter :-).&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://citp.princeton.edu/pub/coldboot.pdf&quot;&gt;PDF of a research article demonstrating the technique&lt;/a&gt;&lt;/p&gt;
</description>
 <pubDate>Sat, 02 Aug 2008 21:43:19 +0200</pubDate>
 <dc:creator>Sigi</dc:creator>
 <guid isPermaLink="false">comment 57671 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>good article, i will write</title>
 <link>http://www.hermann-uwe.de/blog/towards-a-moderately-paranoid-debian-laptop-setup--part-1-base-system#comment-53130</link>
 <description>&lt;p&gt;good article, i will write some in my blog about that&lt;/p&gt;
</description>
 <pubDate>Sat, 03 May 2008 23:56:49 +0200</pubDate>
 <dc:creator>laptop reviews</dc:creator>
 <guid isPermaLink="false">comment 53130 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Great information!!</title>
 <link>http://www.hermann-uwe.de/blog/towards-a-moderately-paranoid-debian-laptop-setup--part-1-base-system#comment-50576</link>
 <description>&lt;p&gt;Great information!!&lt;/p&gt;
</description>
 <pubDate>Tue, 19 Feb 2008 12:28:47 +0100</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 50576 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>luks passphrase</title>
 <link>http://www.hermann-uwe.de/blog/towards-a-moderately-paranoid-debian-laptop-setup--part-1-base-system#comment-49493</link>
 <description>&lt;p&gt;hmmm... putting the partition and passphrase on a cdrom is probably a bad idea. But is it much different than having the passphrase on a usb stick? I think having some kind of way to read a passphrase from somewhere besides the keyboard would be a good thing. Entering a 20 character passphrase on a laptop seems a bit impractical but automatically reading it from somewhere does not. Do you know if there are any plans to support this sort of thing in the future. If it&#039;s not a horrible idea (or a less than good one), it would nice to see in the debian installer.&lt;/p&gt;
</description>
 <pubDate>Thu, 08 Nov 2007 04:16:47 +0100</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 49493 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Another ways to get a encrypted filesystem</title>
 <link>http://www.hermann-uwe.de/blog/towards-a-moderately-paranoid-debian-laptop-setup--part-1-base-system#comment-49492</link>
 <description>&lt;p&gt;First of all, very good and complete tutorial! Congratulations.&lt;/p&gt;
&lt;p&gt;Now if you want to encrypt only a partition or make a encrypted filesystem over a file you can read this:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://goohackle.com/how-to-create-a-lvm-encrypted-partition/&quot;&gt;How to create a LVM encrypted partition&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://goohackle.com/how-to-create-a-portable-encrypted-file_system-on-a-loop-file/&quot;&gt;How to create a portable encrypted file system on a loop file&lt;/a&gt;&lt;/p&gt;
</description>
 <pubDate>Wed, 07 Nov 2007 04:47:00 +0100</pubDate>
 <dc:creator>GooHackle</dc:creator>
 <guid isPermaLink="false">comment 49492 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Passphrase from CDROM</title>
 <link>http://www.hermann-uwe.de/blog/towards-a-moderately-paranoid-debian-laptop-setup--part-1-base-system#comment-49457</link>
 <description>&lt;p&gt;No, but I don&#039;t think you want that, it&#039;ll make the whole procedure &lt;em&gt;less&lt;/em&gt; secure. Anybody who gets that CDROM in his fingers has access to your encrypted files!&lt;/p&gt;
&lt;p&gt;Uwe.&lt;/p&gt;
</description>
 <pubDate>Thu, 01 Nov 2007 18:56:05 +0100</pubDate>
 <dc:creator>Uwe Hermann</dc:creator>
 <guid isPermaLink="false">comment 49457 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>I was able to get my boot</title>
 <link>http://www.hermann-uwe.de/blog/towards-a-moderately-paranoid-debian-laptop-setup--part-1-base-system#comment-49451</link>
 <description>&lt;p&gt;I was able to get my boot partition on cdrom by loosely following the instructions found at http://pusling.com/blog/?p=25&lt;/p&gt;
&lt;p&gt;Now I&#039;d just like to figure out how to have the Passphrase read from the cdrom so I don&#039;t have to enter it during startup. Does anyone know how to accomplish this?&lt;/p&gt;
</description>
 <pubDate>Tue, 30 Oct 2007 16:50:00 +0100</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 49451 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Installed it, but get Boot Error on boot, though the stick is bo</title>
 <link>http://www.hermann-uwe.de/blog/towards-a-moderately-paranoid-debian-laptop-setup--part-1-base-system#comment-49406</link>
 <description>&lt;p&gt;Hi:&lt;/p&gt;
&lt;p&gt;I did something akin to this, though the easier way I think. Installed debian from a netinst CD to a USB stick. Made an unencrypted boot partition and an encrypted partition, using LVM. Installed the system to it.&lt;/p&gt;
&lt;p&gt;Then ran:&lt;br /&gt;
install-grub --recheck /dev/sda&lt;br /&gt;
ran fine...&lt;br /&gt;
then in grub ran:&lt;br /&gt;
root (hd0,0)&lt;br /&gt;
setup (hd0)&lt;br /&gt;
ran fine...&lt;br /&gt;
Then ran update-grub.&lt;br /&gt;
Checked the /boot/grub/menu.lst on the stick, is fine.&lt;/p&gt;
&lt;p&gt;But upon boot with the USB inserted, the system halts with a Boot Error.&lt;/p&gt;
&lt;p&gt;The USB is bootable though, since I checked prior to install by putting a DebianLive image on it, and it would get me to the Grub menu. But here I don&#039;t get to the Grub menu.&lt;/p&gt;
&lt;p&gt;The system is there, I can mount the lv&#039;s by hand etc.&lt;/p&gt;
&lt;p&gt;So how can I make the USB bootable properly and get to the Grub menu upon boot?&lt;/p&gt;
</description>
 <pubDate>Thu, 18 Oct 2007 22:41:53 +0200</pubDate>
 <dc:creator>ShiroiKuma</dc:creator>
 <guid isPermaLink="false">comment 49406 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Further ideas - Boot from CD-R</title>
 <link>http://www.hermann-uwe.de/blog/towards-a-moderately-paranoid-debian-laptop-setup--part-1-base-system#comment-49180</link>
 <description>&lt;p&gt;&quot;The /boot partition is still unencrypted, so an attacker can tamper with it. Boot from a CD-R, forbid booting from hard drive (BIOS).&quot;&lt;/p&gt;
&lt;p&gt;Do you know a detailed instruction, how to boot a LUKS-encrypted system (even /boot partition is encrypted!) from CD-R?&lt;br /&gt;
Thank you.&lt;/p&gt;
</description>
 <pubDate>Fri, 31 Aug 2007 18:53:38 +0200</pubDate>
 <dc:creator>han.hof</dc:creator>
 <guid isPermaLink="false">comment 49180 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>check-selinux-installation on current debian sid</title>
 <link>http://www.hermann-uwe.de/blog/towards-a-moderately-paranoid-debian-laptop-setup--part-1-base-system#comment-45155</link>
 <description>&lt;p&gt;Tanks for the vital info about selinux installation.&lt;br /&gt;
But on the current debian sid I got a little problem with the motd check of the check-selinux-installation script. Now it checks  /etc/default/rcS for the variable EDITMOTD=no.&lt;br /&gt;
I added this line in addition to the recommended steps in your tutorial.&lt;br /&gt;
So it passes the test and avoids a misleading error message.&lt;br /&gt;
Maybe this will be helpful for other selinux users.&lt;/p&gt;
</description>
 <pubDate>Sat, 19 May 2007 12:53:37 +0200</pubDate>
 <dc:creator>skol</dc:creator>
 <guid isPermaLink="false">comment 45155 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Towards a moderately paranoid Debian laptop setup [Update]</title>
 <link>http://www.hermann-uwe.de/blog/towards-a-moderately-paranoid-debian-laptop-setup--part-1-base-system</link>
 <description>&lt;p&gt;I was planning to set up my laptop from scratch for a while now... so I did.&lt;/p&gt;
&lt;h2&gt;Preparation&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;First, go home. No, really! Do all of this at home in a non-hostile, firewalled network. You don&#039;t want to be in a crowded place such as a conference where people can shoulder-surf your passwords, nor do you want your network traffic sniffed or &lt;a href=&quot;http://en.wikipedia.org/wiki/Man-in-the-middle_attack&quot;&gt;MITM&lt;/a&gt;&#039;d in a hostile network.&lt;/li&gt;
&lt;li&gt;Backup all your data! You&#039;ll be wiping your whole drive soon, so make sure you have recent, tested backups.&lt;/li&gt;
&lt;li&gt;Get the most recent &lt;a href=&quot;http://www.us.debian.org/devel/debian-installer/&quot;&gt;Debian-installer ISO image&lt;/a&gt; (currently etch-beta3), as well as the &lt;code&gt;MD5SUMS&lt;/code&gt; and &lt;code&gt;MD5SUMS.sign&lt;/code&gt; files:&lt;code&gt;&lt;br /&gt;
wget http://cdimage.debian.org/cdimage/etch_di_beta3/i386/iso-cd/debian-testing-i386-binary-1.iso&lt;br /&gt;
wget http://cdimage.debian.org/cdimage/etch_di_beta3/i386/iso-cd/MD5SUMS&lt;br /&gt;
wget http://cdimage.debian.org/cdimage/etch_di_beta3/i386/iso-cd/MD5SUMS.sign&lt;/code&gt;
  &lt;/li&gt;
&lt;li&gt;
    Run &lt;code&gt;gpg --verify MD5SUMS.sign&lt;/code&gt;, which will fail but tell you the signing key ID (&lt;code&gt;88C7C1F7&lt;/code&gt; in this case). Get the key and re-run the verification: &lt;code&gt;gpg --recv-key --keyserver subkeys.pgp.net 88C7C1F7 &amp;amp;&amp; gpg --verify MD5SUMS.sign&lt;/code&gt;. The output should now say &quot;Good signature from [...]&quot;.
  &lt;/li&gt;
&lt;li&gt;Now check the MD5 checksums via &lt;code&gt;md5sum -c MD5SUMS&lt;/code&gt;. The output should contain &lt;code&gt;debian-testing-i386-binary-1.iso: OK&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;As you now have (somewhat) verified the integrity of the ISO image, burn it on a CD-R: &lt;code&gt;wodim debian-testing-i386-binary-1.iso&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Put trusted versions of some files on a USB thumb drive (or CD-ROM); &lt;em&gt;at least&lt;/em&gt; a &lt;a href=&quot;http://www.hermann-uwe.de/files/fw_laptop&quot;&gt;firewall script&lt;/a&gt;, but maybe also your &lt;a href=&quot;http://www.hermann-uwe.de/files/bashrc&quot;&gt;bashrc&lt;/a&gt;, &lt;a href=&quot;http://www.hermann-uwe.de/files/bash_logout&quot;&gt;bash_logout&lt;/a&gt;, &lt;a href=&quot;http://www.hermann-uwe.de/files/inputrc&quot;&gt;inputrc&lt;/a&gt;, &lt;a href=&quot;http://www.hermann-uwe.de/files/vimrc&quot;&gt;vimrc&lt;/a&gt;, &lt;a href=&quot;http://www.hermann-uwe.de/files/muttrc&quot;&gt;muttrc&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Disconnect your laptop from &lt;em&gt;any&lt;/em&gt; kinds of networks. Pull all ethernet cables. Disable WLAN (via hardware killswitch). Disable Bluetooth. Disable/remove Firewire, USB, serial, whatever.
&lt;li&gt;Put on your &lt;a href=&quot;http://en.wikipedia.org/wiki/Tin-foil_hat&quot;&gt;tin-foil hat&lt;/a&gt; (optional).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;BIOS&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Set a good BIOS boot password (which you need to boot any OS). Set a (different) good BIOS boot setup password (which you need to enter the BIOS).&lt;/li&gt;
&lt;li&gt;Disable &lt;em&gt;all&lt;/em&gt; boot possibilities in the BIOS, except for CD-ROM. This means it should &lt;em&gt;not&lt;/em&gt; be possible to boot via USB, hard drive, network, PXE, Firewire, floppy, whatever. The BIOS setup password helps to prevent tampering with this setting.&lt;/li&gt;
&lt;li&gt;Finally, never rely on BIOS passwords alone for security! They can often be circumvented very easily.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Installation / Setting up full-disk encryption using dm-crypt&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Insert the installer CD and boot in expert-mode (don&#039;t hit ENTER when you boot, but rather type &quot;expert&quot;).&lt;/li&gt;
&lt;li&gt;As for networking: select &quot;Do not configure the network at this time&quot;. We&#039;ll fix and enable networking later.&lt;/li&gt;
&lt;li&gt;
    Partitioning:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Select manual partitioning. Remove all partitions (if any). Create a 100 MB &lt;code&gt;/boot&lt;/code&gt; (ext3) as primary partition, and make the rest of the hard drive one huge partition which has &quot;Use as:&quot; set to &quot;physical volume for encryption&quot;.&lt;/li&gt;
&lt;li&gt;The standard options for cipher, key size, IV mode etc. should be fine (AES, 256 bit, CBC-ESSIV-SHA256, dm-crypt).&lt;/li&gt;
&lt;li&gt;After the erasing is done (this is important!), use the whole encrypted space as &quot;physical volume for LVM&quot;. Then select &quot;Configure the Logical Volume Manager&quot;. Create one big volume group and a bunch of logical volumes for the various partitions we&#039;ll use (lv-root, lv-usr, lv-var, lv-tmp, lv-swap, lv-home).&lt;/li&gt;
&lt;li&gt;It is &lt;strong&gt;extremely important&lt;/strong&gt; that your swap space is encrypted (in this case it is, as &lt;em&gt;all&lt;/em&gt; partitions except for &lt;code&gt;/boot&lt;/code&gt; reside on a dm-crypt device)! &lt;strong&gt;Never&lt;/strong&gt; set up unencrypted swap!&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Enable shadow passwords. Allow login as root (I feel confident that I won&#039;t do stupid things as root).&lt;/li&gt;
&lt;li&gt;Choose a good root password, and a (different) good user password. Don&#039;t enter a full name for the user.&lt;/li&gt;
&lt;li&gt;Choose the latest kernel (old kernels might have security issues). Do not participate in &lt;a href=&quot;http://packages.debian.org/stable/misc/popularity-contest&quot;&gt;popcon&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Do not install any tasks (no &quot;desktop&quot;, no &quot;base system&quot;). We want the smallest installation possible, and add only the packages we really need. Fewer packages means fewer security issues (statistically).&lt;/li&gt;
&lt;li&gt;That&#039;s it. Eject the CD-ROM, reboot, change the BIOS to only allow booting from hard drive.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Post-installation tasks&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Enter the USB thumb drive, copy all config-files to &lt;code&gt;/root&lt;/code&gt; and &lt;code&gt;/home/uwe&lt;/code&gt;. Log out and log in again to make &lt;code&gt;~/.bashrc&lt;/code&gt; and &lt;code&gt;~/.inputrc&lt;/code&gt; take effect.&lt;/li&gt;
&lt;li&gt;Enable the firewall: &lt;code&gt;mkdir /etc/rc.boot &amp;amp;&amp; cp fw_laptop /etc/rc.boot &amp;amp;&amp; chmod 700 /etc/rc.boot/fw_laptop &amp;amp;&amp; sh /etc/rc.boot/fw_laptop&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Shut down all networked daemons (if any): &lt;code&gt;/etc/init.d/foo stop&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Tighten home-directory permissions: &lt;code&gt;chmod 700 /root /home/uwe&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Edit &lt;code&gt;/etc/passwd&lt;/code&gt;: give all users except for &lt;code&gt;root&lt;/code&gt;, &lt;code&gt;sync&lt;/code&gt;, &lt;code&gt;uucp&lt;/code&gt; and your user account &lt;code&gt;/usr/sbin/nologin&lt;/code&gt; as login shell. None of these accounts really needs a valid login shell (&lt;code&gt;nologin&lt;/code&gt; will log any login attempts for those accounts).&lt;/li&gt;
&lt;li&gt;Edit &lt;code&gt;/etc/group&lt;/code&gt;: remove your user account from the &lt;code&gt;dialout&lt;/code&gt;, &lt;code&gt;cdrom&lt;/code&gt;, and &lt;code&gt;floppy&lt;/code&gt; group. The groups &lt;code&gt;audio&lt;/code&gt;, &lt;code&gt;video&lt;/code&gt;, and &lt;code&gt;plugdev&lt;/code&gt; can stay.&lt;/li&gt;
&lt;li&gt;Edit &lt;code&gt;/etc/fstab&lt;/code&gt;: add some mount options such as &lt;code&gt;ro&lt;/code&gt;, &lt;code&gt;nosuid&lt;/code&gt;, &lt;code&gt;noexec&lt;/code&gt;, or &lt;code&gt;nodev&lt;/code&gt; &lt;a href=&quot;http://www.debian.org/doc/manuals/securing-debian-howto/ch3.en.html#s3.2&quot;&gt;as you see fit&lt;/a&gt;. Example:&lt;br /&gt;
&lt;pre&gt;
/dev/mapper/vg--whole-lv--root /     ext3 defaults,errors=remount-ro      0 0
/dev/sda2                      /boot ext3 defaults,nodev,nosuid,noexec,ro 0 0
/dev/mapper/vg--whole-lv--home /home ext3 defaults,nodev,nosuid           0 0
/dev/mapper/vg--whole-lv--tmp  /tmp  ext3 defaults,nodev,nosuid           0 0
/dev/mapper/vg--whole-lv--usr  /usr  ext3 defaults,nodev,ro               0 0
/dev/mapper/vg--whole-lv--var  /var  ext3 defaults,nodev                  0 0
/dev/mapper/vg--whole-lv--swap none  swap sw                              0 0
/dev/scd0 /media/cdrom iso9660 noauto,nodev,nosuid,noexec,uid=uwe,gid=uwe 0 0
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;If you have read-only (&lt;code&gt;ro&lt;/code&gt;) file systems, configure Apt so that it can remount them read-write when installing/removing packages. Add this to &lt;code&gt;/etc/apt/apt.conf&lt;/code&gt;:&lt;br /&gt;
&lt;pre&gt;
DPkg
{
  Pre-Invoke { &quot;mount -o remount,rw /usr; mount -o remount,rw /boot&quot;; }
  Post-Invoke { &quot;mount -o remount,ro /usr; mount -o remount,ro /boot&quot;; }
}
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Fix the GRUB configuration. Replace the &quot;&lt;code&gt;password foo&lt;/code&gt;&quot; line (which contains the GRUB password in plain-text) from your &lt;code&gt;/boot/grub/menu.lst&lt;/code&gt; with a &quot;&lt;code&gt;password --md5 $1$1234567890...&lt;/code&gt;&quot; line, where the MD5 hash (&lt;code&gt;$1$1234567890...&lt;/code&gt;) can be generated with &lt;code&gt;grub-md5-crypt&lt;/code&gt;. Additionally, add such a password line after &lt;em&gt;each&lt;/em&gt; &quot;&lt;code&gt;title&lt;/code&gt;&quot; line in the GRUB config-file, so that nobody can boot any OS installed on the laptop without a password!&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Networking, Upgrading and Apt-secure&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Now that we have a small, hardened system, it should be reasonably safe to enable networking. Add this to &lt;code&gt;/etc/network/interfaces&lt;/code&gt;:&lt;br /&gt;
&lt;pre&gt;
auto eth0
iface eth0 inet dhcp
  pre-up /etc/rc.boot/fw_laptop
&lt;/pre&gt;&lt;p&gt;    Run &lt;code&gt;/etc/init.d/networking restart&lt;/code&gt;. The firewall script will run every time the network is started.
  &lt;/li&gt;
&lt;li&gt;Now add this (tweak as you see fit) to &lt;code&gt;/etc/apt/sources.list&lt;/code&gt;: &lt;code&gt;&lt;br /&gt;
deb http://ftp.de.debian.org/debian unstable main&lt;br /&gt;
deb-src http://ftp.de.debian.org/debian unstable main&lt;/code&gt;
  &lt;/li&gt;
&lt;li&gt;Time for upgrading: &lt;code&gt;apt-get update &amp;amp;&amp; apt-get dist-upgrade&lt;/code&gt;. All packages are &lt;a href=&quot;http://gnupg.org/&quot;&gt;GnuPG&lt;/a&gt;-signed and will be verified by &lt;code&gt;Apt&lt;/code&gt;. The installer already ships the required key (for 2006), so everything should just work. Still, you should read about &lt;a href=&quot;http://wiki.debian.org/SecureApt&quot;&gt;SecureApt&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Install the rest of your system now, and restore your data from backups.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;sysv-rc-conf&lt;/code&gt; to disable all daemons you don&#039;t want to start per default: &lt;code&gt;sysv-rc-conf foo off&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Install and set up &lt;a href=&quot;http://la-samhna.de/samhain/&quot;&gt;Samhain&lt;/a&gt; (or any other file integrity checker): &lt;code&gt;apt-get install samhain&lt;/code&gt;. You want to be notified if your system files are being tampered with (e.g. replaced by a rootkit).&lt;/li&gt;
&lt;li&gt;Install and configure &lt;a href=&quot;http://tor.eff.org/&quot;&gt;Tor&lt;/a&gt; for anonymous browsing. &lt;a href=&quot;http://www.hermann-uwe.de/blog/howto-anonymous-communication-with-tor-some-hints-and-some-pitfalls&quot;&gt;More details here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Install and configure more security-related programs, e.g. logcheck, snort, rkhunter, chkrootkit, tiger, sxid, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;SELinux&lt;/h2&gt;
&lt;p&gt;Now install and set up &lt;a href=&quot;http://en.wikipedia.org/wiki/Selinux&quot;&gt;SELinux&lt;/a&gt;. This section is based on notes from &lt;a href=&quot;http://blog.drinsama.de/erich&quot;&gt;Erich Schubert&lt;/a&gt; (thanks!), and will soon appear in the &lt;a href=&quot;http://wiki.debian.org/SELinuxSetup&quot;&gt;SELinuxSetup&lt;/a&gt; wiki page, too.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Install the base packages and an SELinux policy: &lt;code&gt;apt-get install selinux-basics selinux-policy-refpolicy-targeted&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Edit &lt;code&gt;/boot/grub/menu.lst&lt;/code&gt; and add &lt;code&gt;selinux=1&lt;/code&gt; to your kernel command line to enable SELinux upon booting.&lt;/li&gt;
&lt;li&gt;In &lt;code&gt;/etc/pam.d/login&lt;/code&gt; uncomment the &quot;&lt;code&gt;session required pam_selinux.so multiple&lt;/code&gt;&quot; line. Do the same in &lt;code&gt;/etc/pam.d/ssh&lt;/code&gt; if you have ssh installed.&lt;/li&gt;
&lt;li&gt;In &lt;code&gt;/etc/default/rcS&lt;/code&gt; set &lt;code&gt;FSCKFIX=yes&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;In &lt;code&gt;/etc/init.d/bootmisc.sh&lt;/code&gt; search for &quot;Update motd&quot; and comment the two lines below that line. Then &lt;code&gt;rm /var/run/motd&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If you have exim installed, you must either install postfix or write an exim policy, as none currently exists. But even postfix needs some fixing (no pun intended ;-). Disable chroot-support (change all &quot;chroot&quot; fields to &quot;&lt;code&gt;n&lt;/code&gt;&quot; in &lt;code&gt;/etc/postfix/master.cf&lt;/code&gt; and execute &lt;code&gt;echo &#039;SYNC_CHROOT=&quot;n&quot; &gt;&gt; /etc/default/postfix&#039;&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;check-selinux-installation&lt;/code&gt; to check for common SELinux problems on Debian (such as the above mentioned).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;touch /.autorelabel&lt;/code&gt;. Reboot. &lt;code&gt;touch /.autorelabel&lt;/code&gt; (again). Reboot (again).&lt;/li&gt;
&lt;li&gt;Done. You should now have a working SELinux system. If no critical audit errors appear and you feel comfortable with SELinux, enable enforcing mode via &lt;code&gt;setenforce 1&lt;/code&gt; or by adding &lt;code&gt;enforcing=1&lt;/code&gt; to the kernel command line in &lt;code&gt;/boot/grub/menu.lst&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Behaviour&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Never&lt;/strong&gt; leave your laptop unattended!&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Always&lt;/strong&gt; lock your terminal (using &lt;a href=&quot;http://packages.debian.org/unstable/utils/vlock&quot;&gt;vlock&lt;/a&gt;) when you move more than 30 cm away from the laptop!&lt;/li&gt;
&lt;li&gt;Don&#039;t run insecure and/or closed-source software (which you can never trust!). No NVIDIA/ATI drivers, no VMware, no Google Earth, no Flash Plugin (except for &lt;a href=&quot;http://www.gnu.org/software/gnash/&quot;&gt;Gnash&lt;/a&gt; maybe), no Adobe Acrobat. You get the idea.&lt;/li&gt;
&lt;li&gt;Keep the number of installed packages small and try to configure each of them as secure as possible.&lt;/li&gt;
&lt;li&gt;Never enable networking or WLAN or Bluetooth if you don&#039;t absolutely have to.&lt;/li&gt;
&lt;li&gt;Trust no one. Don&#039;t let other people use you laptop, don&#039;t give out shell accounts.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Further ideas&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;/boot&lt;/code&gt; partition is still unencrypted, so an attacker can tamper with it. Boot from a CD-R, forbid booting from hard drive (BIOS). Sign/mark the CD-R physically, so you&#039;ll know when someone replaced your CD-R with his own, back-doored one.&lt;/li&gt;
&lt;li&gt;Another idea is to use an additionaly USB thumb drive or CD-ROM or smartcard for &lt;a href=&quot;http://en.wikipedia.org/wiki/Two-factor_authentication&quot;&gt;two-factor authentication&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.hermann-uwe.de/blog/testing-stuff-with-qemu-part-1-selinux-support-in-debian-unstable&quot;&gt;Install another Debian into a QEMU image&lt;/a&gt;. Use it as a sandbox for stuff you don&#039;t trust: &lt;code&gt;qemu -snapshot -net none foo.img&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;At all costs, &lt;a href=&quot;http://www.ccc.de/congress/2004/fahrplan/event/14.en.html&quot;&gt;disable Firewire&lt;/a&gt;! If possible via hardware or BIOS, or at least don&#039;t load the drivers and/or &lt;a href=&quot;http://md.hudora.de/presentations/firewire/2004-firewire-21c3.pdf&quot;&gt;fix them&lt;/a&gt; (page 19).&lt;/li&gt;
&lt;li&gt;Replace the proprietary, closed-source BIOS with &lt;a href=&quot;http://linuxbios.org&quot;&gt;LinuxBIOS&lt;/a&gt;, if possible.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That&#039;s it. You can take off that stupid tin-foil hat now.&lt;/p&gt;
&lt;p&gt;&lt;strong style=&quot;color: #ff0000&quot;&gt;Update 2006-09-29&lt;/strong&gt;: Fixed typos. Mentioned sxid. Added two-factor authentication.&lt;/p&gt;
</description>
 <comments>http://www.hermann-uwe.de/blog/towards-a-moderately-paranoid-debian-laptop-setup--part-1-base-system#comments</comments>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1026">bios</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1588">cryptsetup</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/49">debian</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1298">dm-crypt</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/95">encryption</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1028">grub</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/437">paranoia</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/94">passwords</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/38">security</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1454">selinux</category>
 <pubDate>Wed, 27 Sep 2006 17:14:12 +0200</pubDate>
 <dc:creator>Uwe Hermann</dc:creator>
 <guid isPermaLink="false">1118 at http://www.hermann-uwe.de</guid>
</item>
</channel>
</rss>
