Workshop: Linux and Security Basics Hands On | Bill Stearns | 4 Hours
Analysts investigate attack surfaces and defenses concerning Workshop: Linux and Security Basics Hands On | Bill Stearns | 4 Hours.
Summary
### Overview This hands-on workshop, presented by Bill Stearns alongside contributors from Black Hills Information Security and Active Countermeasures, provides an introductory yet practical guide to navigating, managing, and securing Linux systems via the command line. Designed as a safe learning environment, the session walks participants through foundational administration tasks, remote access setup, essential shell commands, system inspection, file navigation, and secure remote operations using SSH.
### Key Topics - **Initial System Setup and Package Management:** Connecting to Linux instances (cloud VMs such as DigitalOcean, local VMs, or physical hosts), immediately resetting root passwords to prevent brute-force attacks, testing network/DNS reachability, using `apt update` and `apt full-upgrade`, and managing administrative rights via `sudo`. - **Command Line Essentials & Process Management:** Viewing running processes using tree/forest views (`ps axf`), managing long outputs using the `less` pager, filtering strings with `grep`, capturing errors/stdout redirection (`2>&1`), and editing configuration files with `nano`. - **System Hardware & Storage Inspection:** Querying hardware characteristics with `lshw`, reviewing block storage devices and partitions using `lsblk`, checking mounted file systems with `df -h` and `mount`, and distinguishing between physical filesystems (ext4) and virtual/kernel pseudo-filesystems (`/proc`, `/sys`, `tmpfs`). - **Network Configuration & Monitoring:** Evaluating network interfaces with `ifconfig` and modern `ip addr` commands, inspecting routes via `route -n` and `ip route`, determining public IP addresses using simple HTTP queries via `netcat`, and tracking live performance metrics with tools like `top`, `atop`, and `gkrrelm`. - **Filesystem Navigation & Remote Operations:** Navigating paths, utilizing the File System Hierarchy Standard (FHS), leveraging text-based file managers like Midnight Commander (`mc`), transferring files securely over the network with `scp`, and configuring passwordless authentication with SSH keys.
### Technical Details - **User & Privilege Configuration:** Stearns emphasizes avoiding daily administrative operations as the root user. Instead, administrators should create non-root user accounts (e.g., via `useradd -m -G sudo labuser` or `adduser`), manage passwords with `passwd`, and utilize `sudo` for elevated tasks. - **Process & Text Manipulation:** Running `ps axf | less -s` enables horizontal and vertical scrolling across process trees without wrapping. Stearns shows how chaining pipes—such as `sudo ps axf | grep nginx | grep -v grep`—isolates targeted daemon processes, while standard output and standard error redirection can be combined into files using `> file.txt 2>&1`. - **Network Discovery & Verification:** Verifying ICMP and DNS connectivity is demonstrated via `ping -c 5 -n 8.8.8.8` and pinging hostnames. Stearns demonstrates raw socket HTTP interaction by echoing `GET /` into `nc icanhazip.com 80` to retrieve an outbound public IP address from NAT/virtual environments. - **Remote File Management & SSH Hardening:** File transfers across hosts are executed using `scp [source] [destination]`. For SSH access (`sshd` on port 22), Stearns explains troubleshooting connection handshakes with `ssh -v`, and replacing standard password-based authentication by generating RSA key pairs (`id_rsa` and `id_rsa.pub` at 3072 bits) inside permissions-restricted directories (`chmod 700 ~/.ssh`).
### Takeaways Command-line administration relies heavily on understanding core diagnostic tools, standard file locations, and secure administration habits. Stearns stresses avoiding root logins, inspecting system performance bottlenecks using granular tools like `atop`, moving data via encrypted SSH channels, and using accessible tools like `nano` and Midnight Commander to comfortably manage remote Linux infrastructure.
Related talks
Wild West Hackin' Fest·1 hr 16 min
Presenters detail vulnerability discovery and exploitation in Workshop: How to Triumph at Tech Support | Bill Stearns | WWHF 2023.
Black Hat·52 min
Analysts investigate attack surfaces and defenses concerning The Kali Linux Dojo Workshop #1: Rolling Your Own - Generating Custom Kali Linux 2.0 ISOs.
Wild West Hackin' Fest·1 hr 58 min
Bill Stearns · Jason · Keith · Aldo
Presenters detail vulnerability discovery and exploitation in How to Give Technical Talks w Bill Stearns (2-Hours).


