CSRP BDO
-
About
About Cyber School -
About BDO
-
The CSRP program Syllabus
-
Module 1The Cyber World and CIA Triad6 Topics
-
The OSI Model and Network Layers6 Topics
-
IP Addressing, Subnetting and Routing6 Topics
-
IP Addressing, Subnetting and Routing Textbook
-
IP Addressing, Subnetting and Routing Lesson Companion
-
IP Addressing, Subnetting and Routing Lab Guide
-
IP Addressing, Subnetting and Routing Terminology Bank
-
IP Addressing, Subnetting and Routing Question Bank
-
IP Addressing, Subnetting and Routing Lesson Guide
-
IP Addressing, Subnetting and Routing Textbook
-
DNS and DHCP6 Topics
-
Windows Server Administration6 Topics
-
Active Directory and Identity Management6 Topics
-
Active Directory and Identity Management Textbook
-
Active Directory and Identity Management Lesson Companion
-
Active Directory and Identity Management Lab Guide
-
Active Directory and Identity Management Terminology Bank
-
Active Directory and Identity Management Question Bank
-
Active Directory and Identity Management Lesson Guide
-
Active Directory and Identity Management Textbook
-
Linux CLI Fundamentals6 Topics
-
Linux Permissions and Hardening6 Topics
-
Module 2 - Defense Technologies and Cyber ToolsFirewall Architecture and Rule Design5 Topics
-
NAT and Secure Traffic Mapping6 Topics
-
Enterprise VPN Solutions6 Topics
-
IDS and IPS5 Topics
-
Identity and Access Management5 Topics
-
Multi-Factor Authentication6 Topics
-
Data Loss Prevention6 Topics
-
Endpoint Security and EDR6 Topics
-
Mail Security6 Topics
-
Web Proxy and URL Filtering6 Topics
-
Regulation and Compliance6 Topics
-
Cloud Security6 Topics|1 Quiz
-
Module 3 - Ai in securityAI in Security5 Topics
-
ML Anomaly Detection5 Topics
-
AI Threats5 Topics
-
LLM Defense6 Topics
-
Module 4 - Offensive Cyber & Vulnerability ScanningCyber Kill Chain and Attacker Mindset6 Topics
-
OSINT and Public Intelligence Gathering6 Topics
-
Network and Port Scanning with Nmap6 Topics
-
Vulnerability Scanning6 Topics
-
Exploitation Fundamentals6 Topics
-
Web Application Security5 Topics
-
Social Engineering5 Topics
-
Password and Hash Cracking5 Topics
-
Module 5 - SOC and Advance Cyber AnalystSOC Structure and Operations6 Topics
-
SIEM Fundamentals with Splunk6 Topics
-
Alerting and Dashboards6 Topics
-
Incident Response5 Topics
-
Basic Digital Forensics
-
Capstone A - The Attack: Breaching Meridian
-
Capstone B - The Defense: Defending Meridian
-
ISC2 CC Mock Exam and CSRP Graduation2 Quizzes
CSRP — Cyber Security Responder & Practitioner
Lesson 7: Linux CLI Fundamentals
Textbook
Cyber School · BDO Ziv Haft
CSRP TEXTBOOK (v2.1)
L7 — Linux CLI Fundamentals
v2.1 — adds Chapter 4 (Processes + Network); restructures Chapter 5 (composition patterns); Challenge is multi-step “Linux CLI Master.”
Markers: ▶ TIP · ✎ TRY · ◆ KEY TERM · ✶ REAL-WORLD · ⚑ WATCH OUT.
Objectives
By the end you can: connect via SSH and navigate the Linux filesystem; read/write files via CLI; compose commands with pipes, grep, find; inspect processes and listening network ports; complete a multi-step CLI investigation.
Chapter 1 — Why the CLI
(Identical to v2 textbook §1. Six reasons CLI > GUI; anatomy of a command; the case for the field.)
Chapter 2 — Filesystem Navigation
(Identical to v2 textbook §2. FHS hierarchy; pwd / ls / cd / paths; case-sensitivity warning.)
Chapter 3 — Read/Write + Pipes + Search
(Combines v2 §3, §4, §5 since pipes + grep + find are tightly linked.)
3.1 Reading files
cat / less / head / tail (-f).
3.2 Writing files
touch / nano / echo > / echo >> / cp / mv / rm (no undo) / mkdir.
3.3 Pipes and redirection
| chains commands. > >> < 2>/dev/null. The Unix philosophy: small tools, text streams, complex behavior from simple parts.
3.4 grep
Flags: -r -i -v -n -l -E.
3.5 find
Conditions: -name -size -mtime -user -perm -type -exec.
✎ TRY IT In Lab 7.2, build the pipeline grep “Failed password” /var/log/auth.log | awk ‘{print $1, $2, $3}’ > ~/failed_logins.txt. That single line replaces an hour of GUI clicks.
Ch.3 in one line: pipes + redirection + grep + find are the CLI composability layer; mastery here makes every later module faster.
Chapter 4 — Processes and Network (NEW IN v2.1)
The other half of “first day on a Linux box.”
4.1 Inspecting processes
◆ KEY TERM — ps Reports running processes. ps alone shows only the current shell’s processes. ps aux shows every process on the system, with USER, PID, %CPU, %MEM, VSZ, RSS, TTY, STAT, START, TIME, COMMAND columns.
◆ KEY TERM — top Live, refreshing process view. Sorted by CPU usage by default. Press q to exit, M to sort by memory, P to sort by CPU, k to kill (followed by PID prompt).
◆ KEY TERM — htop A friendlier top with color, mouse support, and tree mode. Often installed by default on modern distros.
Typical patterns: – ps aux | grep ssh — show every sshd process. – ps aux | grep python — show every python process. – ps -p <PID> — show details for one PID. – ps aux –sort=-%cpu | head — top 10 by CPU.
4.2 Inspecting the network
◆ KEY TERM — ss “Socket statistics.” Modern replacement for netstat. Common flags: -t TCP, -u UDP, -l listening only, -n numeric (no DNS resolution), -p show process (requires root for full info), -a all (including non-listening).
Typical patterns: – ss -tuln — listening TCP and UDP sockets, numeric. – ss -tulnp (as root) — same plus PID/process name. – ss -tan — all TCP, numeric, established + listening.
◆ KEY TERM — ip Modern network configuration tool. Replaces ifconfig and route. ip a shows addresses; ip route shows the routing table; ip link shows interfaces.
◆ KEY TERM — ping L3 reachability test. Sends ICMP echo requests. ping -c 4 <target> sends exactly 4 and exits.
◆ KEY TERM — curl A versatile HTTP/HTTPS/FTP client. curl http://host gets the page; curl -I http://host gets just headers; curl -v shows verbose connection details.
4.3 Starting a quick test service
A SOC analyst’s common trick to verify network paths:
python3 -m http.server 8080
Starts a one-liner HTTP server in the current directory on port 8080. Useful for “can host A reach host B on TCP/8080?” tests.
4.4 Stopping a process
- kill <PID> — SIGTERM (15). Graceful shutdown; process can clean up.
- kill -9 <PID> — SIGKILL (9). Immediate, ungraceful. Use only if SIGTERM doesn’t work.
- pkill -f <pattern> — kill by command-line pattern.
- killall <name> — kill by process name.
Verify the kill worked: ps aux | grep <name> or ss -tuln | grep <port>.
⚑ WATCH OUT kill -9 doesn’t let the process clean up — open files may stay locked, database transactions may not commit. Try SIGTERM first.
✶ REAL-WORLD During incident response, the first commands you’ll run on a suspected-compromised Linux box are: ps aux (what’s running?), ss -tulnp (what’s listening?), ip a and ip route (any unexpected interfaces or routes?), lsof -i (open network connections, preview), crontab -l and cat /etc/crontab (any scheduled tasks?). Today’s Lab 7.3 drills the first three.
Ch.4 in one line: ps/top to see processes; ss/ip/ping/curl to inspect network; kill to stop — the foundation of “what’s actually happening on this box right now?”
Chapter 5 — Putting It All Together
5.1 Four composition patterns
Pattern 1 — Needle in haystack
find / -type f 2>/dev/null | xargs grep -l “<pattern>” 2>/dev/null
Find every file under /; from those, print filenames containing the pattern; suppress errors.
Pattern 2 — Listening + which process
sudo ss -tulnp
Then ps -p <PID> to see the full command line.
Pattern 3 — Log analysis
tail -n 200 /var/log/syslog | grep “ERROR” | awk ‘{print $5}’ | sort | uniq -c | sort -rn | head
Last 200 syslog lines → filter to ERROR → extract a field → count distinct values → sort descending → top 10. The “what are the top error patterns” SOC one-liner.
Pattern 4 — Follow the clues
A multi-step investigation that walks from one file to another, decoding payloads along the way. Today’s Challenge uses this pattern exactly:
cat clue1.txt
find . -name “clue2.txt”
cat folders/beta/clue2.txt
grep “FLAGPATH” logs/challenge.log
cat hidden/encoded.txt | base64 -d
✎ TRY IT In the Challenge, work the chain in order. Don’t skip steps; each clue’s payload tells you what to do next.
5.2 The Unix philosophy, restated
You don’t memorize 1,000 tools. You learn ~30 good ones and how to compose them. Today’s lesson covers the foundational ~30. The next 33 lessons build on this base.
Ch.5 in one line: composition is the superpower; learn the basic tools and the patterns, and you can investigate anything on a Linux host.
Chapter 6 — Hands-On
- 7-Quick — whoami. 2 min.
- Lab 7.1 — Linux Filesystem Navigation. 12 min.
- Lab 7.2 — Search, Grep, Pipes, and Redirection. 15 min.
- Lab 7.3 — Processes and Network Checks. 15 min.
- Challenge — Linux CLI Master. 25-35 min.
Challenge — “Linux CLI Master”
Start at ~/csrp-labs/lesson7/ctf/clue1.txt. Follow the chain. Decode the final Base64 payload. Submit the ULC{…} flag.
▶ TIP Each clue tells you exactly which command to use next. Don’t skip ahead.
Further reading
- The Linux Documentation Project: https://tldp.org/
- man bash, man find, man grep, man awk, man sed, man ps, man top, man ss, man ip, man kill, man curl
- Brian Kernighan & Rob Pike — The Unix Programming Environment
- The Filesystem Hierarchy Standard: https://refspecs.linuxfoundation.org/fhs.shtml
- MITRE ATT&CK T1564.001 (Hidden Files), T1140 (Deobfuscate/Decode Files or Information), T1057 (Process Discovery), T1049 (System Network Connections Discovery)
Bibliography
- Kernighan, B. W. & Pike, R. The Unix Programming Environment. Prentice Hall.
- Stevens, W. R. & Rago, S. A. Advanced Programming in the Unix Environment (3rd ed.). Addison-Wesley.
- Linux Foundation. Filesystem Hierarchy Standard.