You are here: DesktopBSD Wiki Portal » doc » Security

Translations of this page?:

Table of Contents

Security

Setting up a Firewall

You should never connect to the internet without a firewall. But which firewall method is appropriate for you?

If you are connected to a standard Small Office/Home Office (SOHO) router, such as a Linksys WRT54, we recommend you enable and configure the firewall on that. A border firewall that does Stateful Packet Inspection (SPI) and Network Address Translation (NAT) should provide a satisfactory level of protection from inbound attacks for most people. Please refer to your router's manual for more information on how to configure this.

Alternatively, if you require a higher level of security, have advanced gateway needs, or if you have a number of computers on an internal network to protect, we recommend you investigate the excellent BSD based firewall appliances m0n0wall and pfsense.

If however you have a standalone desktop/laptop that connects directly to the internet, do not despair. DesktopBSD includes the OpenBSD packet filter (PF) by default, and so by nature is ready to be a secure desktop operating system with only a small amount of configuration. We recommend at this stage that you read Dru Lavigne's excellent firewall howto. If you'd prefer to use FreeBSD's IPFW capability, you can also check out QTFW.

Antivirus

While it is true that the majority of viruses are targetted for Windows, that does not mean that a user of any other system, be it Linux, BSD, Mac OSX or otherwise should rest on their laurels. Security Through Obscurity can only go so far.

With this in mind, if you'd like Antivirus capability on your DesktopBSD system, we recommend that you install ClamAV and ClamTK from PORTS using the Package Manager.

You can also browse through PORTS/Security to see if you can find alternative Antivirus tools that you'd prefer to use, such as F-Prot.

Secure passwords and you

This section is not intended to be a thorough article on password security, it is intended to introduce the reader to some basic secure password concepts. These methods do not guarantee 100% password security, but will typically provide better than average security

Authentication Security fundamentals

Before we discuss secure passwords, let's first discuss one of the core theories of authentication security.

The best authentication security is three tier:

  • Something you are
    • e.g a username or biometrics (fingerprint, retina etc)
  • Something you know
    • e.g a password or PIN
  • Something you have
    • e.g a security card/token or biometrics (yes, again)

So with a combination of the above three, without any overlap - you wouldn't combine biometrics with more biometrics for example - you can attain a higher level of authentication security. And like a three legged stool - one leg is useless without the rest.

How to generate secure passwords

There are a number of different methods to generate secure passwords by yourself. If you simply want some generated for you, you can use an online tool like mytsoftware.com's PassGen, or Passkool.

Password requirements

There are two schools of thought around password requirements and restrictions

  1. That there be strict password requirements e.g character limits, non-alpha numeric characters and that the passwords be changed regularly i.e short password lifetimes
  2. That the users either generate or are issued one secure password with a long password lifetime that they use until such time as they want or need to change their password

This topic is highly debateable and outside the scope of this handbook, however, the UNIX password mentality tends away from short password lifetimes, arguing that regular password changes result in degradation of password security e.g Users will tend to iterate: password1, password2, password3

Instead UNIX tends towards setting one good solid password once with a long password lifetime. But the decision is up to you, if you want to use one method or the other, that's your choice! On any UNIX or UNIX-like system though, you should exercise extreme care with the password on your root account.

Some facts though:

Entropy, roughly speaking, is the degree of randomisation of the characters in a password, and thus is a metric for password security levels. Using the password checkers below, you can try to reach an entropy level that is secure while leaving the password easy to remember.

Passphrases

  • These examples are not “pure” passphrases, and are simply designed to generate an easily remembered password. For more on proper passphrasing, read here, and check out Diceware
  • Try not to use common phrases. Instead think of your own nonsensical ones such as “CocaCola Is Fizzy” or “Old Smelly Shoe”

One of the easiest ways to generate a password is to think of a phrase and use that to generate a password. As the phrase itself is easily remembered, you'll be able to easily input a secure password.

By applying two simple rules: Case switching and swapping vowels and consonants for numerical characters, we've created a relatively secure password. To take it one step further, simply add a non alphanumeric character or two.

You should only turn a phrase into an acronym when using a phrase of eight or more words - eight words with entropy plus a couple of non-alphanumeric characters will yield a generally secure 10-character password. If you are using a smaller phrase, simply truncate the string of words and then apply entropy e.g Felix The Cat = _F3l1xTh3c4t! In fact, it's better this way as you get longer passwords, which increases the entropy level.

All you have to remember is your phrase, in this example “The Rain In Spain Falls Mainly On The Plain,” and the password itself will just fall into place at your fingertips. Try it!

Obviously, you're not going to use a passphrase as long as the nine word example phrase! Try to find a comfortable balance using four to five words maximum.

Mixed Words

Another method that is similar to passphrases is the Mixed Words method. Simply take two words and mash them together, swapping in the letters like a zipper.

This example password attains mixed results in password strength tests, but that's because it's quite short. Mix together two long words however and you'll increase the security.

Mixing does not have to be based around two words - you could, for example, mix a keyword and a fact based against it. As an example: Birthday + 30/03/1962 (dd/mm/yyyy format) would result in $B3i0R0t3H1d9a6y2+

Obfuscation and The Post-It Note Dilemma

When you first create or receive a secure password, it might be initially quite difficult to remember. Conventional wisdom holds that you should never, ever, write down a password, especially not on a Post-It Note. However, if you take into account the above three-tier security methodology, it's not hard to secure a password that you've written down. Here's how:

  1. Take your secure password, we'll use _Tr15fM0tP! in this example
  2. Select a method of obfuscation and mix the two together. As an example, we'll mix in a sequential series of numbers
    • _Tr15fM0tP! + 1234567890 becomes _1T2r31455f6M708t9P0!
  3. Write down the obfuscated password e.g _1T2r31455f6M708t9P0!

That's it! Your password has been obfuscated. Anyone passing by your desk will find the password as useless as the used Post-It note it's written on. As they have neither your username or your obfuscation algorithm/method, they lack the Something You Are and Something You Know. Basically, you're adding a layer of Something You Know to Something You Should Know

For even more obfuscation security - put the Post-It note in your wallet or purse. This action turns the Post-It note into both Something You Know and Something You Have. When you get to your workstation, try to input your password, and if you fail simply look into your wallet/purse, decipher the obfuscation and input your password. It will typically take a couple of days for you to memorise your secure password, and then you can choose to either keep the Post-It note or throw it away.

There are other methods of obfuscation, it's simply up to you to remember the algorithm. You could, for example, simply reverse the order of the characters you write down. Reversing _Tr15fM0tP! becomes !Pt0Mf51rT_. You could, if you wanted, go completely overboard and both mix in sequential numbers AND reverse the order!

Using your secure password elsewhere

Once you've got a secure password, you might be tempted to use it elsewhere e.g when you sign up for an online service, webmail etc. You should try to avoid this behaviour and instead try creating 3-4 secure passwords, obfuscating them and using the wallet/purse trick (try the back of a business card as a place to write them), and then grouping scenarios per password. As an example

Testing Password Security

A number of tools exist online that will measure the security of your passwords against a predefined set of requirements and algorithms. You can use these to test your password strength, but remember that they all test differently and will reflect different results somewhere around the line of reality.

For most normal desktop usage, a secure password probably falls in the 50-60 entropy bits range.

User Administration

Phew, after that last bit I need a rest. This part needs screenshots.

Protecting your data

Someone needs to write a howto for encrypting files, possibly based around gnupg and the kgpg ui (which comes with DBSD: K > Utilities > PIM), as well as securely storing text using something like pwsafe or FPM (figaro's password manager)