1. Hacker’s OS – Mastering Linux for Security
Day 3: Linux Essentials & Hacking Lab Setup
Become comfortable using Linux as your primary hacking
platform.
2. What is
Linux?
Linux is a free, open-source operating
system used widely in cybersecurity.
Distros: Kali, Ubuntu, Parrot OS.
Key Traits: Lightweight,
customizable, terminal-based power.
3. Linux vs Windows for Hackers
Linux: Open-source, better control,
scripting, tools like Nmap,
Wireshark preinstalled.
Windows: GUI-heavy, less
flexibility for deep system control.
4. Why Do Hackers Prefer Linux?
• Strong community and documentation
• Security-centric distros like Kali
• Control over networking and permissions
• Scripting and automation potential
5. Kali Linux Overview
Kali is a Debian-
based Linux distro
built for penetration
testing.
Includes pre-
installed tools:
Nmap, Metasploit,
Wireshark, Burp
Suite.
Used by ethical
hackers globally.
6. File System Hierarchy
/ (ROOT) /BIN – ESSENTIAL
BINARIES
/ETC – CONFIG
FILES
/HOME – USER
FOLDERS
/VAR – LOGS AND
VARIABLE DATA
UNDERSTANDING
STRUCTURE IS KEY
FOR FILE ACCESS.
7. Navigating the File System
`cd`, `ls`, `pwd`, `tree`
Example:
cd /home/user
ls -l
pwd shows current directory
→
17. Installing Kali Linux
Steps: 1. Download
ISO
2. Create VM 3. Allocate
RAM & Storage
4. Boot and
Install
5. Configure
User & Update
18. System Updates
`sudo apt update`
`sudo apt upgrade`
Ensure latest packages and
security patches are installed.
19. Network Setup in VMs
MODES: • BRIDGED – VM
ACTS LIKE REAL
DEVICE
• NAT – SHARES
HOST IP
• HOST-ONLY –
ISOLATED FROM
INTERNET
20. Installing Tools – Nmap
`sudo apt install nmap` Used for port scanning
and network discovery.
21. Installing Tools – Wireshark
`sudo apt install wireshark`
Captures and analyzes network traffic.
Must run with elevated privileges.
22. More Tools to Install
`SUDO APT INSTALL
NET-TOOLS NIKTO
HYDRA`
NET-TOOLS:
NETWORKING
COMMANDS
NIKTO: WEB
SERVER SCANNER
HYDRA: BRUTE-
FORCE LOGIN TOOL
23. Keeping Tools Updated
`sudo apt update && sudo apt upgrade`
Set regular update schedule
Prevents tool failure due to outdated
dependencies.
24. Introduction to Bash Scripting
Used to automate tasks
Written in `.sh` files
Execute with: `bash script.sh` or
`./script.sh`
25. Writing a Simple Script
Example:
#!/bin/
bash
apt update
&& apt
upgrade -y
Script runs
system
update
26. Command Chaining
`&&` – run second
command only if first
succeeds
`||` – run second if
first fails
`;` – run all regardless
of result
27. Looping and Conditions
Use `for`,
`while`, and
`if` statements
1
Automate
scans or
backups
2
Example: `for
ip in ...; do
nmap $ip;
done`
3
29. Practice Task: System Update Script
CREATE A
SCRIPT TO:
• UPDATE
SYSTEM
• PRINT
DATE/TIME OF
UPDATE
• LOG RESULTS
TO A FILE
30. Summary & Learning Outcome
You now:
• Understand Linux structure
• Can navigate, modify files
• Set up Kali Linux
• Install and use hacking tools
• Write and execute Bash scripts
31. What’s Next?
Prepare for Day 4: Reconnaissance & Scanning
Install tools: WHOIS, nslookup, Nmap
Review Bash scripting
Practice using commands learned today
Editor's Notes
#16:Encourage students to set this up at home and explore. Mention online labs as alternatives (TryHackMe, HackTheBox).