Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Mike O’Leary

Rating No ratings yet

Whether you're a student stepping into the world of cybersecurity or a self-taught learner eager to build real-world skills, this book is your gateway to understanding and mastering Linux from both offensive and defensive perspectives. Designed for readers with a basic familiarity with Linux, it dives deep into the practical techniques that form the backbone of system security. Through more than 100 hands-on exercises, you'll explore how attackers exploit Linux systems―and how defenders can harden them. Learn to navigate Bash with precision, manage users and authentication, crack password hashes, and uncover hidden processes. You'll gain insight into Systemd’s role in service management and persistence, and develop the skills to configure powerful security frameworks like SELinux and AppArmor. This book doesn’t just teach theory―it builds capability. You’ll learn how Linux handles file permissions and access control, how software is installed and verified, and how to think like both an attacker and a defender. Each chapter is packed with actionable knowledge that prepares you for real-world scenarios and professional challenges. What You’ll Learn: • Create and manage users and authentication systems • Crack password hashes and understand PAM • Control processes and Systemd services • Configure file permissions, ACLs, SELinux, and AppArmor • Build a strong foundation in Linux security through practical exercises Who This Book Is For: Ideal for students in computer science, early-career professionals, and career changers aiming to break into cybersecurity. Whether used as a textbook or a self-study guide, this book equips readers with the hands-on experience needed to thrive in the field.

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A hands-on tour of Linux security that teaches you to think like both attacker and defender, using real commands and exercises to explain how users, permissions, processes, and mandatory access control actually work. Best for students, career-changers, and early-career professionals who already know basic Linux and want practical security skills. 【Book Arc】 - **Opening (~0%–10%)**: Orients you to the book's dual offensive/defensive approach and its exercise-driven format, then starts with Bash as the foundational tool both sides rely on. - **Early (~10%–30%)**: Builds command-line fluency—Bash arguments, builtins, variables, history, job control—and shows how attackers abuse configuration files and shell features for persistence. - **Middle (~30%–55%)**: Moves into identity and authentication: user/group management, password hashing and salting, cracking hashes with John the Ripper, and the PAM stack that governs login decisions. - **Late (~55%–85%)**: Covers processes and Systemd services, including how services are managed and how attackers use them for persistence, alongside file permissions, ACLs, and access control. - **Ending (~85%–100%)**: Introduces mandatory access control with SELinux and AppArmor—contexts, policies, booleans, logs—and closes with how software is installed and verified. 【Key Takeaways】 - **Bash is a security surface, not just a convenience** (Early): shell configuration files, history behavior, and prompt hooks can be used to maintain persistence or capture credentials, so defenders must audit them. - **Password security depends on hashing design** (Middle): salts prevent precomputed lookup tables, and deliberately slow algorithms make brute-force cracking costly—understanding this explains why /etc/shadow is structured as it is. - **Hash cracking is a practical skill, not a theoretical one** (Middle): combining /etc/passwd and /etc/shadow with tools like John the Ripper demonstrates why file permissions on shadow files matter. - **PAM is the gatekeeper for authentication** (Middle): its stacked rules and return codes determine whether a user can log in to a service, making misconfigurations a high-impact risk. - **User and group management has many moving parts** (Early–Middle): tools like useradd, adduser, groupadd, and chage interact with multiple databases, and small mistakes can lock out or expose accounts. - **Systemd services are a persistence mechanism** (Late): understanding how services are defined and started is essential for both hardening and incident response. - **Permissions go beyond the basic rwx bits** (Late): ACLs, extended attributes, SELinux contexts, and AppArmor profiles provide layered control that standard Unix permissions cannot. - **Software installation and verification is part of the security lifecycle** (Ending): knowing how packages are validated helps prevent supply-chain and tampering attacks. 【Reading Tips】 - **Do the exercises**: the book is built around hands-on practice, and the concepts stick only if you actually run the commands on a lab VM. - **Skim the Bash chapter if you're already comfortable** with shell basics, but slow down on history manipulation, PROMPT_COMMAND, and configuration-file persistence—those are the security-relevant parts. - **Treat the password-cracking chapter as a lab, not a lecture**: set up an isolated system, copy the sample files, and walk through unshadow and John the Ripper yourself. - **Use the SELinux/AppArmor material as a reference**: it is dense and distribution-specific, so plan to return to it when you actually configure a hardened system. - **Keep a notes file of commands and file paths** as you go; the book's value is in building a reusable toolkit, not in memorizing prose. 【Coverage Limits】 The excerpts cover the book's structure, Bash, users/groups, authentication, password cracking, PAM, and the beginning of SELinux/AppArmor, but do not include detailed content on process management, Systemd internals, or software verification. This guide reflects only what the excerpts show.
Excerpt 1
uide to System Processes, Permissions, and Protection — Mike O’Leary Table of ConTenTs 6.3.5. Advanced Permissions on Files and Directories ....................
View in text
Excerpt 2
ate the method. What limitations, if any, does it possess? 1-21. suppose an attacker has root access on an OpensUse system and wants to use a Bash configurat...
View in text
Excerpt 3
version 1 (SYSV), dynamically linked, interpreter /lib64/ ld-linux- x86-64.so.2, BuildID[sha1]=c6ec648712b8e61735d4b1a 3b03632704420aa3b, for GNU/Linux 3.2.0...
View in text
Excerpt 4
ed @5, character count 9 0:00:43:34 - Switching to length 7 0:00:43:34 - Expanding tables for length 7 to character count 6 0:00:43:34 - Trying length 7, fix...
View in text
Excerpt 5
l 2 20:45:27 2024 : zallan : HOST=mint ; TTY=/dev/pts/1 ; CWD=/home/zathras ; USER=root ; TSID=00/00/02 ; COMMAND=/usr/ bin/whoami Jul 2 20:46:00 2024 : zall...
View in text
Excerpt 6
acker. Choose a program that an attacker might want to run. Write a program that calls your selected program but with a different name. [hint: python setproc...
View in text
Excerpt 7
running. Check to see if it is enabled by default. disable the service, then mask the service. 5-29. take a test system, and identify its default systemd tar...
View in text
Excerpt 8
the system reported that the operation was not permitted, the error does not really explain why it was not permitted. Administrators unfamiliar with the immu...
View in text
Tags
AI categories
CybersecurityLinuxOS
ISBN: 8868826631
Publisher: Apress
Publish Year: 2026
Language: English
Pages: 485
File Format: PDF
File Size: 11.2 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…