Everyday Guidebooks
Cover of Linux Basics for Security Testers

Cybersecurity & IT

Linux Basics for Security Testers

A Lab-Based Guide to Command Output, File Hashes, Timestamps, and Evidence Documentation

by Todd Michael

Available now

If your search for linux basics for hackers has led you to tools and techniques before you feel comfortable at the command line, start here. This practical guide teaches foundational Linux skills through a controlled local lab built around sample files—not live targets.

Learn how to navigate the filesystem, inspect files, capture command output, calculate and verify hashes, and understand which actions can affect file timestamps. Step-by-step exercises show you how to work from protected originals, record what you did, and check that your evidence remains unchanged. You will also build a concise lab report that another person can follow and reproduce.

Written for beginning security testers and IT certification candidates, this book connects everyday Linux commands to careful evidence handling. No previous Linux experience is assumed; you will need a computer capable of running a Linux virtual machine and permission to install the necessary software.

Contents
  1. 1. The Evidence-Conscious Linux Lab
  2. 2. Build and Isolate Your Testing Environment
  3. 3. Meet the Shell and Navigate Safely
  4. 4. Create a Sample Evidence Set
  5. 5. Permissions, Ownership, and Protected Originals
  6. 6. Inspect Files Without Editing Their Contents
  7. 7. Capture Command Output Reliably
  8. 8. Hash Files and Verify Integrity
  9. 9. Understand and Preserve Timestamps
  10. 10. Search and Filter Sample Data
  11. 11. Compare Files and Track Changes
  12. 12. Keep a Reproducible Action Log
  13. 13. Troubleshoot and Recover the Lab
  14. 14. Complete the Evidence-Handling Capstone
  15. Other Books by Todd Michael

Read a sample: 1. The Evidence-Conscious Linux Lab

A security tester often begins with a simple question: “What is in this file?” A careful tester asks a second question at the same time: “How can I examine it without losing track of what I did?”

That second question is the foundation of this book. A command may display a file, copy it, change its name, or write results somewhere unexpected. Even an examination that does not change file contents can affect metadata, depending on the system and how it is configured. None of this makes Linux unsuitable for evidence handling. It means that useful results depend on deliberate choices and a record of those choices.

You do not need prior forensic experience to start. You do need a willingness to slow down, keep the original sample separate from your experiments, and write down observations before turning them into conclusions. The exercises in this book build those habits with files you create for yourself in a controlled local lab.

By the end of this chapter, you will have a plan for that lab, a sample case to guide the exercises, and a practical set of rules for documenting your work. You will not yet need to install a virtual machine or create the sample files. Those tasks come later, after the boundaries are clear.

For this book, a controlled lab is an environment you set up for an authorized exercise using sample material you are permitted to examine. You know where the material came from, what system you intend to use, and what activities are in scope. When something goes wrong, you can stop, document the problem, and rebuild or restore the environment without concealing the mistake.

A controlled lab is not defined by a particular Linux distribution or a special collection of security tools. It is defined by its boundaries. Our boundaries are intentionally narrow:

- Work with locally created sample files, not files taken from an employer, customer, classmate, or unfamiliar device. - Perform the exercises in a Linux virtual machine prepared for the lab. - Keep the sample originals separate from writable working copies and output. - Do not scan, probe, or connect to external systems as part of the case exercises. - Record actions and unexpected results so that another person could understand what happened.

A virtual machine is a computer environment implemented in software and run on a host computer. It gives you a convenient place to practice and, when properly configured, helps separate lab activity from your everyday environment. It is not an automatic guarantee of isolation. Network settings, shared folders, clipboard integration, and other features can create connections between the guest and the host or outside systems. In Chapter 2, you will inspect those settings and use local-only networking where practical.

The case material in this book is deliberately ordinary. You will create text files and a small binary sample rather than download an unknown program or examine a real incident. This keeps the exercises focused on foundational skills: navigating, observing, capturing output, comparing files, and explaining what the results support.

Imagine that you have been asked to review a small set of files associated with a fictional project handoff. The requester wants to know what the files contain, whether the samples remain unchanged during the review, and whether their recorded times tell a consistent story.

For our lab, you are both the creator of the sample set and the examiner. That arrangement is useful for learning, but it also needs to be stated plainly. Your knowledge of what you intended to create is not the same as an independent observation of what is present later. The written creation record will let you compare those two things.

The sample set will contain three files:

- handoff-note.txt, a short plain-text note about the fictional handoff. - activity-log.txt, a small text log containing entries you can search and compare. - sample-data.bin, a binary file created locally for file-identification and comparison practice.

Chapter 4 will give you reproducible steps for creating them. For now, treat these names as the planned contents of the case, not as files that already exist on your computer.

The case is guided by four questions:

1. What files are present, and what can their names, contents, and basic properties tell us? 2. Can we show that the contents of the original samples match a recorded baseline at later checkpoints? 3. What timestamps are visible, and what limitations affect their interpretation? 4. Can another reader follow the action record and understand how we reached our observations?

These questions sound straightforward, but each contains a useful distinction. A filename is a label, not proof of a file’s contents. A matching hash can support a conclusion about content integrity, but it does not by itself establish who created a file or when. A timestamp is a recorded value, not a complete history. An action log can make work understandable, but only if it records enough detail and does not quietly omit mistakes.

The goal is not to solve a fictional mystery by guessing a dramatic explanation. The goal is to make modest, supportable statements about a known sample set and the way you handled it.

The most important separation in the lab is between an original sample and a working copy.

An original sample, as used here, is the version you designate as the reference for the exercise. Because you will create the…

More Cybersecurity & IT

Cover of The White Hat Bible, Volume 1The White Hat Bible, Volume 1Available nowCover of The White Hat Bible, Volume 2The White Hat Bible, Volume 2Available nowCover of The White Hat Bible, Volume 3The White Hat Bible, Volume 3Available nowCover of The White Hat Bible, Volume 4The White Hat Bible, Volume 4Available nowThe White Hat Bible, Volume 5Available nowCover of The White Hat Pocket GuideThe White Hat Pocket GuideAvailable now

About Todd Michael

Todd Michael is an American author and the founder of ToddMichael.tv. He writes practical, plain-English books on money, health, preparedness, technology, games, humor and more.

About the author Todd Michael · Todd Michael’s author site

Part of the ToddMichael.tv network.