Chapter Topics#

The chapters progress from Linux foundations to Bash programming, reliable automation, and authorized cybersecurity workflows. Each chapter teaches its technical topics alongside a cybersecurity thread, so Chapters 19 and 20 combine practices students have already used rather than introducing security late. The tables describe the curriculum, including topics whose draft sections are still being developed. Preview, Lab, Homework, and Project activities accompany each chapter.

Technical Topics#

Chapter

Technical topics

1. The Terminal and the Shell

Unix History and Linux; Terminal Basics and Help; Kernels, Shells, and Processes; Filesystem Hierarchy.

2. Filesystem Management

Paths and Navigation; Managing Files; File Attributes & Links; Hidden Files and Configuration; Finding and Organizing Files.

3. Access Control

Users and groups; Privilege boundaries; Ownership and permission changes; Default permissions; Special permission bits and audits.

4. Files, Streams, and Pipes

Files and streams; Text inspection; Literal grep matching; Pipes and redirection; Simple log summaries.

5. Command Syntax and Quoting

Command arguments; Quoting and escaping; Word splitting and globbing; First-script execution; Local revision history.

6. Variables, Expansion, and Arrays

Variables & Expansion; Parameter Substitution; Arithmetic and String Operations; Arrays; Environment Variables and PATH.

7. Operators and Tests

Arithmetic Operators; Comparisons and Logic; Testing Strings, Files, and Permissions; Exit Status and Preflight Checks.

8. Control Flow and Script Interfaces

if/elif/else and case Statements; Loops: for, while, and until; Loop Control: break and continue; Script Arguments and Options.

9. Functions and Modular Scripts

Defining Functions; Local vs Global; Function Output and Status; Function Libraries.

10. Streams and Redirection

Standard streams and descriptors; Redirection order; Pipeline status; Subshell boundaries; Process substitution.

11. Text Processing, Regular Expressions, and JSON

Regular Expressions with grep; Transforming Records; Editing Text Streams with sed; Fields and Summaries with awk; JSON with jq.

12. Logs, Reports, and Evidence Files

Structured logs; Timestamps and report records; Here-documents and printf; Evidence hashes; Collection records.

13. Error Handling and Defensive Scripting

Exit Codes and Propagation; Shell Options, Traps, and Cleanup; Debugging and ShellCheck; Defensive Scripting Practices; Failure and Recovery Testing.

14. Processes and System Monitoring

Processes and Signals; Job Control; Memory and Disk Monitoring; Process Baselines.

15. Services, Packages, and systemd

Package Management; Services and systemctl; journalctl and Service Logs; Unit Files and Service Privileges.

16. Scheduling and Job Automation

cron and at; systemd timers; Unattended environments; Overlap protection and logs; Safe batches and bounded concurrency.

17. Networking and Remote Access

Network Foundations; Diagnosing Connections; SSH Authentication and Remote Execution; Secure File Transfer: SCP and Rsync; Automated Network Checks.

18. Backups, Archives, and Recovery

Archive creation and inspection; Backup scope and retention; Offsite copies; Restore testing; Recovery verification.

19. Secure Configuration and Audit Automation

Permission and Ownership Audits; Account and SSH Checks; Secrets and Integrity Checks; Repeatable Audit Reports.

20. Triage and Incident Response Scripts

Host Triage; Log Review and Correlation; Indicators and Inventory; Incident Reports.

Cybersecurity Topics#

Each row lists a chapter’s cybersecurity concepts in the order its sections teach them. The concept names follow the established sources listed in Concept Sources, so they match the terms used in security work. Four of those sources are catalogs with an ID for every entry, and each lesson’s Security connection box shows the ID, linked to the entry: a weakness shows its CWE ID, an attacker technique its ATT&CK ID, and a defender practice its SP 800-53 control and, where one matches the practice, its CIS Controls safeguard. Follow the link to read the full description and see how security professionals classify the same idea.

Chapter

Cybersecurity concepts

Cybersecurity topics

1. The Terminal and the Shell

Host authentication; Least privilege; Untrusted search path; Complete mediation; Process lineage; Confidentiality; Secrets in process arguments

Authorization and ethics; lab boundaries on your own VM; confirming host identity before you act.

2. Filesystem Management

Path traversal; Evidence preservation; Symbolic-link attack; Timestamp tampering; Open design; Startup-file persistence; Hidden artifacts; Failing open

Hidden files and sensitive paths; safe deletion; evidence-preserving copies before changes.

3. Access Control

Least privilege; Accountability; Account and privilege review; Defense in depth; Incorrect permissions; Privilege escalation; Insecure temporary file

Least privilege and sudo; risky ownership and world-writable paths; SUID/SGID and sticky-bit audits.

4. Files, Streams, and Pipes

Terminal escape injection; File type spoofing; Failing open; Indicators of compromise; Evidence preservation; Least privilege; Unchecked exit status

Read-only inspection before modification; filtering logs with streams and literal matches.

5. Command Syntax and Quoting

Argument injection; Secrets in logs and traces; Open design; Untrusted search path

Unquoted expansions as injection and data-loss risks; option injection through filenames.

6. Variables, Expansion, and Arrays

Argument injection; Unset or empty variable; Fail-safe defaults; Command injection; Path traversal; Untrusted search path; Secrets in process arguments; Startup-file persistence

Secrets in environment variables and shell history; command lookup and PATH hijacking.

7. Operators and Tests

Command injection; Incorrect comparison; Permissive pattern; Symbolic-link attack; Check-then-use race; Least privilege; Fail-safe defaults; Unchecked exit status

File and permission tests as preflight checks before deleting, changing, or trusting inputs.

8. Control Flow and Script Interfaces

Symbolic-link attack; Fail-safe defaults; Input validation; Log management; Unbounded loop; Untrusted code inclusion; Argument injection

Argument validation; safer, predictable interfaces for operational tools.

9. Functions and Modular Scripts

Untrusted code inclusion; Unchecked exit status; Numeric truncation; Untrusted search path

Reusable audit checks; functions with predictable status; growing the host audit toolkit.

10. Streams and Redirection

Unchecked exit status; Log management; Failing open; Integrity verification

Separating results from errors; preserving audit trails; not hiding failures in pipelines.

11. Text Processing, Regular Expressions, and JSON

Permissive pattern; Log management; Canonicalization; Input validation; Incomplete redaction; Code injection; Failing open

Failed SSH logins in auth.log; web log patterns; repeated indicators; JSON records with jq.

12. Logs, Reports, and Evidence Files

Log injection; Timeline analysis; Log management; Information exposure; Output injection; Integrity verification; Chain of custody; Integrity versus authenticity; Evidence preservation

Evidence hashes; chain-of-custody records; timestamps; clear report output.

13. Error Handling and Defensive Scripting

Unchecked exit status; Unset or empty variable; Incomplete cleanup; Security testing; Code injection; Untrusted search path; Insecure temporary file; Partial-write race; Symbolic-link attack

Avoiding partial changes, unsafe temporary files, swallowed failures, and false success reports.

14. Processes and System Monitoring

Check-then-use race; Least privilege; Order of volatility; Persistence; Resource exhaustion; Hidden artifacts; Process masquerading; Resource hijacking; Incorrect permissions

Suspicious processes; unexpected listeners; resource abuse; persistence clues; process baselines.

15. Services, Packages, and systemd

Software provenance; Patch management; Integrity verification; Attack surface; System information disclosure; Least privilege; Log access control; Log management; Timeline analysis; Service persistence; Change control

Suspicious or altered services; service persistence; service log review with journalctl.

16. Scheduling and Job Automation

Scheduled-task persistence; Change control; Trusting caller-supplied identity; Insecure temporary file; Persistence; Command injection; Argument injection; Resource exhaustion

Cron and timers as both legitimate automation and attacker persistence; locked, logged jobs.

17. Networking and Remote Access

Attack surface; Reconnaissance; External control of configuration; Host authentication; SSH key management; Least privilege; Integrity verification; Encryption in transit; Argument injection; Log management; Authorized scope

SSH key authentication and hardening; listening sockets; connection checks; safer remote access.

18. Backups, Archives, and Recovery

Incorrect permissions; Integrity verification; Path traversal; Ransomware resilience; Backup and restore testing; Incomplete cleanup

Recovery after mistakes or incidents; integrity verification; offsite copies; restore testing.

19. Secure Configuration and Audit Automation

Configuration baseline; Failing open; Incorrect permissions; Effective configuration; Account and privilege review; Authentication hardening; Secrets in logs and traces; Integrity verification; Output injection; Change control

Permission, account, SSH, secret, and integrity audits combined into repeatable reports.

20. Triage and Incident Response Scripts

Order of volatility; Chain of custody; Password guessing; Timeline analysis; Indicators of compromise; False positives; Evidence preservation; Eradication and recovery

Authorized triage; log correlation; indicators and inventory; incident reports from the audit toolkit.

NIST CSF 2.0 Categories#

The NIST Cybersecurity Framework (CSF) 2.0 (National Institute of Standards and Technology, 2024) sorts security outcomes into six functions, Govern (GV), Identify (ID), Protect (PR), Detect (DE), Respond (RS), and Recover (RC), each divided into categories. The table names the categories whose outcomes each chapter’s work on your VPS contributes to. A chapter practices part of a category on one system; the CSF describes what an organization achieves across all of its systems. No chapter is mapped to Govern, which covers an organization’s strategy, policy, roles, and oversight; this course meets it only in the authorization rules of Chapter 1.

Chapter

CSF 2.0 categories

1. The Terminal and the Shell

PR.AA Identity Management, Authentication, and Access Control

2. Filesystem Management

PR.DS Data Security

3. Access Control

PR.AA Identity Management, Authentication, and Access Control

4. Files, Streams, and Pipes

DE.AE Adverse Event Analysis

5. Command Syntax and Quoting

PR.PS Platform Security

6. Variables, Expansion, and Arrays

PR.PS Platform Security

7. Operators and Tests

PR.PS Platform Security

8. Control Flow and Script Interfaces

PR.PS Platform Security

9. Functions and Modular Scripts

PR.PS Platform Security

10. Streams and Redirection

PR.PS Platform Security

11. Text Processing, Regular Expressions, and JSON

DE.AE Adverse Event Analysis

12. Logs, Reports, and Evidence Files

RS.AN Incident Analysis

13. Error Handling and Defensive Scripting

PR.PS Platform Security

14. Processes and System Monitoring

DE.CM Continuous Monitoring

15. Services, Packages, and systemd

ID.AM Asset Management; PR.PS Platform Security

16. Scheduling and Job Automation

DE.CM Continuous Monitoring; PR.PS Platform Security

17. Networking and Remote Access

PR.AA Identity Management, Authentication, and Access Control; PR.DS Data Security; PR.IR Technology Infrastructure Resilience

18. Backups, Archives, and Recovery

PR.DS Data Security; RC.RP Incident Recovery Plan Execution

19. Secure Configuration and Audit Automation

PR.PS Platform Security; ID.RA Risk Assessment

20. Triage and Incident Response Scripts

RS.MA Incident Management; RS.AN Incident Analysis; RC.RP Incident Recovery Plan Execution

Concept Sources#

Source

What it supplies

Concepts in this book

Saltzer and Schroeder, The protection of information in computer systems (Saltzer & Schroeder, 1975)

Design principles for protection mechanisms

Complete mediation; Fail-safe defaults; Least privilege; Open design

NIST Computer Security Resource Center, Glossary (National Institute of Standards and Technology, n.d.)

Definitions of security terms

Accountability; Attack surface; Chain of custody; Confidentiality; Defense in depth; False positives; Host authentication; Indicators of compromise; Integrity versus authenticity

NIST, FIPS 199 (National Institute of Standards and Technology, 2004)

The security objectives: confidentiality, integrity, availability

Confidentiality

MITRE, Common Weakness Enumeration (CWE) (MITRE, 2026)

Weaknesses a script or system can contain; each box links its CWE ID

34 weakness concepts, from Argument injection to Untrusted search path

MITRE, ATT&CK for Enterprise, version 20.1 (MITRE, 2026)

Attacker tactics and techniques; each box links its ATT&CK ID

Hidden artifacts; Host authentication; Password guessing; Persistence; Privilege escalation; Process masquerading; Ransomware resilience; Reconnaissance; Resource hijacking; Scheduled-task persistence; Service persistence; Software provenance; Startup-file persistence; Timestamp tampering; Untrusted search path

NIST, SP 800-53 Rev. 5, Release 5.2.0 (Joint Task Force, 2020)

Security controls; each box links its control ID

Account and privilege review; Accountability; Attack surface; Authentication hardening; Backup and restore testing; Change control; Configuration baseline; Effective configuration; Encryption in transit; Integrity verification; Least privilege; Log access control; Log management; Patch management; SSH key management

NIST, The NIST Cybersecurity Framework (CSF) 2.0 (National Institute of Standards and Technology, 2024)

Security outcomes in six functions and their categories

None directly; see NIST CSF 2.0 Categories for each chapter’s categories

NIST, SP 800-61 Rev. 3 (Nelson et al., 2025)

Incident response

Eradication and recovery; Indicators of compromise; Timeline analysis

NIST, SP 800-86 (Kent et al., 2006)

Forensic techniques in incident response

Chain of custody; Evidence preservation; Timeline analysis

NIST, SP 800-92 (Kent & Souppaya, 2006)

Log management

Log management

NIST, SP 800-40 Rev. 4 (Souppaya & Scarfone, 2022)

Patch management

Patch management

NIST, SP 800-115 (Scarfone et al., 2008)

Security testing and its authorization

Authorized scope

NIST, SP 800-218 (Souppaya et al., 2022)

Secure software development

Security testing

NIST, IR 7966 (Ylonen et al., 2015)

SSH access management

SSH key management

NIST, IR 8374 Rev. 1 (Souppaya et al., 2026)

Ransomware risk management

Ransomware resilience

Brezinski and Killalea, RFC 3227 (Brezinski & Killalea, 2002)

Evidence collection and archiving

Evidence preservation; Order of volatility

Center for Internet Security, CIS Critical Security Controls, version 8.1 (Center for Internet Security, 2024)

Prioritized safeguards; a box links the safeguard that matches its practice, on CSF Tools, an independent reference site that shows each safeguard’s SP 800-53 mapping

Account and privilege review; Accountability; Attack surface; Backup and restore testing; Configuration baseline; Effective configuration; Encryption in transit; Least privilege; Log management

Center for Internet Security, CIS Ubuntu Linux 24.04 LTS Benchmark v2.0.0 (Center for Internet Security, n.d.)

Configuration hardening for Ubuntu

Authentication hardening; Configuration baseline

Complete VM onboarding in Appendix H: Tooling before VM-based assignments. Keep the book and terminal tiled side by side. Appendix C provides the detailed POSIX portability reference; Appendix G organizes the host audit toolkit capstone.