Secure Your Ubuntu
Total Page:16
File Type:pdf, Size:1020Kb
Security Secure your Ubuntu “The only security that a man can have in this world is a reserve of knowledge, experience and ability” Henry Ford ecurity is one of, if not the most de- Install minimum packages bated topic with people using comput- It is a good idea to remove packages that Sers. Losing data be it personal photos, you do not use regularly. Even after unin- bank statements or work related documents stalling some programs, their dependen- is every users worst nightmare. This article cies may still exist. Such dependencies is dedicated in enlightening and empower- should be removed using a program like ing you to enhance your experience on this the Computer Janitor available under Sys- wonderful operating system. Security I have tem –> Administration in Ubuntu. It will tried to give at least one example of the so- not only enhance your security but also lution wherever possible. improve performance. The Figure 1 shows the various dependencies that still existed Is Linux really a Secure even after removing the programs using a System? package manager. This is one of the biggest questions that a new Also, it is advised to install software only Linux user is confronted with after switching from trusted sources. This is because secu- over from another operating system. A lot of rity vulnerabilities are not induced only from comparisons can be raised between different malicious software installed on the system. operating systems explaining their loopholes. They might even exist in current supported However, there is no operating system in the packages residing within Ubuntu reposito- world that will be completely invulnerable to security issues, and there never will be. But unlike other systems, Ubuntu comes as close as possible to provide you with a protected platform for doing your work. Each process running on the Linux system has its own private memory pages and cannot ac- cess the memory pages being used by an- other process. The kernel maintains its own memory areas. For security purposes, no processes can access memory used by the kernel processes. Also, each individual user on the system has a private memory area used for handling any applications the user starts. This method of isolation prevents un- authorized entry of various malicious soft- ware into Ubuntu. Figure 1. Computer Janitor in Ubuntu www.linuxidentity.com 25 Security Figure 3. Provide your password for admin- istrative tasks Figure 2. Disable Unused Startup Services Figure 4. Example of APG in Terminal ries. A regularly updated list can be Administrative A similar case may arise while viewed at the Ubuntu Security No- Privileges trying to run a command in the ter- tices page available at http://www. There are certain applications that minal. Here you may be asked ei- ubuntu.com/usn require special privileges. When ther to provide a password directly It is a good practice to visit this you try to open such a program, a or use sudo at the beginning of the page before installing a new pro- pop up window similar to the one command. gram on Ubuntu to be informed shown in the Figure 3 may appear. If you’re unsure about the appli- about its security vulnerabilities. When some malware wants to gain cation, simply hit [Cancel] or press access to your computer, it requires the [Esc] key. Disable Unused this password. Services When confronted by such a Strong Passwords It is important to disable the services window think carefully before pro- This is a practice that should be that you do not plan to use for some viding the password. The details followed by a user whether you are time. These services can be found at menu will give you more informa- setting a password for your work the System –> Preferences –> Start- tion about the process that is trying email account or just a social net- up Applications menu. to gain access. working site. For example, you may turn off The window should launch only There are various elements the Remote Desktop service (see when you have asked a certain appli- that a password should contain Figure 2) if you do not wish to use cation to do something which requires for it to be called strong. A very it. These changes will not only en- administrative privileges. These ap- good method of creating a strong hance your security but also speed plications have the potential to cause password is by using an Automat- up your boot process. major changes in the system. ed Password Generator. The pack- Figure 5. Open Seahorse via menu Figure 6. Creating a PGP Key 26 Linux Identity Starter Security Figure 7. Your PGP Keys Figure 8. Choose Recipients age apg in the Ubuntu repositories These programs allow us to create firm a passphrase for the new PGP is a very useful tool to creating a variety of keys that can be used to key. This is the cipher/password passwords that are very difficult encrypt information. that is essential to lock and unlock to crack. information using this key. Be sure The Figure 4 shows an example Note: For this method to run to remember it or your data could of the apg command generating six we will need to install the be lost forever. strong passwords automatically. package seahorse-plugins which is You can view the created PGP Also these passwords are easy to not provided by default. Install this keys in the My Personal Keys Tab as remember when associated with package using the Synaptic Pack- shown in the Figure 7. their pronunciations as shown in age Manager or the following com- These keys only exist on your the parentheses beside them. mand in the Terminal: computer at the moment. You can synchronize these keys with remote Encrypting your files ↵ servers. To do this in Seahorse and folders $ sudo apt-get install seahorse-plugins choose Remote –> Sync and Pub- There may be times when you want lish Keys... from the menu. to keep your information hidden Creating a PGP Key from other people having access to Choose Passwords and Encryption Encrypting your information your computer. Or to ensure that im- Keys from the Applications –> Acces- Now go to the files and folders that portant information is not divulged sories menu as shown in theFigure 5. you wish to encrypt. Select the when an unauthorized person ob- The Passwords and Encryption files/folders, right-click and choose tains your data. At such times, just Keys window will come up. Choose Encrypt... from the menu. A Choose making your files/folders hidden or File –> New... or press [Ctrl] + [N]. Recipients window (see Figure 8) changing their permissions is not You will be confronted with the pop- will open where you are required to enough. Here, it is better to make up window. specify the key that you want to as- use of encryption. sociate with these set of files and Encryption simply means encod- Note: If you already have a folders. ing information in such a way that key, the same can be import- In case there are multiple files or it will be accessible only to the per- ed into Seahorse. To do this choose folders another window will pop up sons authorized to view it. There are File –> Import... and specify the lo- as shown in the Figure 9. many popular ways of encrypting cation of the key. It is a good prac- If you have selected the option files and folders in Ubuntu. As an tice to keep backup of keys on your of encrypting by packing together in example, I have explained encryp- computer remote servers. A key can a package, a compression package tion on a Ubuntu Desktop with PGP be exported using the File –> Ex- of the specific extension will be pro- keys using Seahorse. port... command. duced. Or else, you will see files with The package Seahorse is a the extension pgp which are the files front-end for the Gnu Privacy Guard Here choose PGP Key as shown in encrypted using this key. program that integrates into the the Figure 6 and click on continue. Gnome Desktop. This package is A simple setup will guide you Decrypting your information provided in the Ubuntu 10.04 Sys- through this creation process. You To open encrypted packages or pgp tem by default. For Kubuntu, you will be asked information like your files, simply double-click them. The can make use of the KGPG pack- full name and email address. You packages will open via your default age which is available by default. will also be asked to enter and con- compression application where you www.linuxidentity.com 27 Security will be asked the passphrase. In this aspect also requires a case of pgp files, you will be first mention in this article. asked to enter a new name to save Hackers and such other the file. Then you will be required to elements are constantly enter the key’s passphrase. The de- trying to illegally gain in- crypted file will then be created in formation from various the specified folder. computers be it from a Government institution or Security Updates your grandma’s laptop. The Figure 9. Pack Multiple Files / Folders Developers of Ubuntu OS often come risk multiplies even more if up with various security patches and you are using your Personal updates that can be easily integrat- Computer to view mails or ed into your existing system. Ubuntu download from unknown 10.04 is tagged as a Long-Term-Sup- sites over the Internet. port (LTS) release. For LTS releases, And there is only one so- Ubuntu provides security and patch lution to it: Be Smart.