7.1.1.6 Lab – Hardening a Linux System Answers

7.1.1.6 Lab – Hardening a Linux System Answers

Lab – Hardening a Linux System (Answers Version)

Answers Note: Red font color or gray highlights indicate text that appears in the Answers copy only.

Objectives

Demonstrate the use of a security auditing tool to harden a Linux system.

Background / Scenario

Auditing a system for potential misconfigurations or unprotected services is an important aspect of system hardening. Lynis is an open source security auditing tool with an automated set of scripts developed to test a Linux system.

Required Resources

  • PC with Ubuntu 16.04 Desktop LTS installed in a VirtualBox or VMware virtual machine.

Step 1: Open a terminal window in Ubuntu.

  1. Log in to Ubuntu using the following credentials:
    User: cisco
    Password: password
  2. Click the terminal icon to open a terminal window.

Step 2: The Lynis Tool

  1. At the command prompt, enter the following command to change to the lynis directory:
    [email protected]:~$ cd Downloads/lynis/
  2. At the command prompt, enter the following command and enter the password password when prompted:
    [email protected]:~/Dowloads/lynis$ sudo ./lynis update infoThis command verifies that this is the latest version and updates for the tool at the time of writing of this lab.

Step 3: Run the Tool

  1. Type the following command in terminal and press Enter:
    [email protected]:~/Downloads/lynis$ sudo ./lynis –auditor ciscoAs displayed above, the tool will begin auditing using the user cisco as the auditor.
    Notice: You will receive warnings.
  2. To continue with each stage of the audit press Enter. You will receive warnings as shown below.
  3. You will receive suggestions, as shown below.
  4. You will receive a notification for any configuration that is weak as shown below:
  5. You will receive detailed security enhancement suggestions as well as a final summary which provides the location where you can find the log file.

Step 4: Review Results

  1. Scroll up to the results section after the tool is finished running.
    How many Warnings did you receive?________________ Answers will vary. There was 1 warning in this example.
    How many Suggestions did you receive?______________ Answers will vary. There were 33 suggestions in this example.
  2. Scroll through the suggestions and select one. You will research a suggestion that you can implement to address the issue.
    Which suggestion are you addressing?________________________________________________________________________________________________________________________________________________________________________
    Answers will vary.
  3. What is your suggested solution?________________________________________________________________________________________________________________________________________________________________________
    Answers will vary.

References

Lynis: https://cisofy.com/lynis/