18. Ethics, the Law and a Safe Kali Lab
18.5 Kali Linux Basics
Kali Linux mhanje ek Debian-based Linux distribution jyat hacking/security tools aadhich install kelele astat. To "magic" nahi – to fakt Linux aahe, aani tumhi Part 2 madhe Linux shiklach aahat. Tyamule ithe tumhala ghar sarkha vatel.
# first things on a fresh Kali (with a temporary NAT adapter for updates)
passwd # change the default password immediately
sudo apt update && sudo apt full-upgrade -y
sudo apt install -y seclists gobuster # add tools you like (many come preinstalled)
uname -a && cat /etc/os-release # confirm it is Kali/Debian
whoami # 'kali' – use sudo for admin tasks
| Kali fact | Why it matters |
|---|---|
| It is Debian Linux | Everything from Part 2 works: apt, sudo, service, ss, grep, ssh, scp |
Tools live in normal $PATH |
nmap, nikto, sqlmap, msfconsole are just commands |
Wordlists in /usr/share/wordlists/ |
rockyou.txt (unzip once), plus SecLists for names and paths |
Run as a normal user, sudo when needed |
Old Kali ran as root by default; modern Kali uses the kali user |
| Menu grouped by phase | Information Gathering, Vulnerability Analysis, Web, Exploitation, etc. |
sudo gunzip /usr/share/wordlists/rockyou.txt.gz # prepare the famous password list (lab use)
ls /usr/share/wordlists/
Keep notes from day one. Create a folder per lab target and save every command and its output – this is exactly how a real penetration test report is built, and it is great interview material.
mkdir -p ~/labs/metasploitable && cd ~/labs/metasploitable
script -a session.log # record your whole terminal session to a file (type 'exit' to stop)
Why this matters for security
Because Kali is just Linux, everything you learnt about hardening applies to Kali itself: change the default password, keep it updated, and do not expose it. A poorly secured attacker machine is a favourite target – you do not want your own tools turned against you.
Ravindra Bagale's Tip
Kali install kelyavar students lagech tools chalvayla lagtat aani apt update visartat – mag "tool old aahe" kiwa "signature error" yeto. Pahila kaam: password badla, mag update. Aani rockyou.txt ekdach gunzip kara; khup students to punha punha shodhat rahtat.
Lab
Update Kali, change the password, unzip rockyou.txt, and create a ~/labs/ notes folder. Run ip a, ss -tulnp and nmap --version and paste the output into a notes file.