Examine Log Files and Remove Traces of Your Presence

30 minutes
  • 7 Learning Objectives

About this Hands-on Lab

The goal of this lab is to find traces of your presence in the system logs and remove them.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Find your public IP address.
Become `root`.

Run the following command: sudo -i

Open the `/var/log/secure` log file.

Run the following command: vim /var/log/secure

Find all entries containing your IP address.

Run the following command: /<IP ADDRESS>

Remove all traces of your presence.
  1. Press i to edit the log file.
  2. Delete all entries containing your IP address.
Save the changes and close the log file.

Run :wq in vim.

Log out.

Run the following command: exit

Additional Resources

  1. Open your browser and find your IP address using your preferred search engine. Write it down.
  2. Next, go into the /var/log/secure folder and find the secure file. Open it with vim (if vim is not installed, you can install it by running yum install vim).
  3. Find all entries containing your IP address and delete them, then log out.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?