Part of Resources — command literacy merged with Tools — search by category, then return to courses/labs.
Command literacy · merged with Tools
Commands
176 annotated commands organised by lane: Linux, Networking, Nmap, Wireshark filters, Burp workflows, Windows CMD, PowerShell, Python, Git, Cloud CLI, Docker/Kubernetes, SIEM query language. Each entry: syntax, explanation, safe example, expected output, common errors, related lesson/tool.
Tool install + workflows: Security tools
Showing 176 of 176 · Pair with Security tools — not a separate curriculum.
Linux commands (57)
Filesystem, processes, permissions, and everyday shell literacy.
Lessons: /courses/linux-fundamentals · /topics?level=os-fundamentals
ls— Lists directory contents. Long format (-l) is the security analyst’s def…
What it does
Lists directory contents. Long format (-l) is the security analyst’s default: permissions, owner, size, and timestamps tell you who can read secrets and whether a binary looks newly dropped.
Syntax
ls [options] [path]
Important flags / options
-lLong format with permissions-aInclude hidden files (dotfiles)-hHuman-readable sizes-tSort by mtime
Safe example (lab)
ls -lah /etc/ssh
Expected output
drwxr-xr-x 2 root root 4.0K Jan 10 . -rw-r--r-- 1 root root 3.2K Jan 10 sshd_config
How to read it: d = directory; rwxr-xr-x means owner rwx, group/other rx. sshd_config is world-readable — normal for that file, but never for private keys.
Common errors
- Forgetting -a hides .ssh and .env
- Assuming the listed user owns every process that uses the file
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
cd— Changes the current working directory for this shell. Scripts and relati…
What it does
Changes the current working directory for this shell. Scripts and relative paths break when you are in the wrong place — always pair with pwd when documenting a lab.
Syntax
cd [dir]
Important flags / options
~Home directory..Parent directory-Previous directory/Filesystem root
Safe example (lab)
cd /var/log
Expected output
(no output)
How to read it: Silence means success. Confirm with pwd → /var/log before grepping logs.
Common errors
- Paths with spaces need quotes
- cd into a symlink and losing track of the real path
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
pwd— Prints the absolute path of the current directory. Relative paths in not…
What it does
Prints the absolute path of the current directory. Relative paths in notes are ambiguous; absolute paths make lab write-ups reproducible.
Syntax
pwd
Important flags / options
-PPhysical path (resolve symlinks)
Safe example (lab)
pwd
Expected output
/var/log
How to read it: You are in /var/log — greps without a path will look here.
Common errors
- Mixing ~ expansion with scripts that do not expand it
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
grep— Searches line-oriented text for a pattern. First tool for log triage: fa…
What it does
Searches line-oriented text for a pattern. First tool for log triage: failed logins, error strings, IOCs. Prefer ripgrep (rg) when installed for speed; grep is everywhere.
Syntax
grep [options] PATTERN [file]
Important flags / options
-iCase-insensitive-rRecursive through directories-cCount matching lines-EExtended regex-nShow line numbers
Safe example (lab)
grep -c "Failed password" /var/log/auth.log
Expected output
37
How to read it: 37 failed SSH password attempts — correlate with source IPs (awk/cut) for brute-force evidence in a lab.
Common errors
- Unquoted patterns with spaces
- Recursive grep on huge binary trees without --exclude
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
find— Walks a directory tree and selects files by name, type, size, or mode. S…
What it does
Walks a directory tree and selects files by name, type, size, or mode. Security use: SUID binaries, world-writable dirs, recently modified files under /tmp.
Syntax
find [path] [expression]
Important flags / options
-nameMatch filename (shell globs)-type fRegular files only-perm -4000SUID bit set-mtime -1Modified in last day
Safe example (lab)
find / -perm -4000 -type f 2>/dev/null
Expected output
/usr/bin/passwd /usr/bin/sudo
How to read it: These SUID programs escalate to root by design — compare against a known-good list when hunting unknown SUID for privesc.
Common errors
- Forgetting 2>/dev/null floods Permission denied
- find / without limits on huge disks
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
chmod— Sets Unix permission bits (read/write/execute for user/group/other). Wro…
What it does
Sets Unix permission bits (read/write/execute for user/group/other). Wrong modes leak keys or break services; 777 is almost never the right fix.
Syntax
chmod MODE file
Important flags / options
u/g/o/aWho: user/group/other/all755rwxr-xr-x (common for dirs/bins)600rw------- (secrets/keys)+xAdd execute
Safe example (lab)
chmod 600 ~/.ssh/id_ed25519
Expected output
(no output)
How to read it: Private key readable only by you. OpenSSH refuses keys that are group/world-readable.
Common errors
- chmod 777 to "fix" access
- Recursive chmod -R 777 on /var/www
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
chown— Changes file owner and optionally group. Web roots often need www-data o…
What it does
Changes file owner and optionally group. Web roots often need www-data ownership; stealing ownership of system files breaks the OS.
Syntax
chown USER[:GROUP] file
Important flags / options
-RRecursiveuser:groupSet both
Safe example (lab)
sudo chown www-data:www-data /var/www/app
Expected output
(no output)
How to read it: The app tree is now owned by the web user — pair with sane chmod, not 777.
Common errors
- chown -R on / or /usr
- Changing ownership instead of fixing the ACL problem
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
ps— Snapshot of running processes. Spot unexpected reverse shells, crypto mi…
What it does
Snapshot of running processes. Spot unexpected reverse shells, crypto miners, or leftover lab listeners by name/PID/user.
Syntax
ps [options]
Important flags / options
auxBSD style: all users, detail-efSystem V full format--forestProcess tree
Safe example (lab)
ps aux | grep sshd
Expected output
root 812 0.0 0.1 sshd: /usr/sbin/sshd -D
How to read it: PID 812 is the SSH daemon as root — expected. Note the grep line also matching itself.
Common errors
- Trusting process names (easy to spoof)
- Killing PIDs without confirming the command line
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
ss— Modern replacement for netstat — faster and always maintained. Default s…
What it does
Modern replacement for netstat — faster and always maintained. Default skill for “what is listening?” during hardening and IR.
Syntax
ss [options]
Important flags / options
-tTCP-uUDP-lListening-nNumeric-pProcess names
Safe example (lab)
ss -tlnp
Expected output
LISTEN 0 128 127.0.0.1:5432 users:(("postgres",pid=900))How to read it: Postgres bound to localhost only — not reachable from other hosts. Contrast with 0.0.0.0 bindings.
Common errors
- Without sudo, -p may omit process names
- Misreading [::] vs 0.0.0.0
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals · /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
head— Shows the first lines of a file.
What it does
Shows the first lines of a file.
Syntax
head [options] file
Important flags / options
-nNumber of lines
Safe example (lab)
head -n 5 /var/log/syslog
Expected output
…first 5 lines…
How to read it: Quick peek without opening the whole log.
Common errors
- Assuming logs are small enough to cat entirely
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
tail— Shows the end of a file; great for live logs.
What it does
Shows the end of a file; great for live logs.
Syntax
tail [options] file
Important flags / options
-fFollow-nLines
Safe example (lab)
tail -f /var/log/auth.log
Expected output
…streaming new lines…
How to read it: Watch authentication events live in a lab.
Common errors
- Following huge noisy logs without filters
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
chmod (sticky)— Sticky bit on directories (e.g. /tmp) restricts delete to owner.
What it does
Sticky bit on directories (e.g. /tmp) restricts delete to owner.
Syntax
chmod +t dir
Safe example (lab)
ls -ld /tmp
Expected output
drwxrwxrwt … /tmp
How to read it: The t means sticky bit is set.
Common errors
- Confusing sticky with SUID
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
systemctl— Manage systemd services.
What it does
Manage systemd services.
Syntax
systemctl [cmd] [unit]
Important flags / options
statusShow statestart/stopControlenableStart on boot
Safe example (lab)
systemctl status ssh
Expected output
active (running)
How to read it: Confirms ssh service state on a lab VM.
Common errors
- Disabling critical services on shared hosts
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
journalctl— Query the systemd journal.
What it does
Query the systemd journal.
Syntax
journalctl [options]
Important flags / options
-uUnit-fFollow--sinceTime filter
Safe example (lab)
journalctl -u ssh -n 20
Expected output
…recent ssh logs…
How to read it: Central place for service logs on systemd distros.
Common errors
- Forgetting time filters on busy hosts
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
whoami— Prints the current effective username.
What it does
Prints the current effective username.
Syntax
whoami
Safe example (lab)
whoami
Expected output
alice
How to read it: Confirms which user you are after sudo/su.
Common errors
- Assuming you are root
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
id— Shows uid/gid and group memberships.
What it does
Shows uid/gid and group memberships.
Syntax
id [user]
Safe example (lab)
id
Expected output
uid=1000(alice) gid=1000(alice) groups=1000(alice),27(sudo)
How to read it: Group memberships matter for privilege reviews.
Common errors
- Ignoring supplementary groups
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
auditctl— Linux audit framework control.
What it does
Linux audit framework control.
Syntax
auditctl -l
Important flags / options
-wWatch path
Safe example (lab)
sudo auditctl -l
Expected output
LIST_RULES: …
How to read it: Compliance and tamper detection.
Common errors
- Overly broad watches filling disks
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
getfacl— View POSIX ACLs beyond chmod bits.
What it does
View POSIX ACLs beyond chmod bits.
Syntax
getfacl file
Safe example (lab)
getfacl /shared/project
Expected output
user:alice:rwx …
How to read it: Find excessive ACL grants.
Common errors
- Ignoring default ACLs on directories
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
setfacl— Modify ACL entries.
What it does
Modify ACL entries.
Syntax
setfacl -m u:user:perms file
Important flags / options
-mModify-xRemove
Safe example (lab)
setfacl -m u:bob:r-- confidential.txt
Expected output
(updated ACL)
How to read it: Granular sharing — review for abuse.
Common errors
- Granting rwx to everyone via ACL
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
umask— Default permission mask for new files.
What it does
Default permission mask for new files.
Syntax
umask
Safe example (lab)
umask
Expected output
0022
How to read it: Explains why new files are 644/755.
Common errors
- Setting umask 000 on shared servers
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
cat— Concatenates and prints file contents to stdout. Security students use i…
What it does
Concatenates and prints file contents to stdout. Security students use it to read configs, logs, and flags in CTFs — but for large logs prefer less/tail so you do not flood the terminal.
Syntax
cat [file …]
Important flags / options
-Read from stdin> fileShell redirect (overwrite)
Safe example (lab)
cat /etc/os-release
Expected output
NAME="Ubuntu" VERSION="22.04.3 LTS (Jammy Jellyfish)"
How to read it: Shows distribution identity — useful when choosing package managers or vulnerability lookup for that OS.
Common errors
- catting multi‑GB logs
- Using cat file | grep X instead of grep X file
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
less— Pager for browsing long text. Search with /, next match n, quit with q. …
What it does
Pager for browsing long text. Search with /, next match n, quit with q. Safer than cat for logs because it does not dump everything at once.
Syntax
less [file]
Important flags / options
/patternSearch forwardGJump to endqQuit
Safe example (lab)
less /var/log/syslog
Expected output
(interactive view)
How to read it: You scroll and search inside the viewer; nothing is printed until you ask.
Common errors
- Leaving less open while logs rotate
- Assuming arrow keys work the same in every terminal
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
cut— Extracts columns from delimited text. Pair with grep/awk for quick log t…
What it does
Extracts columns from delimited text. Pair with grep/awk for quick log triage without a full SIEM.
Syntax
cut -d DELIM -f FIELDS
Important flags / options
-dDelimiter (default tab)-fField numbers-f1,3Multiple fields
Safe example (lab)
echo "alice:x:1000:1000::/home/alice:/bin/bash" | cut -d: -f1,7
Expected output
alice:/bin/bash
How to read it: Username and login shell from a passwd-style line — classic recon of local accounts.
Common errors
- Wrong delimiter (space vs colon)
- 1-based field numbers off-by-one
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
awk— Programmable text processor. In IR and CTFs, awk pulls fields, counts, a…
What it does
Programmable text processor. In IR and CTFs, awk pulls fields, counts, and filters without writing a full script.
Syntax
awk 'pattern { action }' [file]Important flags / options
-FField separator{print $1}Print first fieldNR==1First record only
Safe example (lab)
ss -tln | awk 'NR>1 {print $4}'Expected output
0.0.0.0:22 127.0.0.1:5432
How to read it: Local addresses of listening TCP sockets — quick exposure check.
Common errors
- Forgetting quotes around the program
- Assuming CSV quoting rules like Excel
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
sed— Stream editor for find/replace and line edits. Useful for scrubbing secr…
What it does
Stream editor for find/replace and line edits. Useful for scrubbing secrets from demos or normalizing configs — never silently rewrite production without review.
Syntax
sed [options] 'script' [file]
Important flags / options
-nQuiets/a/b/gGlobal substitute-iIn-place edit (dangerous)
Safe example (lab)
echo 'password=secret' | sed 's/=.*/=REDACTED/'
Expected output
password=REDACTED
How to read it: Shows how to sanitize sensitive lines before sharing logs.
Common errors
- sed -i without backup on important files
- Unescaped special characters in patterns
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
sort / uniq— Sort lines then collapse duplicates. With -c you get frequency counts — …
What it does
Sort lines then collapse duplicates. With -c you get frequency counts — perfect for top failed logins or top URLs.
Syntax
sort [file] | uniq [-c]
Important flags / options
-nNumeric sort-rReverseuniq -cCount duplicates
Safe example (lab)
cut -d' ' -f1 access.log | sort | uniq -c | sort -nr | head
Expected output
1201 203.0.113.10 88 198.51.100.2
How to read it: IP 203.0.113.10 dominates requests — investigate first in a lab incident.
Common errors
- uniq without sort (duplicates must be adjacent)
- Sorting huge files without enough disk for temp
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
wc— Word/line/byte counts. Fast way to size logs or count findings before op…
What it does
Word/line/byte counts. Fast way to size logs or count findings before opening them.
Syntax
wc [options] [file]
Important flags / options
-lLines-wWords-cBytes
Safe example (lab)
wc -l /var/log/auth.log
Expected output
18402 /var/log/auth.log
How to read it: 18k auth lines — plan filtering before grepping blindly.
Common errors
- Assuming line count equals events (multi-line entries exist)
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
stat— Shows inode metadata: size, permissions, owner, and atime/mtime/ctime. F…
What it does
Shows inode metadata: size, permissions, owner, and atime/mtime/ctime. Forensics students use this to spot unexpected timestamps.
Syntax
stat file
Important flags / options
-c %aOctal mode-c %yModification time
Safe example (lab)
stat /etc/passwd
Expected output
Access: (0644/-rw-r--r--) Modify: 2024-01-10 08:00:00
How to read it: World-readable passwd is normal; compare Modify time if you suspect tampering.
Common errors
- Trusting atime on systems with relatime/noatime
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
file— Guesses file type from magic bytes, not the extension. Critical when a '…
What it does
Guesses file type from magic bytes, not the extension. Critical when a 'photo.jpg' is actually an ELF binary or script.
Syntax
file [path]
Important flags / options
-bBrief-iMIME type
Safe example (lab)
file mystery.bin
Expected output
mystery.bin: ELF 64-bit LSB executable, x86-64
How to read it: Treat as executable malware lab sample — open only in a sandbox.
Common errors
- Trusting the filename extension alone
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
strings— Extracts printable ASCII/Unicode from binaries. Quick first look for URL…
What it does
Extracts printable ASCII/Unicode from binaries. Quick first look for URLs, paths, and error messages in malware or unknown binaries (lab only).
Syntax
strings [options] file
Important flags / options
-nMin length-aScan whole file
Safe example (lab)
strings -n 8 sample.exe | head
Expected output
http://evil.lab/callback C:\Users\Public\drop
How to read it: Hardcoded URL and path are leads for IOC hunting — not proof by themselves.
Common errors
- Assuming every string is a live C2
- Running on production binaries you must not reverse
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
xxd / hexdump— Hex dump of file bytes. Helps spot magic headers (MZ, ELF, PNG) and null…
What it does
Hex dump of file bytes. Helps spot magic headers (MZ, ELF, PNG) and null-padded secrets.
Syntax
xxd [file]
Important flags / options
-lLimit bytes-sSeek offset
Safe example (lab)
xxd -l 16 flag.png
Expected output
00000000: 8950 4e47 0d0a 1a0a 0000 000d 4948 4452 .PNG........IHDR
How to read it: 89504E47 is the PNG signature — file type matches extension.
Common errors
- Dumping entire huge files to the terminal
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
df / du— df shows filesystem free space; du measures directory size. Disk-full ho…
What it does
df shows filesystem free space; du measures directory size. Disk-full hosts break logging and updates — both matter for availability and IR.
Syntax
df -h ; du -sh [path]
Important flags / options
df -hHuman sizesdu -sh *Per-item sizesdu -xOne filesystem
Safe example (lab)
du -sh /var/log/* | sort -h | tail
Expected output
2.1G /var/log/journal
How to read it: Journal is the space hog — tune retention before the disk fills.
Common errors
- du on network mounts without knowing size
- Ignoring inode exhaustion (df -i)
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
mount / lsblk— Inventory block devices and mounted filesystems. Look for unexpected USB…
What it does
Inventory block devices and mounted filesystems. Look for unexpected USB, loop devices, or world-writable mounts in hardening labs.
Syntax
lsblk ; mount
Important flags / options
lsblk -fWith FS typesfindmntTree view of mounts
Safe example (lab)
lsblk -f
Expected output
NAME FSTYPE LABEL MOUNTPOINT sda1 ext4 root / sdb1 vfat LAB /media/usb
How to read it: An extra USB volume is mounted — document it in your lab notes.
Common errors
- Unmounting busy system partitions
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
lsof— Lists open files and the processes that hold them. Classic for 'which pr…
What it does
Lists open files and the processes that hold them. Classic for 'which process has this port/file?' during IR.
Syntax
lsof [options]
Important flags / options
-i :PORTWho holds a port-p PIDFiles for a process-u userBy user
Safe example (lab)
sudo lsof -i :22
Expected output
sshd 812 root 3u IPv4 … TCP *:ssh (LISTEN)
How to read it: PID 812 (sshd) owns the SSH listener — matches ss/netstat findings.
Common errors
- Running without sudo and missing root-owned sockets
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
strace— Traces system calls. Powerful for debugging 'permission denied' or seein…
What it does
Traces system calls. Powerful for debugging 'permission denied' or seeing what a binary opens — use only on lab processes you own.
Syntax
strace -p PID | strace cmd
Important flags / options
-e open,openatFilter syscalls-o fileWrite output-fFollow children
Safe example (lab)
strace -e openat cat /etc/hosts 2>&1 | head
Expected output
openat(AT_FDCWD, "/etc/hosts", O_RDONLY) = 3
How to read it: Confirms the file open succeeded with fd 3.
Common errors
- Attaching to production critical processes
- Flooding disk with -f on busy services
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
sudo / su— sudo runs one command as another user (usually root) with an audit trail…
What it does
sudo runs one command as another user (usually root) with an audit trail; su switches sessions. Least privilege means sudoers rules, not password-sharing.
Syntax
sudo [command] ; su - [user]
Important flags / options
-lList allowed commands-u userRun as usersu -Login shell as root
Safe example (lab)
sudo -l
Expected output
User alice may run:
(ALL) NOPASSWD: /usr/bin/systemctl restart nginxHow to read it: Alice can restart nginx without a password — review whether that is intentional.
Common errors
- NOPASSWD: ALL in sudoers
- Leaving root shells open on shared hosts
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
crontab— Per-user scheduled jobs. Persistence hunters check user and system cront…
What it does
Per-user scheduled jobs. Persistence hunters check user and system crontabs (/etc/cron.*) for unexpected wget/curl reverse shells.
Syntax
crontab -l ; crontab -e
Important flags / options
-lList-eEdit-u userAnother user's crontab (root)
Safe example (lab)
crontab -l
Expected output
*/5 * * * * /home/alice/backup.sh
How to read it: A backup runs every 5 minutes — verify the script contents and permissions.
Common errors
- World-writable cron scripts
- Ignoring /etc/cron.d and systemd timers
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
history— Shows shell command history for the current user. Great for self-review …
What it does
Shows shell command history for the current user. Great for self-review after a lab; attackers also scrape it for secrets — clear or avoid putting tokens on the CLI.
Syntax
history
Important flags / options
!nRe-run entry nHISTCONTROLIgnore duplicates/spaces
Safe example (lab)
history | tail -5
Expected output
501 nmap -sV 10.0.0.5 502 ssh alice@10.0.0.5
How to read it: Recent recon and login commands — useful for your lab write-up.
Common errors
- Putting passwords on the command line
- Assuming history is empty after closing the terminal
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
env / export— Shows or sets environment variables. Secrets in ENV are a common leak (C…
What it does
Shows or sets environment variables. Secrets in ENV are a common leak (CI logs, crash dumps, docker inspect).
Syntax
env ; export NAME=value
Important flags / options
env -iClean environmentprintenv NAMEOne variable
Safe example (lab)
printenv | grep -i key
Expected output
AWS_ACCESS_KEY_ID=AKIA…
How to read it: An access key is in the environment — rotate it and move to a secrets manager in real work.
Common errors
- Committing .env files
- echo $SECRET in shared screen shares
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
tar / gzip— Create or extract compressed archives. Verify contents before extracting…
What it does
Create or extract compressed archives. Verify contents before extracting untrusted tarballs (path traversal / zip-slip style issues).
Syntax
tar -czvf archive.tgz dir/
Important flags / options
-cCreate-xExtract-zgzip-tList-vVerbose
Safe example (lab)
tar -tzf lab-backup.tgz | head
Expected output
./etc/passwd ./home/alice/.ssh/id_ed25519
How to read it: Archive contains a private key — handle as sensitive evidence, do not extract into a shared folder.
Common errors
- Extracting as root into /
- Blindly untarring internet downloads
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
scp / rsync— Copy files over SSH. Prefer keys over passwords; restrict which hosts yo…
What it does
Copy files over SSH. Prefer keys over passwords; restrict which hosts you push to. rsync can resume and exclude patterns.
Syntax
scp file user@host:path ; rsync -avz src/ dest/
Important flags / options
-Pscp preserve + progressrsync -nDry run--excludeSkip paths
Safe example (lab)
rsync -avz --dry-run ./web/ alice@lab:/var/www/html/
Expected output
sending incremental file list index.html
How to read it: Dry-run shows what would sync — review before a real deploy to your lab VM.
Common errors
- scp -r of node_modules by accident
- Trusting host keys without verification the first time
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
ssh— Secure remote shell. Harden with key auth, disabled root login, and Fail…
What it does
Secure remote shell. Harden with key auth, disabled root login, and Fail2ban/allowlists. Always verify host keys on first connect.
Syntax
ssh [user@]host [command]
Important flags / options
-i keyIdentity file-LLocal port forward-vVerbose debug
Safe example (lab)
ssh -i ~/.ssh/lab_ed25519 alice@192.168.56.10
Expected output
Welcome to Ubuntu 22.04…
How to read it: Interactive session opened on the lab VM as alice.
Common errors
- Password auth on internet-exposed SSH
- Accepting changed host keys without investigating
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals · /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
kill / killall— Sends a signal to a process (default SIGTERM). Use after identifying the…
What it does
Sends a signal to a process (default SIGTERM). Use after identifying the PID with ps/pgrep — do not kill random system PIDs.
Syntax
kill [-SIGNAL] PID
Important flags / options
-9SIGKILL (last resort)-HUPReload many daemonspgrep -a nameFind PIDs
Safe example (lab)
pgrep -a python
Expected output
2048 python3 -m http.server 8000
How to read it: Lab web server is PID 2048 — safe candidate to stop after practice.
Common errors
- kill -9 as first choice
- Killing PID 1
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
top / htop— Live process monitor for CPU/memory. Spike investigation starts here bef…
What it does
Live process monitor for CPU/memory. Spike investigation starts here before diving into logs.
Syntax
top ; htop
Important flags / options
PSort CPU (top)MSort memorykKill from within top
Safe example (lab)
top -bn1 | head -15
Expected output
PID USER %CPU %MEM COMMAND 2048 alice 80.0 2.1 python3
How to read it: Python holding 80% CPU — expected if you left a busy lab script running.
Common errors
- Leaving top fullscreen while missing alerts elsewhere
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
ufw— Uncomplicated Firewall front-end on Ubuntu. Default deny incoming is a s…
What it does
Uncomplicated Firewall front-end on Ubuntu. Default deny incoming is a solid lab hardening baseline.
Syntax
ufw [enable|allow|deny|status]
Important flags / options
status verboseRules + defaultsallow 22/tcpPermit SSHdeny out 53Example deny
Safe example (lab)
sudo ufw status verbose
Expected output
Status: active Default: deny (incoming), allow (outgoing) 22/tcp ALLOW IN Anywhere
How to read it: SSH is allowed; everything else inbound is denied — good minimal posture for a lab VM.
Common errors
- Enabling ufw before allowing SSH (lockout)
- allow 0.0.0.0/0 to every port
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
fail2ban-client— Shows Fail2ban jails that ban abusive IPs (often sshd). Confirm bans aft…
What it does
Shows Fail2ban jails that ban abusive IPs (often sshd). Confirm bans after simulated brute force in a lab.
Syntax
fail2ban-client status [jail]
Important flags / options
status sshdSSH jailset sshd unbanip IPUnban
Safe example (lab)
sudo fail2ban-client status sshd
Expected output
Currently banned: 1 Banned IP list: 203.0.113.50
How to read it: One attacker IP is banned — correlate with auth.log failures.
Common errors
- Whitelisting your own IP incorrectly
- Disabling the jail instead of tuning findtime
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
base64— Encode/decode Base64. Appearances in phishing, JWT payloads, and configs…
What it does
Encode/decode Base64. Appearances in phishing, JWT payloads, and configs — encoding is not encryption.
Syntax
base64 [file] ; base64 -d
Important flags / options
-w0No wrap-dDecode
Safe example (lab)
echo -n 'admin:labpass' | base64
Expected output
YWRtaW46bGFicGFzcw==
How to read it: Decoded later yields admin:labpass — anyone who sees the Base64 can recover it.
Common errors
- Treating Base64 as a secret vault
- Pasting production tokens into online decoders
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
jq— Query and pretty-print JSON. Essential for API security labs, cloud CLI …
What it does
Query and pretty-print JSON. Essential for API security labs, cloud CLI output, and JWT payloads.
Syntax
jq 'filter' file.json
Important flags / options
.Pretty print.users[].idMap field-rRaw strings
Safe example (lab)
echo '{"users":[{"id":1,"role":"admin"}]}' | jq '.users[0].role'Expected output
"admin"
How to read it: Extracted the role claim — useful when reviewing API responses for overexposure.
Common errors
- Assuming jq is installed everywhere
- Piping secrets into shell history via echo
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
hostname— Prints or sets the system hostname. During IR and inventory, hostname + …
What it does
Prints or sets the system hostname. During IR and inventory, hostname + /etc/hosts mismatches cause confusing DNS and cert errors.
Syntax
hostname [options]
Important flags / options
-fFQDN if configured-IAll IP addressesctl hostnamectlsystemd hostname metadata
Safe example (lab)
hostname -f; hostname -I
Expected output
lab-web.internal 192.168.56.10 10.0.3.15
How to read it: FQDN is lab-web.internal with two addresses — pick the correct interface when writing firewall rules.
Common errors
- Changing hostname without updating certs/DNS
- Relying on hostname alone for allowlists
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
fuser— Shows which PIDs use a file, mount, or TCP/UDP port. Pair with ss/lsof w…
What it does
Shows which PIDs use a file, mount, or TCP/UDP port. Pair with ss/lsof when you need to free a port or unmount a busy disk.
Syntax
fuser -v port/tcp ; fuser -k file
Important flags / options
-vVerbose-kKill processes (dangerous)-n tcpNamespace tcp8080/tcpPort syntax
Safe example (lab)
sudo fuser -v 8000/tcp
Expected output
USER PID ACCESS COMMAND 8000/tcp: alice 2048 F…. python
How to read it: PID 2048 (python) holds TCP 8000 — stop that lab http.server before binding another service.
Common errors
- fuser -k on production listeners
- Confusing ACCESS codes without man fuser
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
lsof -i— Open files + Internet sockets. When ss lacks process names (permissions)…
What it does
Open files + Internet sockets. When ss lacks process names (permissions), lsof often still maps port → binary.
Syntax
lsof -i :port ; lsof -iTCP -sTCP:LISTEN
Important flags / options
-i :443Anything on 443-iTCP -sTCP:LISTENAll TCP listeners-p PIDFiles for one process
Safe example (lab)
sudo lsof -iTCP:22 -sTCP:LISTEN
Expected output
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME sshd 812 root 3u IPv4 … 0t0 TCP *:ssh (LISTEN)
How to read it: Confirms sshd PID 812 — cross-check with ps and audit authorized_keys if you suspect compromise.
Common errors
- Running lsof without sudo and missing root sockets
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
ufw status numbered— Readable firewall status with rule numbers for deletes. Good teaching br…
What it does
Readable firewall status with rule numbers for deletes. Good teaching bridge from iptables complexity to intent-based rules.
Syntax
sudo ufw status numbered
Important flags / options
status verboseDefaults + rulesdelete NRemove by numberallow/denyAdd rules
Safe example (lab)
sudo ufw status numbered
Expected output
Status: active
To Action From
[ 1] 22/tcp ALLOW IN AnywhereHow to read it: Only SSH is allowed inbound — tighten further with allow from lab subnet if exposed.
Common errors
- Enabling ufw before allowing SSH
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
ssh -vvv— Maximum SSH client verbosity — see which auth methods are offered, wheth…
What it does
Maximum SSH client verbosity — see which auth methods are offered, whether keys are tried, and where negotiation fails.
Syntax
ssh -vvv user@host
Important flags / options
-vvvDebug level 3-i keyIdentity file-o PreferredAuthentications=publickeyForce method
Safe example (lab)
ssh -vvv -i ~/.ssh/lab_ed25519 alice@192.168.56.10
Expected output
debug1: Offering public key: … debug1: Authentication succeeded (public key).
How to read it: Publickey succeeded — if it fails earlier, check permissions on key files (600) and server authorized_keys.
Common errors
- Pastings -vvv logs that contain sensitive env into tickets without redaction
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals · /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
scp— Copy files over SSH. Prefer explicit paths and dry mental checks before …
What it does
Copy files over SSH. Prefer explicit paths and dry mental checks before -r of huge trees.
Syntax
scp [-r] source user@host:path
Important flags / options
-rRecursive-P portSSH port (capital P)-i keyIdentity-CCompression
Safe example (lab)
scp -i ~/.ssh/lab_ed25519 ./notes.md alice@192.168.56.10:~/notes.md
Expected output
notes.md 100% 4096 1.2MB/s 00:00
How to read it: File landed in alice’s home — verify checksums for critical artifacts.
Common errors
- scp -r / with a trailing mistake
- Using password auth on internet-exposed SSH
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
rsync over SSH— Efficient sync for lab backups and deploy folders. Dry-run first (-n) so…
What it does
Efficient sync for lab backups and deploy folders. Dry-run first (-n) so you do not delete remote files by accident.
Syntax
rsync -avz -e ssh src/ user@host:dest/
Important flags / options
-aArchive mode-vVerbose-zCompress-nDry run--deleteMirror deletes (dangerous)
Safe example (lab)
rsync -avzn -e 'ssh -i ~/.ssh/lab_ed25519' ./web/ alice@192.168.56.10:/var/www/html/
Expected output
sending incremental file list index.html assets/app.css
How to read it: Dry-run shows two paths would sync — drop -n to perform after review.
Common errors
- --delete without backups
- Syncing .env into a world-readable web root
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
systemctl restart / status— Control systemd services during lab hardening. Always status before/afte…
What it does
Control systemd services during lab hardening. Always status before/after restart so you can prove the change.
Syntax
sudo systemctl status|restart|reload UNIT
Important flags / options
statusActive state + recent logsrestartStop then startreloadReload config if supportedis-enabledBoot persistence
Safe example (lab)
sudo systemctl status nginx --no-pager -l
Expected output
● nginx.service - A high performance web server Active: active (running)
How to read it: nginx is active — if curl still fails, check listen address and firewall next.
Common errors
- restart sshd after locking yourself out of key auth
- masking critical units without documentation
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
journalctl -u— Service-centric logs for connectivity failures (nginx 502, sshd refused …
What it does
Service-centric logs for connectivity failures (nginx 502, sshd refused key, NetworkManager).
Syntax
journalctl -u UNIT -n 50 --no-pager
Important flags / options
-uUnit-fFollow--since '10 min ago'Time window-p errPriority filter
Safe example (lab)
journalctl -u ssh -n 20 --no-pager
Expected output
sshd[812]: Accepted publickey for alice from 192.168.56.50
How to read it: Successful key login from your workstation IP — baseline for detecting later brute force.
Common errors
- journalctl without time bounds on busy hosts
Related: /courses/linux-fundamentals · /topics?level=os-fundamentals
Networking commands (49)
Connectivity, DNS, sockets, and capture basics.
Tools: wireshark · tcpdump · netcat · Lessons: /courses/networking-fundamentals · /topics?level=network-security
netstat— Legacy view of sockets and routing. Still appears in older docs; on mode…
What it does
Legacy view of sockets and routing. Still appears in older docs; on modern Linux prefer ss. Shows what is listening and who is connected.
Syntax
netstat [options]
Important flags / options
-t/-uTCP / UDP-lListening only-nNumeric (no DNS)-pProcess (needs root for others)
Safe example (lab)
sudo netstat -tlnp
Expected output
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 812/sshd
How to read it: SSH listens on all IPv4 interfaces (0.0.0.0:22). On a lab VM that may be OK; on a cloud box, restrict with firewall/SG.
Common errors
- Assuming netstat exists on minimal containers
- Ignoring UDP listeners
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
curl— HTTP/HTTPS (and more) client. Security workhorses: fetch headers, replay…
What it does
HTTP/HTTPS (and more) client. Security workhorses: fetch headers, replay APIs, check redirects, grab robots.txt — on targets you own.
Syntax
curl [options] URL
Important flags / options
-IHEAD / headers only-vVerbose (TLS, headers)-XHTTP method-dRequest body-LFollow redirects-HCustom header
Safe example (lab)
curl -I http://localhost:8000
Expected output
HTTP/1.0 200 OK Server: SimpleHTTP/0.6 Python/3.12
How to read it: 200 OK and a revealing Server banner — useful inventory, also an info leak to fix in production.
Common errors
- Forgetting -L and thinking the app is down
- -k ignoring TLS errors on real sites
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
wget— Download files non-interactively. Fine for lab ISOs and wordlists; dange…
What it does
Download files non-interactively. Fine for lab ISOs and wordlists; dangerous when blindly fetching and executing remote scripts.
Syntax
wget [options] URL
Important flags / options
-OOutput filename-qQuiet-cContinue partial--spiderCheck existence only
Safe example (lab)
wget -O page.html http://localhost:8000
Expected output
‘page.html’ saved [1024/1024]
How to read it: File landed locally — open it; do not pipe wget to sh.
Common errors
- curl|bash / wget|sh patterns
- Overwriting files with -O by mistake
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
ping— ICMP echo request/reply for reachability and rough latency. Firewalls of…
What it does
ICMP echo request/reply for reachability and rough latency. Firewalls often drop ICMP, so silence ≠ proof the host is down.
Syntax
ping [options] host
Important flags / options
-c NStop after N probes-WTimeout-nNumeric (no reverse DNS)
Safe example (lab)
ping -c 3 127.0.0.1
Expected output
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.04 ms
How to read it: Loopback answers — stack is up. TTL and time help spot distant vs local hops later.
Common errors
- Infinite ping flooding a link
- Assuming no reply means offline
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
traceroute— Lists routers (hops) on the path to a destination. Helps explain where l…
What it does
Lists routers (hops) on the path to a destination. Helps explain where latency or filtering appears; many hops show * when ICMP is rate-limited.
Syntax
traceroute host
Important flags / options
-nSkip DNS lookups-IICMP probes-TTCP probes (when ICMP blocked)
Safe example (lab)
traceroute -n 1.1.1.1
Expected output
1 192.168.1.1 1.2 ms 2 10.0.0.1 8.1 ms
How to read it: Hop 1 is your LAN gateway; hop 2 is upstream. * * * later would mean no reply, not always a black hole.
Common errors
- Treating * as definitive failure
- Running against targets outside lab/ISP norms repeatedly
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
nslookup— Interactive/simple DNS query tool (legacy). Fine for a quick A record; u…
What it does
Interactive/simple DNS query tool (legacy). Fine for a quick A record; use dig for serious DNS work (any type, +trace, DNSSEC flags).
Syntax
nslookup name [server]
Safe example (lab)
nslookup example.com
Expected output
Name: example.com Address: 93.184.215.14
How to read it: Got an A record from the configured resolver — note which server answered if you set one.
Common errors
- Stopping at nslookup when dig is available
- Ignoring TTL and caching behavior
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
dig— The flexible DNS Swiss Army knife: any RR type, short or verbose, specif…
What it does
The flexible DNS Swiss Army knife: any RR type, short or verbose, specific resolvers, and +trace. Core for phishing domain checks and mail (MX/TXT/SPF) labs.
Syntax
dig [@server] name [type]
Important flags / options
+shortOne-line answersMX/TXT/NS/ARecord type@1.1.1.1Query that resolver+traceWalk from root
Safe example (lab)
dig example.com MX +short
Expected output
0 .
How to read it: Null MX (priority 0, host ".") — domain publishes that it accepts no mail. Useful anti-abuse signal.
Common errors
- Forgetting the type and only seeing A
- Assuming dig validates DNSSEC without +dnssec/+adflag attention
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
ip— iproute2 toolkit: addresses, links, routes, neighbors. Replaces ifconfig…
What it does
iproute2 toolkit: addresses, links, routes, neighbors. Replaces ifconfig/route on modern Linux.
Syntax
ip [object] [command]
Important flags / options
a / addrAddressesl / linkInterfaces up/downr / routeRouting tablen / neighARP/NDP cache
Safe example (lab)
ip a
Expected output
2: eth0: … inet 192.168.56.10/24
How to read it: eth0 has a Host-Only/lab IP in a /24 — use this when configuring nmap targets in VirtualBox/VMware labs.
Common errors
- ip addr add without netplan/NetworkManager persist
- Bringing down the only SSH interface remotely
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
tcpdump— CLI packet capture. Learn BPF filters (host, port, net) and always write…
What it does
CLI packet capture. Learn BPF filters (host, port, net) and always write -w pcaps for Wireshark later. Capture only on networks you own.
Syntax
tcpdump [options] [bpf filter]
Important flags / options
-iInterface (lo, eth0, any)-nnNo name/port resolve-w file.pcapWrite capture-c NStop after N packetsport 80BPF example
Safe example (lab)
sudo tcpdump -i lo -nn port 8000 -c 4
Expected output
IP 127.0.0.1.51234 > 127.0.0.1.8000: Flags [S]
How to read it: SYN to port 8000 on loopback — TCP handshake start for your local lab server.
Common errors
- Wrong interface (empty capture)
- Capturing on corporate Wi‑Fi without authorization
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/wireshark · /tools/tcpdump · /tools/netcat
arp— Shows ARP cache (IP→MAC).
What it does
Shows ARP cache (IP→MAC).
Syntax
arp -a
Safe example (lab)
arp -a
Expected output
192.168.1.1 at aa:bb:…
How to read it: Useful when hunting spoofing in a lab LAN.
Common errors
- Trusting ARP on hostile networks
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
route / ip route— Shows routing table.
What it does
Shows routing table.
Syntax
ip route
Safe example (lab)
ip route
Expected output
default via 192.168.1.1 dev eth0
How to read it: Default gateway and interfaces.
Common errors
- Changing routes without documenting
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
nc— Netcat — connect or listen for lab tests.
What it does
Netcat — connect or listen for lab tests.
Syntax
nc [options] host port
Important flags / options
-lListen-vVerbose-zScan without data
Safe example (lab)
nc -lv 9000
Expected output
listening on [any] 9000 …
How to read it: Simple lab listener for connectivity tests.
Common errors
- Exposing listeners on public interfaces
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
netstat (Win)— Shows connections and owning PIDs.
What it does
Shows connections and owning PIDs.
Syntax
netstat -ano
Important flags / options
-aAll-nNumeric-oPID
Safe example (lab)
netstat -ano | findstr LISTENING
Expected output
TCP 0.0.0.0:445 … LISTENING 4
How to read it: Map listening ports to PIDs for IR.
Common errors
- Killing PID 4 blindly — often System
Related: /courses/networking-fundamentals · /topics?level=network-security · /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals · /tools/wireshark · /tools/tcpdump · /tools/netcat
host— Simple DNS lookup utility.
What it does
Simple DNS lookup utility.
Syntax
host [-t type] name
Important flags / options
-t TXTTXT records
Safe example (lab)
host -t MX example.com
Expected output
example.com mail is handled by 10 mail.example.com
How to read it: Quick MX checks for email security.
Common errors
- Assuming host does full DNSSEC validation display
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
whois— Registration metadata for domains (OSINT).
What it does
Registration metadata for domains (OSINT).
Syntax
whois domain
Safe example (lab)
whois example.com
Expected output
Registrar: … Creation Date: …
How to read it: Useful for phishing domain age/reputation.
Common errors
- Automating whois without rate limits
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
resolvectl— systemd-resolved DNS query on modern Linux.
What it does
systemd-resolved DNS query on modern Linux.
Syntax
resolvectl query name
Important flags / options
statusResolver state
Safe example (lab)
resolvectl query internal.corp
Expected output
internal.corp: 10.0.0.5
How to read it: Debug split-horizon DNS in labs.
Common errors
- Confusing with legacy resolv.conf only
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
iptables— Legacy Linux firewall (still common).
What it does
Legacy Linux firewall (still common).
Syntax
iptables [-t table] -A CHAIN rule
Important flags / options
-LList rules-A INPUTAppend input rule
Safe example (lab)
sudo iptables -L -n -v
Expected output
Chain INPUT (policy ACCEPT) …
How to read it: Review allow/deny before audits.
Common errors
- Flushing rules remotely and locking yourself out
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
nft— Modern netfilter firewall CLI.
What it does
Modern netfilter firewall CLI.
Syntax
nft list ruleset
Important flags / options
add ruleAdd rule
Safe example (lab)
sudo nft list ruleset
Expected output
table inet filter { … }How to read it: Preferred on newer distros.
Common errors
- Mixing iptables-nft and nft syntax incorrectly
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
ip route— Show/manipulate routing table.
What it does
Show/manipulate routing table.
Syntax
ip route [show|add|del]
Safe example (lab)
ip route show default
Expected output
default via 192.168.1.1 dev eth0
How to read it: Verify default gateway and routes.
Common errors
- Adding routes without documenting
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
ethtool— NIC driver/link settings.
What it does
NIC driver/link settings.
Syntax
ethtool iface
Safe example (lab)
ethtool eth0
Expected output
Speed: 1000Mb/s Duplex: Full
How to read it: Link diagnostics.
Common errors
- Changing settings on production NICs casually
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
tshark— CLI Wireshark — capture/analyze pcaps.
What it does
CLI Wireshark — capture/analyze pcaps.
Syntax
tshark [options]
Important flags / options
-rRead pcap-YDisplay filter
Safe example (lab)
tshark -r lab.pcap -Y 'http.request.method==POST'
Expected output
POST frames listed
How to read it: Automate packet analysis in scripts.
Common errors
- Capturing on wrong interface
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/wireshark · /tools/tcpdump · /tools/netcat
python3 -m http.server— Quick static file server for labs. Bind carefully — serving your home di…
What it does
Quick static file server for labs. Bind carefully — serving your home directory on 0.0.0.0 exposes files to the LAN.
Syntax
python3 -m http.server [port]
Important flags / options
8000Port--bind 127.0.0.1Localhost only
Safe example (lab)
python3 -m http.server 8000 --bind 127.0.0.1
Expected output
Serving HTTP on 127.0.0.1 port 8000 …
How to read it: Only your machine can reach it — safer for local demos.
Common errors
- Serving / as root
- Leaving it on 0.0.0.0 on café Wi‑Fi
Related: /courses/networking-fundamentals · /topics?level=network-security · /courses/cybersecurity-fundamentals · /tools/wireshark · /tools/tcpdump · /tools/netcat
httpie / curl -X— Craft arbitrary HTTP requests. Core skill for API testing on apps you ow…
What it does
Craft arbitrary HTTP requests. Core skill for API testing on apps you own: verbs, auth headers, and content types.
Syntax
curl -X METHOD -H 'Header: v' -d 'body' URL
Important flags / options
-HHeader-dBody-u user:passBasic auth-kInsecure TLS (lab only)
Safe example (lab)
curl -s -X POST http://127.0.0.1:5000/login -H "Content-Type: application/json" -d '{"user":"alice","pass":"lab"}'Expected output
{"token":"eyJhbGciOiJub25lIn0…"}How to read it: Login returned a JWT — next step is decode claims (alg, exp, role) in your lab notes.
Common errors
- -k on production
- Putting real passwords in shell history
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
dig +trace— Follows delegation from root to authoritative servers. Teaches how DNS h…
What it does
Follows delegation from root to authoritative servers. Teaches how DNS hierarchy works and where spoofing/cache issues can appear.
Syntax
dig +trace name
Important flags / options
+traceFull path+dnssecShow DNSSEC bits
Safe example (lab)
dig +trace example.com
Expected output
. … com. … example.com. … A 93.184.215.14
How to read it: Each section is a referral until the final A record — compare with a normal dig for caching differences.
Common errors
- Assuming +trace equals DNSSEC validation
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
wireshark display filters— Display filters hide noise so you can study protocols. Learn a few: ip.a…
What it does
Display filters hide noise so you can study protocols. Learn a few: ip.addr, tcp.port, http.host, dns.qry.name, tls.handshake.type.
Syntax
(in Wireshark) http.request || dns.qry.name
Important flags / options
==EqualscontainsSubstring&& / ||Combine
Safe example (lab)
http.request and http.host == "lab.local"
Expected output
(packet list shows only matching HTTP requests)
How to read it: Focuses the capture on one virtual host during a web lab.
Common errors
- Confusing capture filters (BPF) with display filters
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/wireshark · /tools/tcpdump · /tools/netcat
ping (Windows)— Windows ICMP reachability test. Same idea as Linux ping: prove L3 path a…
What it does
Windows ICMP reachability test. Same idea as Linux ping: prove L3 path and rough latency. Use before blaming the application when “the site is down.”
Syntax
ping [-n count] [-t] host
Important flags / options
-n NSend N echoes then stop-tPing until Ctrl+C-4 / -6Force IPv4 / IPv6
Safe example (lab)
ping -n 4 192.168.56.10
Expected output
Reply from 192.168.56.10: bytes=32 time=1ms TTL=64 … Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
How to read it: 0% loss and ~1 ms RTT → lab VM is up on the Host-Only network. Next step if apps fail: check port with Test-NetConnection.
Common errors
- Assuming timeout means host is powered off (firewall may drop ICMP)
- Leaving ping -t running forever on shared jump hosts
Related: /courses/networking-fundamentals · /topics?level=network-security · /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals · /tools/wireshark · /tools/tcpdump · /tools/netcat
mtr— My Traceroute — live updating combination of ping + traceroute. Best fir…
What it does
My Traceroute — live updating combination of ping + traceroute. Best first tool when users say “the network is flaky” on a path you own (lab or corp WAN).
Syntax
mtr [-r] [-c count] host
Important flags / options
-r / --reportSend report then exit-c NCycles-nNumeric (no DNS)-zAS lookups (when available)
Safe example (lab)
mtr -rwc 20 -n 192.168.56.10
Expected output
HOST: labbox Loss% Snt Last Avg Best Wrst 1.|-- 192.168.56.1 0.0% 20 0.4 0.5 0.3 1.1 2.|-- 192.168.56.10 0.0% 20 0.6 0.7 0.4 1.4
How to read it: Stable low Avg/Wrst and 0% Loss → clean lab path. Rising Loss% on one hop suggests congestion or filtering there.
Common errors
- Installing mtr on production without change control
- Panic on loss at hops that simply do not answer ICMP
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
ping6 / traceroute6— IPv6 reachability and path tools. Dual-stack labs break when v4 works bu…
What it does
IPv6 reachability and path tools. Dual-stack labs break when v4 works but v6 is misconfigured (or vice versa).
Syntax
ping6 -c 3 addr ; traceroute6 addr
Important flags / options
-c NCount (ping6)-nNumeric traceroute6
Safe example (lab)
ping6 -c 3 fe80::1%eth0
Expected output
64 bytes from fe80::1%eth0: icmp_seq=1 ttl=64 time=0.3 ms
How to read it: Link-local reply on eth0 proves L2/L3 IPv6 on that interface — note the %eth0 scope id.
Common errors
- Forgetting the interface scope on link-local addresses
- Assuming no AAAA means IPv6 is “broken” globally
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
ifconfig— Legacy interface config (still on many BSD/old Linux images). Prefer `ip…
What it does
Legacy interface config (still on many BSD/old Linux images). Prefer `ip` on modern Linux, but you must read ifconfig output in older write-ups and CTF boxes.
Syntax
ifconfig [iface]
Important flags / options
ifaceShow one interfaceiface up/downBring interface up/down (needs root)
Safe example (lab)
ifconfig eth0
Expected output
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.56.10 netmask 255.255.255.0 broadcast 192.168.56.255How to read it: eth0 is UP with 192.168.56.10/24 — same story as `ip a`, older syntax.
Common errors
- Teaching only ifconfig on Ubuntu 22+ (use ip)
- ifconfig down on your only SSH interface
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
ip link / ip addr— Brief view of link state and addresses — fastest “cable plugged in?” che…
What it does
Brief view of link state and addresses — fastest “cable plugged in?” check on Linux labs.
Syntax
ip -br link ; ip -br addr
Important flags / options
-brBrief columnslink set eth0 upAdmin-up the NICaddr add …/24 dev eth0Add address
Safe example (lab)
ip -br addr
Expected output
lo UNKNOWN 127.0.0.1/8 ::1/128 eth0 UP 192.168.56.10/24
How to read it: eth0 UP with a /24 address → L2+L3 look healthy; if DOWN, check cable/hypervisor NIC attachment.
Common errors
- Adding secondary IPs without documenting
- Confusing admin DOWN with cable unplugged
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
ip neigh— Neighbor table (ARP/NDP). Stale or wrong MAC mappings appear during ARP …
What it does
Neighbor table (ARP/NDP). Stale or wrong MAC mappings appear during ARP spoof labs and after VM MAC changes.
Syntax
ip neigh show
Important flags / options
showList cacheflush allClear cache (careful)
Safe example (lab)
ip neigh show dev eth0
Expected output
192.168.56.1 lladdr 0a:00:27:00:00:01 REACHABLE
How to read it: Gateway MAC is cached and REACHABLE — good. FAILED/INCOMPLETE means no ARP reply.
Common errors
- Flushing neigh on production during peak
- Trusting ARP on hostile networks
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
nmcli— NetworkManager CLI — inspect and control connections on desktop/server i…
What it does
NetworkManager CLI — inspect and control connections on desktop/server images that use NM. Handy when `ip` shows an address but “the GUI wifi” is wrong.
Syntax
nmcli device status ; nmcli connection show
Important flags / options
device statusDevice overviewconnection up NAMEActivate profiledev wifiWi‑Fi scan (authorized networks)
Safe example (lab)
nmcli device status
Expected output
DEVICE TYPE STATE CONNECTION eth0 ethernet connected Wired connection 1 wlan0 wifi disconnected --
How to read it: Ethernet connected; Wi‑Fi idle — expected for a wired lab VM.
Common errors
- nmcli connection delete on the wrong profile
- Connecting to untrusted SSIDs during a red-team engagement without rules
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
nslookup (Windows)— Built-in Windows DNS query. Use to verify which resolver the OS is using…
What it does
Built-in Windows DNS query. Use to verify which resolver the OS is using after VPN connect.
Syntax
nslookup name [server]
Safe example (lab)
nslookup lab-web.internal 192.168.56.2
Expected output
Server: UnKnown Address: 192.168.56.2 Name: lab-web.internal Address: 192.168.56.10
How to read it: Resolver 192.168.56.2 returned 192.168.56.10 — matches your Host-Only lab DNS.
Common errors
- Stopping at nslookup when dig is available for MX/TXT/CAA
- Ignoring which Server: answered
Related: /courses/networking-fundamentals · /topics?level=network-security · /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals · /tools/wireshark · /tools/tcpdump · /tools/netcat
dig +short A/AAAA— Quick dual-stack checks. Many “works on my phone / fails on laptop” bugs…
What it does
Quick dual-stack checks. Many “works on my phone / fails on laptop” bugs are A vs AAAA differences.
Syntax
dig +short name A ; dig +short name AAAA
Important flags / options
+shortOne-line answers@resolverQuery a specific server
Safe example (lab)
dig +short example.com A; dig +short example.com AAAA
Expected output
93.184.215.14 2606:2800:220:1:248:1893:25c8:1946
How to read it: Both A and AAAA exist — a v6-only path failure would still leave v4 working.
Common errors
- Forgetting +short and drowning in dig verbosity during demos
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
dig TXT / SPF / DMARC— Pull TXT records used in email authentication (SPF, DMARC) and domain ve…
What it does
Pull TXT records used in email authentication (SPF, DMARC) and domain verification. Core for phishing-domain and mail-hardening labs.
Syntax
dig TXT name +short
Important flags / options
TXTText records_dmarc.domainDMARC policy name
Safe example (lab)
dig TXT example.com +short; dig TXT _dmarc.example.com +short
Expected output
"v=spf1 -all" "v=DMARC1; p=reject; …"
How to read it: SPF -all and DMARC reject are strict — good for a domain that should not send mail.
Common errors
- Editing production SPF without a staged rollout
- Assuming dig TXT shows DKIM selectors automatically
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
curl -v / TLS triage— Verbose curl shows DNS → TCP → TLS → HTTP. Use when browsers show generi…
What it does
Verbose curl shows DNS → TCP → TLS → HTTP. Use when browsers show generic errors but you need the failing layer.
Syntax
curl -vI https://host
Important flags / options
-vVerbose-IHeaders only-kInsecure TLS (lab only)--resolve host:443:IPPin IP / bypass DNS
Safe example (lab)
curl -vI https://127.0.0.1:8443/ --resolve lab.local:8443:127.0.0.1 2>&1 | findstr /i "Connected SSL HTTP"
Expected output
* Connected to 127.0.0.1 port 8443 * SSL connection using TLSv1.3 < HTTP/1.1 200 OK
How to read it: TCP connected, TLS negotiated, HTTP 200 — stack is healthy; look at app logic next.
Common errors
- -k on production
- Ignoring certificate verify return code
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
httpie— Human-friendly HTTP client (httpie). Great for API labs: readable JSON, …
What it does
Human-friendly HTTP client (httpie). Great for API labs: readable JSON, sessions, and auth headers without opaque curl strings.
Syntax
http [METHOD] URL field=value
Important flags / options
GET/POSTMethodsAuthorization:Bearer …Header form-vVerbose--sessionPersist cookies
Safe example (lab)
http POST http://127.0.0.1:5000/login username=alice password=lab --print=HhBb
Expected output
POST /login HTTP/1.1
…
HTTP/1.1 200 OK
{
"token": "eyJ…"
}How to read it: Login succeeded and returned a token — decode claims next; do not paste real tokens into public tools.
Common errors
- Putting production secrets in shell history
- Assuming httpie is installed on every jump box
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
wget spider— Check whether a URL responds without downloading the body — useful for m…
What it does
Check whether a URL responds without downloading the body — useful for monitoring lab endpoints and mirror health.
Syntax
wget --spider -S URL
Important flags / options
--spiderDo not save-SShow server response-O-Write body to stdout
Safe example (lab)
wget --spider -S http://127.0.0.1:8000/ 2>&1 | Select-String -Pattern 'HTTP|Length'
Expected output
HTTP/1.0 200 OK Length: unspecified
How to read it: Endpoint answers 200 — good smoke test before opening a browser.
Common errors
- Spidering sites out of scope
- Following redirects onto attacker-controlled hosts blindly
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
telnet— Legacy interactive TCP client. Still useful as a “is this port open and …
What it does
Legacy interactive TCP client. Still useful as a “is this port open and speaking cleartext?” probe (SMTP banner, HTTP). Prefer nc/Test-NetConnection when available.
Syntax
telnet host port
Safe example (lab)
telnet 127.0.0.1 80
Expected output
Connected to 127.0.0.1. Escape character is '^]'.
How to read it: TCP connect succeeded on port 80 — type a raw HTTP request or Ctrl+] quit. Connection refused means nothing listens.
Common errors
- Leaving telnet enabled as a service (telnetd) on servers
- Sending credentials in cleartext telnet sessions
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
netcat (nc)— Swiss-army TCP/UDP client/server for labs: port checks, simple transfers…
What it does
Swiss-army TCP/UDP client/server for labs: port checks, simple transfers, banner grabs. Same family as the shorter `nc` entry — focus here on troubleshooting patterns.
Syntax
nc [options] host port
Important flags / options
-zvScan without sending data (verbose)-l -p PORTListen-uUDP-w NTimeout seconds
Safe example (lab)
nc -zv 192.168.56.10 22 80 443
Expected output
Connection to 192.168.56.10 22 port [tcp/ssh] succeeded! nc: connect to … 80 failed: Connection refused Connection to … 443 succeeded!
How to read it: SSH and HTTPS open; HTTP closed — aligns with a TLS-only lab web server.
Common errors
- nc -l on 0.0.0.0 in hostile networks
- Using netcat reverse shells outside authorized labs
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
ss troubleshooting— Modern socket view for “what is listening?” and “who am I connected to?”…
What it does
Modern socket view for “what is listening?” and “who am I connected to?” Faster and more accurate than netstat on current Linux.
Syntax
ss -tulpn ; ss -tn state established
Important flags / options
-tulpnTCP/UDP listen + processesstate establishedActive connectionsdst :443Filter destination port
Safe example (lab)
ss -tulpn | findstr /i ":22 :80 :443"
Expected output
LISTEN 0 128 0.0.0.0:22 … users:(("sshd"…))
LISTEN 0 128 127.0.0.1:80 …How to read it: SSH on all interfaces; HTTP only on localhost — HTTP is not exposed to the LAN (good unless you intended otherwise).
Common errors
- Reading LISTEN on 127.0.0.1 as “open to the world”
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
netstat -plant (Linux)— Classic listening-port snapshot. Deprecated on many distros but still in…
What it does
Classic listening-port snapshot. Deprecated on many distros but still in exam objectives and old runbooks — know how to read it and how to migrate to ss.
Syntax
netstat -tulpn
Important flags / options
-tulpnTCP/UDP listen + PID/program-anAll numeric
Safe example (lab)
sudo netstat -tulpn | head
Expected output
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 812/sshd
How to read it: sshd owns *:22 — same conclusion as ss -tlnp.
Common errors
- Assuming netstat exists in minimal containers
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
iptables -L -n -v— List filter rules with packet counters. First stop when “ping works but …
What it does
List filter rules with packet counters. First stop when “ping works but port X does not” on legacy Linux firewalls.
Syntax
sudo iptables -L -n -v
Important flags / options
-LList-nNumeric-vCounters-t natNAT table
Safe example (lab)
sudo iptables -L INPUT -n -v
Expected output
Chain INPUT (policy DROP 0 packets, 0 bytes) pkts bytes target prot … 120 9600 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
How to read it: Default DROP with SSH allowed — counters prove SSH traffic matched the accept rule.
Common errors
- iptables -F over SSH (lockout)
- Forgetting IPv6 ip6tables
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
sftp— Interactive file transfer over SSH. Useful when you need directory listi…
What it does
Interactive file transfer over SSH. Useful when you need directory listing and partial uploads without full scp paths memorized.
Syntax
sftp user@host
Important flags / options
ls/cd/put/getInteractive commands-i keyIdentity
Safe example (lab)
sftp -i ~/.ssh/lab_ed25519 alice@192.168.56.10
Expected output
Connected to 192.168.56.10. sftp> put report.pdf Uploading report.pdf to /home/alice/report.pdf
How to read it: Interactive session works — same auth as SSH; firewall must allow 22/tcp.
Common errors
- Leaving SFTP chroots world-writable
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
tcpdump port filter— Confirm packets arrive when app logs are silent. Classic: SYN seen but n…
What it does
Confirm packets arrive when app logs are silent. Classic: SYN seen but no SYN-ACK → host firewall or service down.
Syntax
sudo tcpdump -ni iface port PORT -c N
Important flags / options
-nNo DNS-iInterfaceport 443BPF filter-w file.pcapSave for Wireshark
Safe example (lab)
sudo tcpdump -ni eth0 port 22 -c 5
Expected output
IP 192.168.56.50.51234 > 192.168.56.10.22: Flags [S] IP 192.168.56.10.22 > 192.168.56.50.51234: Flags [S.]
How to read it: SYN and SYN-ACK exchanged — TCP handshake for SSH is healthy on the wire.
Common errors
- Capturing on the wrong bridge in nested virt
- Writing pcaps with secrets to shared folders
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/wireshark · /tools/tcpdump · /tools/netcat
connectivity checklist— Study workflow (not a single binary): (1) link/IP with ip/ifconfig/ipcon…
What it does
Study workflow (not a single binary): (1) link/IP with ip/ifconfig/ipconfig (2) gateway ping (3) DNS dig/nslookup (4) TCP Test-NetConnection/nc (5) app curl/http (6) path mtr/traceroute if lossy. Use only on networks you own.
Syntax
# mental model: L1→L7
Important flags / options
L1/L2Cable, link state, ARPL3IP, route, pingL4ports ss/ncL7HTTP/TLS/SSH
Safe example (lab)
ip -br addr; ping -c 2 192.168.56.1; dig +short lab-web.internal @192.168.56.2; nc -zv 192.168.56.10 22; curl -I http://192.168.56.10/
Expected output
(each tool prints its own success/failure)
How to read it: Run top-down: if ping to gateway fails, do not debug HTTP yet. Document which layer first failed.
Common errors
- Skipping DNS when the symptom is a hostname
- Changing three things at once
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
firewall-cmd— firewalld CLI (RHEL/CentOS/Fedora). Parallel to ufw/iptables — know whic…
What it does
firewalld CLI (RHEL/CentOS/Fedora). Parallel to ufw/iptables — know which stack your lab distro uses.
Syntax
firewall-cmd --state ; firewall-cmd --list-all
Important flags / options
--stateRunning?--list-allZones/ports--add-port=443/tcpOpen port (runtime)--permanentPersist across reboot
Safe example (lab)
sudo firewall-cmd --list-all
Expected output
public target: default services: ssh ports:
How to read it: Only ssh service is allowed in public zone — add http/https deliberately for web labs.
Common errors
- Opening ports permanently without --reload
- Mixing firewalld and raw iptables unexpectedly
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
nslookup set type— Interactive nslookup record-type switching when dig is missing (common o…
What it does
Interactive nslookup record-type switching when dig is missing (common on locked Windows images).
Syntax
nslookup → set type=MX
Important flags / options
set type=MXMail exchangersset type=NSName serversserver IPChange resolver
Safe example (lab)
nslookup > set type=MX > example.com
Expected output
example.com MX preference = 10, mail exchanger = mail.example.com
How to read it: Mail flows to mail.example.com at preference 10 — compare with dig MX +short.
Common errors
- Leaving interactive nslookup open in shared screen sessions
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
curl timing— Break down where latency lives: DNS vs TCP vs TLS vs server think time. …
What it does
Break down where latency lives: DNS vs TCP vs TLS vs server think time. Perfect for “site is slow” tickets on systems you own.
Syntax
curl -o NUL -s -w "dns:%{time_namelookup} connect:%{time_connect} tls:%{time_appconnect} ttfb:%{time_starttransfer} total:%{time_total}\n" URLImportant flags / options
-wWrite-out format-o NUL / -o /dev/nullDiscard body-sSilent progress
Safe example (lab)
curl -o /dev/null -s -w "dns:%{time_namelookup} connect:%{time_connect} tls:%{time_appconnect} ttfb:%{time_starttransfer} total:%{time_total}\n" https://example.com/Expected output
dns:0.012 connect:0.045 tls:0.120 ttfb:0.210 total:0.215
How to read it: TLS and TTFB dominate — optimize certificate/chain and origin app, not just DNS.
Common errors
- Comparing timings across different networks without noting Wi‑Fi vs ethernet
Related: /courses/networking-fundamentals · /topics?level=network-security · /tools/wireshark · /tools/tcpdump · /tools/netcat
Nmap reference (4)
Authorized host/service discovery — scanme.nmap.org or your lab only.
Tools: nmap · Lessons: /courses/ethical-hacking-penetration-testing · /tools/nmap
nmap— Port/service discovery and scriptable checks. Legal/ethical boundary: on…
What it does
Port/service discovery and scriptable checks. Legal/ethical boundary: only scan systems you own or have written authorization for (plus official scanme.nmap.org).
Syntax
nmap [options] target
Important flags / options
-sVService/version detection-sCDefault NSE scripts-pPort list or -p--oA nameSave .nmap/.xml/.gnmap-PnSkip host discovery
Safe example (lab)
nmap -sV localhost
Expected output
22/tcp open ssh OpenSSH 9.6 8000/tcp open http SimpleHTTPServer
How to read it: Two open services with versions — feed these into CVE research for your lab hardening notes.
Common errors
- Unauthorized internet scanning
- -p- + aggressive timing against fragile prod
Related: /courses/ethical-hacking-penetration-testing · /tools/nmap · /tools/nmap
nmap -sC -sV— Default script scan (-sC) plus version detection (-sV). Richer than a ba…
What it does
Default script scan (-sC) plus version detection (-sV). Richer than a bare port list — still only on authorized lab targets.
Syntax
nmap -sC -sV -p- target
Important flags / options
-sCDefault NSE scripts-sVVersions-p-All TCP ports-oASave all formats
Safe example (lab)
nmap -sC -sV -p 22,80 127.0.0.1
Expected output
22/tcp open ssh OpenSSH 9.6 80/tcp open http Apache httpd 2.4.57
How to read it: Versions feed CVE research; scripts may show http-title or ssh algorithms.
Common errors
- -p- against production without scope
- Trusting NSE output as exploit confirmation
Related: /courses/ethical-hacking-penetration-testing · /tools/nmap · /tools/nmap
nmap host discovery— Ping-scan / host discovery without port scanning. Map which lab VMs are …
What it does
Ping-scan / host discovery without port scanning. Map which lab VMs are up on a subnet you own.
Syntax
nmap -sn net/mask
Important flags / options
-snNo port scan-PS22,80TCP SYN ping set-PRARP ping (local LAN)
Safe example (lab)
nmap -sn 192.168.56.0/24
Expected output
Nmap scan report for 192.168.56.1 Host is up. Nmap scan report for 192.168.56.10 Host is up.
How to read it: Two hosts answered — gateway and your lab VM. Next: targeted -sV on .10 only.
Common errors
- -sn against someone else’s /16
- Treating “down” as powered-off when ICMP is filtered
Related: /courses/ethical-hacking-penetration-testing · /tools/nmap · /tools/nmap
nmap port + scripts (lab)— SYN scan + versions + default scripts on common ports. Standard lab reco…
What it does
SYN scan + versions + default scripts on common ports. Standard lab recon pattern — still requires written authorization outside your VMs.
Syntax
nmap -sS -sV -sC -p 22,80,443 target
Important flags / options
-sSSYN scan (root/cap)-sTConnect scan (no raw sockets)-sVVersions-sCDefault scripts
Safe example (lab)
nmap -sT -sV -p 22,80 127.0.0.1
Expected output
22/tcp open ssh OpenSSH 9.6 80/tcp closed http
How to read it: SSH open locally; HTTP closed — matches earlier nc/ss results.
Common errors
- -A -p- on fragile production
- Skipping -oA and losing evidence
Related: /courses/ethical-hacking-penetration-testing · /tools/nmap · /tools/nmap
Wireshark / capture filters (0)
Display filters and tcpdump BPF for traffic you are allowed to inspect.
Tools: wireshark · tcpdump · Lessons: /courses/networking-fundamentals · /tools/wireshark
No dedicated command entries yet — open linked tools for usage examples.
Burp workflows (3)
Proxy / Repeater patterns — Community Edition against lab apps.
Tools: burp · zap · Lessons: /courses/web-application-security · /tools/burp
burp-proxy-intercept— Capture HTTP(S) between your browser and an authorized lab app. Scope mu…
What it does
Capture HTTP(S) between your browser and an authorized lab app. Scope must be your Juice Shop / DVWA / PortSwigger lab only.
Syntax
Burp → Proxy → Intercept on → browse lab app
Important flags / options
Intercept onHold requests for reviewTarget → ScopeRestrict to authorized hostsForwardRelease request after inspection
Safe example (lab)
Set proxy 127.0.0.1:8080 → open local Juice Shop → Intercept a GET /
Expected output
GET / HTTP/1.1 Host: 127.0.0.1:3000 Cookie: …
How to read it: You see method, path, Host, and cookies — confirm Host is in scope before Forward.
Common errors
- Leaving Intercept on and wondering why the browser hangs
- Testing production without written auth
Related: /courses/web-application-security · /tools/burp · /courses/ethical-hacking-penetration-testing · /tools/burp · /tools/zap · /tools/hashcat · /tools/john · /tools/openssl
burp-repeater— Manually mutate a single request to probe authZ/IDOR on lab apps. Docume…
What it does
Manually mutate a single request to probe authZ/IDOR on lab apps. Document each change for the report.
Syntax
Right-click request → Send to Repeater → edit → Send
Important flags / options
SendFire the edited requestHistoryCompare prior responses
Safe example (lab)
Send lab /api/orders/1001 to Repeater → change id to 1002 as user A
Expected output
HTTP/1.1 200 OK
{"orderId":1002,"owner":"userB"}How to read it: Foreign object returned → IDOR candidate for the lab write-up (authorized app only).
Common errors
- Intruder blasting login on real sites
- Ignoring TLS/cert warnings on non-lab hosts
Related: /courses/web-application-security · /tools/burp · /courses/ethical-hacking-penetration-testing · /tools/burp · /tools/zap · /tools/hashcat · /tools/john · /tools/openssl
burp-decoder— Transform Base64/URL/HTML entities while analyzing lab traffic — never p…
What it does
Transform Base64/URL/HTML entities while analyzing lab traffic — never paste production secrets into random online decoders.
Syntax
Burp → Decoder → paste → Encode/Decode
Important flags / options
Smart decodeAuto-detect common encodingsHashLocal hash for lab password demos
Safe example (lab)
Decode lab cookie value that looks like Base64
Expected output
user=alice&role=user
How to read it: Readable claims — compare to JWT lessons; do not treat encoding as encryption.
Common errors
- Assuming Base64 is secret
- Uploading customer tokens to third-party sites
Related: /courses/web-application-security · /tools/burp · /courses/ethical-hacking-penetration-testing · /tools/burp · /tools/zap · /tools/hashcat · /tools/john · /tools/openssl
Windows CMD (18)
Classic cmd.exe utilities for Windows lab VMs.
Lessons: /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals
dir— Lists directory contents (cmd).
What it does
Lists directory contents (cmd).
Syntax
dir [path] [options]
Important flags / options
/aInclude hidden/sRecursive
Safe example (lab)
dir /a C:\Users
Expected output
…file listing…
How to read it: Windows analogue to ls for quick enumeration.
Common errors
- Assuming PowerShell-only environments
Related: /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals
ipconfig— Shows IP configuration.
What it does
Shows IP configuration.
Syntax
ipconfig [/all]
Important flags / options
/allFull details/flushdnsClear DNS cache
Safe example (lab)
ipconfig /all
Expected output
IPv4 Address . . : 192.168.1.50
How to read it: Adapter addresses, gateways, DNS servers.
Common errors
- Using only /all screenshots without noting DHCP vs static
Related: /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals
whoami /groups— Shows current user group memberships.
What it does
Shows current user group memberships.
Syntax
whoami /groups
Important flags / options
/privPrivileges/allFull
Safe example (lab)
whoami /groups
Expected output
…BUILTIN\Administrators…
How to read it: Check effective privileges after token changes.
Common errors
- Assuming UI 'admin' equals high integrity token
Related: /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals
icacls— View/modify NTFS ACLs.
What it does
View/modify NTFS ACLs.
Syntax
icacls path
Important flags / options
/grantAdd ACE/removeRemove
Safe example (lab)
icacls C:\lab\share
Expected output
…NT AUTHORITY\SYSTEM:(F)…
How to read it: Permission review for shares and service paths.
Common errors
- Granting Everyone:F to 'fix' access
Related: /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals
sc query— Query Windows services (cmd).
What it does
Query Windows services (cmd).
Syntax
sc query [service]
Safe example (lab)
sc query wuauserv
Expected output
STATE : 4 RUNNING
How to read it: Service state during hardening/IR.
Common errors
- Stopping update services permanently without change control
Related: /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals
reg query— Read registry values from cmd.
What it does
Read registry values from cmd.
Syntax
reg query HKLM\…
Safe example (lab)
reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Expected output
…autoruns…
How to read it: Persistence checks (pair with Autoruns in labs).
Common errors
- Editing HKLM without backup/change ticket
Related: /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals
Select-String— PowerShell grep. Search logs and configs for IOCs without leaving the Wi…
What it does
PowerShell grep. Search logs and configs for IOCs without leaving the Windows admin toolkit.
Syntax
Select-String -Path files -Pattern regex
Important flags / options
-PathFiles/glob-PatternRegex-ContextLines around match
Safe example (lab)
Select-String -Path C:\lab\logs\*.log -Pattern 'Failed password|4625'
Expected output
auth.log:12:Failed password for …
How to read it: Matched failure patterns across lab logs — start timeline building from these hits.
Common errors
- Scanning entire C:\ without filters
- Case-sensitive surprises in regex
Related: /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals
net user / net localgroup— Classic cmd enumeration still seen in malware and older runbooks. Know b…
What it does
Classic cmd enumeration still seen in malware and older runbooks. Know both cmd and PowerShell forms.
Syntax
net user ; net localgroup Administrators
Important flags / options
net user nameUser detailnet localgroupList groups
Safe example (lab)
net localgroup Administrators
Expected output
Members --------------- alice backup_admin
How to read it: Same story as Get-LocalGroupMember — unexpected admin is a finding.
Common errors
- net user evil /add without authorization
Related: /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals
schtasks— Lists scheduled tasks — common persistence. Compare to baseline after ma…
What it does
Lists scheduled tasks — common persistence. Compare to baseline after malware labs.
Syntax
schtasks /query /fo LIST /v
Important flags / options
/queryList/CreateCreate (admin)/fo LISTReadable format
Safe example (lab)
schtasks /query /fo LIST /v | findstr /i "TaskName Author Run"
Expected output
TaskName: \Lab\Updater Author: LAB\alice Run: powershell -enc …
How to read it: Encoded PowerShell in a task is suspicious — decode in a sandbox.
Common errors
- Disabling vendor update tasks permanently without change control
Related: /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals
certutil -hashfile— Built-in hashing without installing tools. Compare to vendor checksums b…
What it does
Built-in hashing without installing tools. Compare to vendor checksums before running installers.
Syntax
certutil -hashfile file SHA256
Important flags / options
SHA256AlgorithmMD5Legacy (avoid for security)
Safe example (lab)
certutil -hashfile .\installer.msi SHA256
Expected output
SHA256 hash of installer.msi: AB12CD…
How to read it: Match this to the vendor’s published hash before install.
Common errors
- Trusting hashes posted on the same shady download page
Related: /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals
Test-NetConnection— PowerShell connectivity test (ICMP + optional TCP). Replaces many ad-hoc…
What it does
PowerShell connectivity test (ICMP + optional TCP). Replaces many ad-hoc telnet checks.
Syntax
Test-NetConnection host -Port port
Important flags / options
-PortTCP port-TraceRoutePath-InformationLevel DetailedMore fields
Safe example (lab)
Test-NetConnection 127.0.0.1 -Port 445
Expected output
TcpTestSucceeded : True
How to read it: SMB port open locally — expected on many Windows labs; lock down on exposed hosts.
Common errors
- Interpreting ICMP failure as 'host down' when only ICMP is blocked
Related: /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals
tracert— Windows traceroute — lists hops to a destination. Use when latency is hi…
What it does
Windows traceroute — lists hops to a destination. Use when latency is high or a path suddenly changes after VPN/firewall changes.
Syntax
tracert [-d] host
Important flags / options
-dDo not resolve hostnames-h NMax hops-4 / -6Address family
Safe example (lab)
tracert -d 1.1.1.1
Expected output
1 1 ms 1 ms 1 ms 192.168.1.1 2 8 ms 7 ms 8 ms 10.0.0.1 3 … 1.1.1.1
How to read it: Hop 1 is your router; later hops are ISP/core. Request timed out on a hop often means ICMP rate-limit, not a hard failure.
Common errors
- Treating every * as a broken router
- Running endless traces against third-party infrastructure
Related: /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals
pathping— Combines traceroute with per-hop statistics (Windows). Slower than trace…
What it does
Combines traceroute with per-hop statistics (Windows). Slower than tracert but better for spotting lossy hops on a path you are authorized to test.
Syntax
pathping [-n] host
Important flags / options
-nNo DNS-q NQueries per hop
Safe example (lab)
pathping -n 192.168.56.1
Expected output
Computing statistics for 25 seconds… Hop RTT Lost/Sent = Pct Address 0 0/100 = 0% your-pc 1 1ms 0/100 = 0% 192.168.56.1
How to read it: Percent loss near hop 1 points at the LAN/gateway; loss only at the last hop often means the target rate-limits ICMP.
Common errors
- Running pathping on every ticket (it is slow)
- Misreading mid-path * as packet loss
Related: /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals
hostname (Windows)— Shows computer name; PowerShell can show address list. Useful when RDP t…
What it does
Shows computer name; PowerShell can show address list. Useful when RDP targets the wrong name after a clone.
Syntax
hostname ; [System.Net.Dns]::GetHostByName(($env:computerName))
Safe example (lab)
hostname
Expected output
LAB-WIN11
How to read it: NetBIOS/computer name is LAB-WIN11 — compare with DNS A record in your lab zone.
Common errors
- Renaming domain-joined machines outside the proper domain process
Related: /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals
Test-NetConnection (detailed)— PowerShell connectivity Swiss army knife: ping + TCP + optional tracerou…
What it does
PowerShell connectivity Swiss army knife: ping + TCP + optional traceroute. Prefer this over telnet on modern Windows.
Syntax
Test-NetConnection host -Port port -InformationLevel Detailed
Important flags / options
-PortTCP port-TraceRouteShow path-InformationLevel DetailedFull object
Safe example (lab)
Test-NetConnection 192.168.56.10 -Port 22 -InformationLevel Detailed
Expected output
ComputerName : 192.168.56.10 RemotePort : 22 TcpTestSucceeded : True PingSucceeded : True
How to read it: Both ICMP and TCP/22 work — SSH should be reachable; if ssh.exe still fails, check keys/algorithms next.
Common errors
- Assuming PingSucceeded false means host is offline
Related: /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals
arp -a (Windows)— Windows ARP cache dump. Compare MAC vendors when hunting duplicate IPs o…
What it does
Windows ARP cache dump. Compare MAC vendors when hunting duplicate IPs or lab gateway changes.
Syntax
arp -a
Important flags / options
-aDisplay-dDelete entry
Safe example (lab)
arp -a | findstr 192.168.56
Expected output
192.168.56.1 0a-00-27-00-00-01 dynamic 192.168.56.10 08-00-27-aa-bb-cc dynamic
How to read it: Gateway and lab VM MACs look like VirtualBox OUIs — expected in a Host-Only lab.
Common errors
- Static ARP without change tickets
- Trusting ARP on public Wi‑Fi
Related: /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals
route print— Windows routing table. When VPN splits traffic wrong, this shows which g…
What it does
Windows routing table. When VPN splits traffic wrong, this shows which gateway owns 0.0.0.0 and specific prefixes.
Syntax
route print
Important flags / options
-4 / -6Address familyadd/deleteModify (admin)
Safe example (lab)
route print -4 | findstr /i "0.0.0.0 192.168.56"
Expected output
0.0.0.0 0.0.0.0 192.168.1.1 … 192.168.56.0 255.255.255.0 On-link 192.168.56.50 …
How to read it: Default via home router; lab /24 is on-link on the Host-Only adapter — good split.
Common errors
- route delete 0.0.0.0 remotely without console access
Related: /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals
Resolve-DnsName— PowerShell DNS lookups with typed records — cleaner scripting than parsi…
What it does
PowerShell DNS lookups with typed records — cleaner scripting than parsing nslookup text.
Syntax
Resolve-DnsName name -Type A
Important flags / options
-TypeA/AAAA/MX/TXT/CNAME-ServerResolver IP-DnsOnlySkip LLMNR/NetBIOS
Safe example (lab)
Resolve-DnsName lab-web.internal -Type A -Server 192.168.56.2
Expected output
Name Type TTL Section IPAddress lab-web… A 30 Answer 192.168.56.10
How to read it: Lab DNS returns the expected A record from your private resolver.
Common errors
- Forgetting -Server and hitting public DNS for internal names
Related: /topics?level=os-fundamentals · /courses/cybersecurity-fundamentals
PowerShell (11)
Modern Windows automation — lab and admin scripts you own.
Lessons: /topics?level=os-fundamentals
Get-ChildItem— PowerShell directory listing.
What it does
PowerShell directory listing.
Syntax
Get-ChildItem [-Force] [path]
Important flags / options
-ForceShow hidden-RecurseWalk tree
Safe example (lab)
Get-ChildItem -Force $env:USERPROFILE
Expected output
…items…
How to read it: Prefer PowerShell on modern Windows SOC/IR work.
Common errors
- Forgetting -Force hides dot-like items
Related: /topics?level=os-fundamentals
Get-Process— Lists running processes in PowerShell.
What it does
Lists running processes in PowerShell.
Syntax
Get-Process [name]
Important flags / options
| SortSort by CPU/WS
Safe example (lab)
Get-Process | Sort-Object CPU -Descending
Expected output
…top CPU…
How to read it: Quick process triage before deep EDR.
Common errors
- Stopping critical system processes
Related: /topics?level=os-fundamentals
Get-WinEvent— Query Windows Event Log.
What it does
Query Windows Event Log.
Syntax
Get-WinEvent -FilterHashtable @{…}Important flags / options
LogNamee.g. SecurityIdEvent ID
Safe example (lab)
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4625} -MaxEvents 20Expected output
…failed logons…
How to read it: Modern replacement for many wevtutil workflows.
Common errors
- Huge unfiltered queries on busy DCs
Related: /topics?level=os-fundamentals
Get-NetTCPConnection— PowerShell view of TCP connections.
What it does
PowerShell view of TCP connections.
Syntax
Get-NetTCPConnection
Important flags / options
-State ListenListeners
Safe example (lab)
Get-NetTCPConnection -State Listen
Expected output
LocalAddress LocalPort State …
How to read it: Find unexpected listening ports.
Common errors
- Running without admin on locked-down hosts
Related: /topics?level=os-fundamentals
Get-FileHash— Integrity hashing for files.
What it does
Integrity hashing for files.
Syntax
Get-FileHash -Algorithm SHA256 file
Important flags / options
SHA256Common algo
Safe example (lab)
Get-FileHash .\sample.exe -Algorithm SHA256
Expected output
Algorithm Hash Path
How to read it: Compare to known-good hashes.
Common errors
- Hashing huge files over slow shares
Related: /topics?level=os-fundamentals
Get-AuthenticodeSignature— Check Authenticode signature status.
What it does
Check Authenticode signature status.
Syntax
Get-AuthenticodeSignature file.exe
Safe example (lab)
Get-AuthenticodeSignature .\update.exe
Expected output
Status: Valid
How to read it: Detect unsigned or tampered binaries.
Common errors
- Trusting Valid without checking publisher
Related: /topics?level=os-fundamentals
Get-LocalUser / Get-LocalGroup— Enumerate local accounts and group membership. Look for unexpected admin…
What it does
Enumerate local accounts and group membership. Look for unexpected admins after a lab compromise exercise.
Syntax
Get-LocalUser ; Get-LocalGroupMember Administrators
Important flags / options
Get-LocalUserUsersGet-LocalGroupMemberMembers of a group
Safe example (lab)
Get-LocalGroupMember Administrators
Expected output
ObjectClass Name ---------- ---- User LAB\alice User LAB\backup_admin
How to read it: backup_admin in Administrators deserves explanation in your hardening checklist.
Common errors
- Removing built-in Administrator carelessly
Related: /topics?level=os-fundamentals
Get-MpComputerStatus— Defender status: real-time protection, signatures age, last scan. Baseli…
What it does
Defender status: real-time protection, signatures age, last scan. Baseline for endpoint hardening labs.
Syntax
Get-MpComputerStatus
Important flags / options
AMServiceEnabledService on?AntivirusSignatureLastUpdatedDefs freshness
Safe example (lab)
Get-MpComputerStatus | Select AMServiceEnabled, RealTimeProtectionEnabled, AntivirusSignatureLastUpdated
Expected output
AMServiceEnabled : True RealTimeProtectionEnabled : True AntivirusSignatureLastUpdated : 2024-06-01 …
How to read it: Protection is on and signatures are recent — good lab baseline.
Common errors
- Disabling Defender 'to make the lab easier' on a host you still browse with
Related: /topics?level=os-fundamentals
Get-DnsClientCache— View/clear the Windows DNS client cache when a record changed but the PC…
What it does
View/clear the Windows DNS client cache when a record changed but the PC still hits the old IP.
Syntax
Get-DnsClientCache ; Clear-DnsClientCache
Important flags / options
Clear-DnsClientCacheFlushipconfig /flushdnsClassic equivalent
Safe example (lab)
Get-DnsClientCache | Where-Object Entry -like '*lab*' | Format-Table -AutoSize
Expected output
Entry RecordType Section TimeToLive Data lab-web.internal A Answer 42 192.168.56.10
How to read it: Cached A record still valid — if the server IP moved, flush and resolve again.
Common errors
- Flushing DNS as a cargo-cult fix without checking authoritative dig
Related: /topics?level=os-fundamentals
Get-NetRoute— PowerShell routing view — filterable objects instead of raw route print …
What it does
PowerShell routing view — filterable objects instead of raw route print text.
Syntax
Get-NetRoute -AddressFamily IPv4 | Format-Table -AutoSize
Important flags / options
-DestinationPrefixFilter-InterfaceAliasPer NIC
Safe example (lab)
Get-NetRoute -DestinationPrefix '0.0.0.0/0'
Expected output
ifIndex DestinationPrefix NextHop RouteMetric 12 0.0.0.0/0 192.168.1.1 25
How to read it: Default route metric 25 via 192.168.1.1 — if two defaults exist, lower metric wins.
Common errors
- Adding persistent routes that survive reboot without documentation
Related: /topics?level=os-fundamentals
Get-NetFirewallRule— Inspect enabled Windows Firewall rules when a lab port is blocked locall…
What it does
Inspect enabled Windows Firewall rules when a lab port is blocked locally but ss/netstat shows LISTENING.
Syntax
Get-NetFirewallRule -Enabled True | …
Important flags / options
-DisplayNameFilter by name-Direction InboundInbound onlyGet-NetFirewallPortFilterPort details
Safe example (lab)
Get-NetFirewallRule -Enabled True -Direction Inbound | Get-NetFirewallPortFilter | Where-Object LocalPort -eq 3389
Expected output
Protocol LocalPort TCP 3389
How to read it: An inbound rule references 3389 — confirm Action Allow and RemoteAddress scope next.
Common errors
- Disabling Windows Firewall entirely on laptops that leave the lab
Related: /topics?level=os-fundamentals
Python (0)
Quick scripting patterns used in security labs.
Lessons: /courses/cybersecurity-fundamentals
No dedicated command entries yet — open linked tools for usage examples.
Git (1)
Version control hygiene for security notes and code reviews.
Lessons: /courses/devsecops · /courses/web-application-security
git log— Review history — also useful when hunting leaked secrets.
What it does
Review history — also useful when hunting leaked secrets.
Syntax
git log --oneline
Important flags / options
-pPatch-SPickaxe search
Safe example (lab)
git log -S 'AKIA' --oneline
Expected output
…commits mentioning pattern…
How to read it: Secret scanning starts with history awareness.
Common errors
- Force-pushing to hide secrets instead of rotating
Related: /courses/devsecops · /courses/web-application-security · /courses/ethical-hacking-penetration-testing · /tools/hashcat · /tools/john · /tools/openssl
Cloud CLI (13)
AWS / Azure / GCP CLIs against sandbox accounts you control.
Tools: prowler · Lessons: /courses/cloud-security · /tools
aws iam— Manage AWS IAM (authorized accounts only).
What it does
Manage AWS IAM (authorized accounts only).
Syntax
aws iam <command>
Important flags / options
list-usersUsersget-account-authorization-detailsPolicy dump
Safe example (lab)
aws iam list-users --max-items 5
Expected output
Users: [ … ]
How to read it: Inventory identities in sandbox.
Common errors
- Running on production without change control
Related: /courses/cloud-security · /tools · /tools/prowler
aws sts— Show current AWS credential identity.
What it does
Show current AWS credential identity.
Syntax
aws sts get-caller-identity
Safe example (lab)
aws sts get-caller-identity
Expected output
Account: 123456789012 Arn: …
How to read it: Confirm which principal you are using.
Common errors
- Using root access keys
Related: /courses/cloud-security · /tools · /tools/prowler
aws s3— List S3 buckets/objects (read-only recon).
What it does
List S3 buckets/objects (read-only recon).
Syntax
aws s3 ls s3://bucket
Important flags / options
lsListapi get-bucket-aclACL review
Safe example (lab)
aws s3 ls
Expected output
2024-01-01 12:00:00 my-bucket
How to read it: Find exposed buckets in your account.
Common errors
- Modifying buckets without backup
Related: /courses/cloud-security · /tools · /tools/prowler
az account— Show active Azure subscription.
What it does
Show active Azure subscription.
Syntax
az account show
Safe example (lab)
az account show
Expected output
name: LabSubscription …
How to read it: Confirm subscription context.
Common errors
- Wrong subscription selected
Related: /courses/cloud-security · /tools · /tools/prowler
az role assignment— List Azure RBAC assignments.
What it does
List Azure RBAC assignments.
Syntax
az role assignment list
Safe example (lab)
az role assignment list --assignee user@corp.com
Expected output
Role assignments …
How to read it: Audit excessive RBAC.
Common errors
- Assigning Owner at root scope
Related: /courses/cloud-security · /tools · /tools/prowler
gcloud iam— View GCP IAM bindings.
What it does
View GCP IAM bindings.
Syntax
gcloud projects get-iam-policy PROJECT
Safe example (lab)
gcloud projects get-iam-policy my-lab-proj
Expected output
bindings: …
How to read it: Find allUsers/allAuthenticatedUsers.
Common errors
- Granting roles/owner casually
Related: /courses/cloud-security · /tools · /tools/prowler
kubectl get— List Kubernetes resources.
What it does
List Kubernetes resources.
Syntax
kubectl get pods -A
Important flags / options
-AAll namespaces-o wideExtra columns
Safe example (lab)
kubectl get pods -A
Expected output
NAMESPACE NAME READY STATUS …
How to read it: Inventory workloads.
Common errors
- kubectl get secrets -o yaml in shared terminals
Related: /courses/cloud-security · /tools · /commands#docker · /tools/prowler · /tools/trivy
kubectl describe— Detailed pod events and spec.
What it does
Detailed pod events and spec.
Syntax
kubectl describe pod name
Safe example (lab)
kubectl describe pod web-7f8c…
Expected output
Events: … Limits: …
How to read it: Debug crashloops and misconfig.
Common errors
- Describing in prod without ticket
Related: /courses/cloud-security · /tools · /commands#docker · /tools/prowler · /tools/trivy
kubectl auth can-i— Check RBAC permissions for current user.
What it does
Check RBAC permissions for current user.
Syntax
kubectl auth can-i --list
Safe example (lab)
kubectl auth can-i create secrets --namespace prod
Expected output
yes/no
How to read it: Verify least privilege.
Common errors
- Assuming cluster-admin is normal
Related: /courses/cloud-security · /tools · /commands#docker · /tools/prowler · /tools/trivy
aws ec2 describe-instances— Inventory EC2 in an account you control. Look for public IPs, missing ta…
What it does
Inventory EC2 in an account you control. Look for public IPs, missing tags, and overly open security groups.
Syntax
aws ec2 describe-instances [--filters …]
Important flags / options
--queryJMSE projection--filtersNarrow results
Safe example (lab)
aws ec2 describe-instances --query 'Reservations[].Instances[].{Id:InstanceId,IP:PublicIpAddress,SG:SecurityGroups}' --output tableExpected output
Id IP SG i-0abc… 203.0.113.10 launch-wizard-1
How to read it: Public IP with default wizard SG is a classic lab misconfig to fix.
Common errors
- Running broad describe in production from laptops without MFA session
Related: /courses/cloud-security · /tools · /tools/prowler
kubectl logs— Fetch container stdout/stderr. First stop for CrashLoopBackOff and app e…
What it does
Fetch container stdout/stderr. First stop for CrashLoopBackOff and app errors in K8s labs.
Syntax
kubectl logs pod [-c container] [--previous]
Important flags / options
-fFollow--previousLast crashed instance-n nsNamespace
Safe example (lab)
kubectl logs deploy/web -n lab --tail=50
Expected output
ERROR: connection refused to db:5432
How to read it: App cannot reach the database Service — check NetworkPolicy and Service selectors next.
Common errors
- kubectl logs on prod without ticket
- Forgetting --previous when the current container just started
Related: /courses/cloud-security · /tools · /commands#docker · /tools/prowler · /tools/trivy
aws route53 list-resource-record-sets (lab)— Inventory DNS records in a hosted zone you control — pair with dig from …
What it does
Inventory DNS records in a hosted zone you control — pair with dig from the public Internet to verify propagation.
Syntax
aws route53 list-resource-record-sets --hosted-zone-id ZONE
Important flags / options
--hosted-zone-idZone id--queryJMSE filter
Safe example (lab)
aws route53 list-resource-record-sets --hosted-zone-id Z3LABEXAMPLE --query "ResourceRecordSets[?Type=='A']" --output table
Expected output
Name Type TTL ResourceRecords lab.example.com. A 60 203.0.113.10
How to read it: Authoritative A record is 203.0.113.10 — dig @8.8.8.8 should match after TTL.
Common errors
- Changing prod records without change window
- Leaving TTL=60 forever as a cost/perf tradeoff unnoticed
Related: /courses/cloud-security · /tools · /tools/prowler
kubectl port-forward— Tunnel a cluster Service to localhost for debugging when Ingress is not …
What it does
Tunnel a cluster Service to localhost for debugging when Ingress is not ready. Lab/cluster you admin only.
Syntax
kubectl port-forward svc/name local:remote -n ns
Important flags / options
svc/nameService8080:80Local:remote ports-nNamespace
Safe example (lab)
kubectl port-forward svc/web 8080:80 -n lab
Expected output
Forwarding from 127.0.0.1:8080 -> 80
How to read it: Browse http://127.0.0.1:8080 while the forward runs — stop with Ctrl+C when done.
Common errors
- port-forward in prod as a permanent access method
- Exposing forwards on 0.0.0.0 unintentionally
Related: /courses/cloud-security · /tools · /commands#docker · /tools/prowler · /tools/trivy
Docker / Kubernetes (4)
Container and cluster commands for local labs.
Tools: trivy · Lessons: /courses/cloud-security · /commands#docker
docker inspect— JSON metadata about a container.
What it does
JSON metadata about a container.
Syntax
docker inspect container
Safe example (lab)
docker inspect lab_web_1
Expected output
Config, Mounts, NetworkSettings …
How to read it: Find privileged mode / mounted sockets.
Common errors
- Inspecting production without read-only role
Related: /courses/cloud-security · /commands#docker · /tools/trivy
docker scout— Image vulnerability quick view (Docker Scout).
What it does
Image vulnerability quick view (Docker Scout).
Syntax
docker scout cves image:tag
Safe example (lab)
docker scout cves myapp:lab
Expected output
CVE list …
How to read it: Pre-deploy image scan.
Common errors
- Ignoring unfixed base image CVEs
Related: /courses/cloud-security · /commands#docker · /tools/trivy
trivy image— Scans container images for OS/app CVEs. Run in CI before pushing lab ima…
What it does
Scans container images for OS/app CVEs. Run in CI before pushing lab images to a registry.
Syntax
trivy image image:tag
Important flags / options
--severity HIGH,CRITICALFilter--exit-code 1Fail build
Safe example (lab)
trivy image myapp:lab --severity HIGH,CRITICAL
Expected output
Total: 3 (HIGH: 2, CRITICAL: 1)
How to read it: Rebuild from a patched base image before 'shipping' the lab demo.
Common errors
- Ignoring base image CVEs forever
- Scanning only latest tag while prod runs old digests
Related: /courses/cloud-security · /commands#docker · /tools/trivy
docker run --rm curl— Reach an endpoint from inside the container network namespace when host …
What it does
Reach an endpoint from inside the container network namespace when host curl works but the app container cannot — classic Docker DNS/bridge issues.
Syntax
docker run --rm curlimages/curl:latest URL
Important flags / options
--rmDelete after run--networkJoin a compose network
Safe example (lab)
docker run --rm --network lab_default curlimages/curl:latest -sI http://web:80/
Expected output
HTTP/1.1 200 OK
How to read it: Service name `web` resolves on the compose network — if this fails, check compose service names and network attachment.
Common errors
- Pulling images in air-gapped labs without a mirror
- Using latest tags in production debug one-offs without noting digest
Related: /courses/cloud-security · /commands#docker · /tools/trivy
SIEM query language (3)
SPL / KQL-style literacy for blue-team labs (syntax patterns).
Lessons: /courses/soc-analyst-blue-team
spl-search— Splunk SPL pattern for failed SSH in a lab index — adapt field names to …
What it does
Splunk SPL pattern for failed SSH in a lab index — adapt field names to your SIEM course lab.
Syntax
index=lab sourcetype=linux_secure "Failed password" | stats count by src
Important flags / options
index=Which data setstats count byAggregate offendersearliest=-24hTime window
Safe example (lab)
index=lab "Failed password" earliest=-1h | top src
Expected output
src count 10.0.0.5 37
How to read it: 37 failures from one lab IP — correlate with auth.log grep lesson.
Common errors
- Running against production without SOC playbook approval
- Over-broad index=* on huge clusters
Related: /courses/soc-analyst-blue-team · /courses/ethical-hacking-penetration-testing · /tools/hashcat · /tools/john · /tools/openssl
kql-signin— Microsoft Sentinel / Azure Monitor KQL pattern for failed sign-ins in a …
What it does
Microsoft Sentinel / Azure Monitor KQL pattern for failed sign-ins in a demo workspace.
Syntax
SigninLogs | where ResultType != 0 | summarize count() by IPAddress, UserPrincipalName
Important flags / options
whereFilter rowssummarizeAggregateago(1d)Relative time
Safe example (lab)
SigninLogs | where TimeGenerated > ago(1h) | where ResultType != 0 | take 20
Expected output
TimeGenerated … ResultType 50126 … IPAddress 203.0.113.10
How to read it: Non-zero ResultType = failed auth class — map codes in the SOC course.
Common errors
- Querying tenant data outside assigned lab/workspace
- Exporting PII into unsecured notes
Related: /courses/soc-analyst-blue-team · /courses/ethical-hacking-penetration-testing · /tools/hashcat · /tools/john · /tools/openssl
sigma-rule-idea— Sigma is a detection rule language — write rules in class, convert with …
What it does
Sigma is a detection rule language — write rules in class, convert with sigmac for Elastic/Splunk labs.
Syntax
title: Lab Failed SSH
logsource: { product: linux, service: auth }
detection: { selection: { message|contains: 'Failed password' } }Important flags / options
logsourceWhere the event livesdetectionMatch logiclevelInformational → critical
Safe example (lab)
Draft a Sigma rule for your lab auth failures → convert for the SIEM you use in class
Expected output
(rule YAML validated by linter)
How to read it: A portable detection idea — test in lab before any production deploy.
Common errors
- Copy-pasting public rules into prod without tuning
- Ignoring false-positive rates
Related: /courses/soc-analyst-blue-team · /courses/ethical-hacking-penetration-testing · /tools/hashcat · /tools/john · /tools/openssl
Security tooling commands (13)
Password auditors, openssl, and other security CLIs — authorized hashes/targets only.
Tools: hashcat · john · openssl · Lessons: /courses/ethical-hacking-penetration-testing
openssl— TLS, X.509, hashing, and key utilities. Inspect remote certs with s_clie…
What it does
TLS, X.509, hashing, and key utilities. Inspect remote certs with s_client; hash files with dgst; never paste production private keys into random sites.
Syntax
openssl <subcommand> [options]
Important flags / options
s_clientSpeak TLS to a serverx509Cert encode/decodedgstMessage digestrand -hexRandom bytes
Safe example (lab)
echo -n hello | openssl dgst -sha256
Expected output
SHA2-256(stdin)= 2cf24dba5fb0a30e...
How to read it: Hash of the four characters h-e-l-l-o. Missing echo -n adds a newline and a different digest.
Common errors
- echo without -n when matching published hashes
- openssl s_client and ignoring verify return code
Related: /courses/ethical-hacking-penetration-testing · /tools/hashcat · /tools/john · /tools/openssl
hashcat— GPU password recovery for auditing. Use only hashes you are authorized t…
What it does
GPU password recovery for auditing. Use only hashes you are authorized to test (your lab dumps, your org’s audit). Mode -m must match the hash format.
Syntax
hashcat -m MODE -a ATTACK hashes wordlist
Important flags / options
-m 0MD5-m 1000NTLM-a 0Dictionary-a 3Mask attack--showPrint cracked
Safe example (lab)
hashcat -m 0 -a 0 lab.txt rockyou.txt
Expected output
5f4dcc3b5aa765d61d8327deb882cf99:password
How to read it: Lab MD5 cracked to "password" — teach longer unique passwords + hashing with salt/slow KDFs.
Common errors
- Wrong -m mode (silent fails)
- Cracking leaked dumps you do not own
Related: /courses/ethical-hacking-penetration-testing · /tools/hashcat · /tools/john · /tools/openssl
john— John the Ripper — CPU-friendly password auditor. Good when GPU hashcat i…
What it does
John the Ripper — CPU-friendly password auditor. Good when GPU hashcat is unavailable; still lab/authorized hashes only.
Syntax
john [options] hashfile
Important flags / options
--wordlist=FILEDictionary--showShow cracked--format=Force hash type--rulesWordlist mangling
Safe example (lab)
john --show lab.txt
Expected output
user1:letmein
How to read it: Cracked pair ready for the lab report — then reset the account and document the weakness.
Common errors
- Ambiguous hashes without --format
- Leaving pot files with real credentials on shared VMs
Related: /courses/ethical-hacking-penetration-testing · /tools/hashcat · /tools/john · /tools/openssl
openssl s_client— Debug a TLS handshake and view certificates.
What it does
Debug a TLS handshake and view certificates.
Syntax
openssl s_client -connect host:443
Important flags / options
-servernameSNI
Safe example (lab)
openssl s_client -connect example.com:443 -servername example.com
Expected output
Certificate chain …
How to read it: Inspect cert subject/issuer and protocol.
Common errors
- Ignoring certificate warnings in production clients
Related: /courses/ethical-hacking-penetration-testing · /tools/hashcat · /tools/john · /tools/openssl
sha256sum— Compute SHA-256 of a file for integrity checks.
What it does
Compute SHA-256 of a file for integrity checks.
Syntax
sha256sum file
Safe example (lab)
sha256sum image.iso
Expected output
ab12… image.iso
How to read it: Compare to published hashes.
Common errors
- Trusting hashes from the same untrusted mirror only
Related: /courses/ethical-hacking-penetration-testing · /tools/hashcat · /tools/john · /tools/openssl
gpg— Verify signatures (lab/keyring dependent).
What it does
Verify signatures (lab/keyring dependent).
Syntax
gpg --verify file.sig file
Important flags / options
--verifyCheck signature
Safe example (lab)
gpg --verify SHA256SUMS.sig SHA256SUMS
Expected output
Good signature from …
How to read it: Confirms authenticity when keys are trusted.
Common errors
- Importing random keys without trust model
Related: /courses/ethical-hacking-penetration-testing · /tools/hashcat · /tools/john · /tools/openssl
yara— Scan files with YARA rules in a malware lab.
What it does
Scan files with YARA rules in a malware lab.
Syntax
yara rules.yar file
Safe example (lab)
yara rules.yar sample.bin
Expected output
RuleName sample.bin
How to read it: Rule matched the sample.
Common errors
- Running unknown samples outside a sandbox
Related: /courses/ethical-hacking-penetration-testing · /tools/hashcat · /tools/john · /tools/openssl
jwt-cli— Decode JWT header/payload (jwt-cli or similar).
What it does
Decode JWT header/payload (jwt-cli or similar).
Syntax
jwt decode TOKEN
Safe example (lab)
jwt decode eyJhbGci…
Expected output
Header/Payload JSON
How to read it: Inspect alg/claims during API reviews.
Common errors
- Pasting production tokens into public websites
Related: /courses/ethical-hacking-penetration-testing · /tools/hashcat · /tools/john · /tools/openssl
nikto— Web server scanner for common misconfigurations and outdated software. N…
What it does
Web server scanner for common misconfigurations and outdated software. Noisy — lab and authorized assessments only.
Syntax
nikto -h URL
Important flags / options
-hHost/URL-TuningSelect checks-outputSave report
Safe example (lab)
nikto -h http://127.0.0.1:8080
Expected output
+ Server: Apache/2.4.49 + The anti-clickjacking X-Frame-Options header is not present.
How to read it: Missing security headers and an old Server banner are findings to verify manually.
Common errors
- Running against third-party sites
- Treating every plugin hit as critical without validation
Related: /courses/ethical-hacking-penetration-testing · /tools/hashcat · /tools/john · /tools/openssl
ffuf— Fast web fuzzer for directories, parameters, and vhosts. Rate-limit and …
What it does
Fast web fuzzer for directories, parameters, and vhosts. Rate-limit and scope carefully even in labs.
Syntax
ffuf -u URL/FUZZ -w wordlist
Important flags / options
-uURL with FUZZ-wWordlist-mcMatch status codes-eExtensions
Safe example (lab)
ffuf -u http://127.0.0.1:3000/FUZZ -w common.txt -mc 200,301,302
Expected output
admin [Status: 301] backup.zip [Status: 200]
How to read it: Hidden admin path and a downloadable backup — high-value lab findings to report ethically.
Common errors
- Huge wordlists without -rate
- Fuzzing out-of-scope hosts
Related: /courses/ethical-hacking-penetration-testing · /tools/hashcat · /tools/john · /tools/openssl
hydra (lab)— Online password guessing against lab services. Illegal/unethical without…
What it does
Online password guessing against lab services. Illegal/unethical without authorization — use only intentionally vulnerable VMs.
Syntax
hydra -l user -P wordlist proto://host
Important flags / options
-lSingle login-LLogin list-PPassword list-tTasks/threads
Safe example (lab)
hydra -l admin -P rockyou-top100.txt ssh://192.168.56.20
Expected output
[22][ssh] host: 192.168.56.20 login: admin password: admin123
How to read it: Weak lab credential found — document and remediate (disable password auth / enforce MFA).
Common errors
- Pointing at real internet hosts
- High -t causing DoS on fragile labs
Related: /courses/ethical-hacking-penetration-testing · /tools/hashcat · /tools/john · /tools/openssl
sqlmap (lab)— Automates SQL injection detection/exploitation against apps you own (e.g…
What it does
Automates SQL injection detection/exploitation against apps you own (e.g. DVWA). Always confirm findings manually for reports.
Syntax
sqlmap -u 'URL' --batch
Important flags / options
--batchNo prompts--dbsList databases--risk/--levelTest depth
Safe example (lab)
sqlmap -u "http://127.0.0.1/dvwa/vulnerabilities/sqli/?id=1&Submit=Submit" --cookie="security=low; PHPSESSID=…" --batch --dbs
Expected output
available databases [2]: [*] dvwa [*] information_schema
How to read it: Confirmed injectable parameter and listed DBs — next teach parameterized queries as the fix.
Common errors
- --os-shell on shared hosting
- Using against production
Related: /courses/ethical-hacking-penetration-testing · /tools/hashcat · /tools/john · /tools/openssl
openssl s_client (TLS)— See certificate chain, protocol, and verify return code without a browse…
What it does
See certificate chain, protocol, and verify return code without a browser. Essential when curl fails with CERT errors.
Syntax
openssl s_client -connect host:443 -servername name</dev/null
Important flags / options
-servernameSNI-showcertsFull chain-tls1_2Force version
Safe example (lab)
echo | openssl s_client -connect 127.0.0.1:8443 -servername lab.local 2>/dev/null | openssl x509 -noout -subject -dates
Expected output
subject=CN = lab.local notBefore=… notAfter=…
How to read it: Cert CN matches lab.local — if browser still fails, check trust store / intermediate chain.
Common errors
- Ignoring verify error:num= in the full s_client output
Related: /courses/ethical-hacking-penetration-testing · /tools/hashcat · /tools/john · /tools/openssl