Book Image

Mastering Linux Security and Hardening - Second Edition

By : Donald A. Tevault
Book Image

Mastering Linux Security and Hardening - Second Edition

By: Donald A. Tevault

Overview of this book

From creating networks and servers to automating the entire working environment, Linux has been extremely popular with system administrators for the last couple of decades. However, security has always been a major concern. With limited resources available in the Linux security domain, this book will be an invaluable guide in helping you get your Linux systems properly secured. Complete with in-depth explanations of essential concepts, practical examples, and self-assessment questions, this book begins by helping you set up a practice lab environment and takes you through the core functionalities of securing Linux. You'll practice various Linux hardening techniques and advance to setting up a locked-down Linux server. As you progress, you will also learn how to create user accounts with appropriate privilege levels, protect sensitive data by setting permissions and encryption, and configure a firewall. The book will help you set up mandatory access control, system auditing, security profiles, and kernel hardening, and finally cover best practices and troubleshooting techniques to secure your Linux environment efficiently. By the end of this Linux security book, you will be able to confidently set up a Linux server that will be much harder for malicious actors to compromise.
Table of Contents (20 chapters)
1
Section 1: Setting up a Secure Linux System
8
Section 2: Mastering File and Directory Access Control (DAC)
11
Section 3: Advanced System Hardening Techniques

Running Linux in a Virtual Environment

So, you may be asking yourself: Why do I need to study Linux security? Isn't Linux already secure? After all, it's not Windows. But the fact is, there are many reasons.

It's true that Linux has certain advantages over Windows when it comes to security. These include the following:

  • Unlike Windows, Linux was designed from the ground up as a multiuser operating system. So, user security tends to be a bit better on a Linux system.
  • Linux offers a better separation between administrative users and unprivileged users. This makes it a bit harder for intruders, and it also makes it a bit harder for a user to accidentally infect a Linux machine with something nasty.
  • Linux is much more resistant to viruses and malware infections than Windows is. Certain Linux distributions come with built-in mechanisms, such as SELinux in Red Hat and CentOS, and AppArmor in Ubuntu, that prevent intruders from taking control of a system.
  • Linux is a free and open source software. This allows anyone who has the skill to audit Linux code to hunt for bugs or backdoors.

But even with those advantages, Linux is just like everything else that's been created by mankind. That is, it isn't perfect.

Here are the topics that we'll cover in this chapter:

  • Looking at the threat landscape
  • Why every Linux administrator needs to learn about Linux security
  • A bit about the threat landscape, with some examples of how attackers have, at times, been able to breach Linux systems
  • Resources for keeping up with IT security news
  • Differences between physical, virtual, and cloud setups
  • Setting up Ubuntu Server and CentOS virtual machines with VirtualBox, and installing the Extra Packages for Enterprise Linux (EPEL) repository in the CentOS virtual machine
  • Creating virtual machine snapshots
  • Installing Cygwin on a Windows host so that Windows users can connect to a virtual machine from their Windows hosts
  • Using the Windows 10 Bash shell to access Linux systems
  • How to keep your Linux systems updated