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
After installing Kali, students start running tools straight away and forget apt update – then they get "tool is old" or a "signature error". First job: change the password, then update. And gunzip rockyou.txt once; many students keep searching for it again and again.
Ravindra Bagale's Tip – मराठी
Kali install केल्यावर students लगेच tools चालवायला लागतात आणि apt update विसरतात – मग "tool old आहे" किंवा "signature error" येतो. पहिलं काम: password बदला, मग update. आणि rockyou.txt एकदाच gunzip करा; बरेच students तो पुन्हा पुन्हा शोधत राहतात.
Ravindra Bagale's Tip – हिंदी
Kali install करने के बाद students तुरंत tools चलाने लगते हैं और apt update भूल जाते हैं – फिर "tool पुराना है" या "signature error" आता है. पहला काम: password बदलो, फिर update. और rockyou.txt को एक बार gunzip कर लो; बहुत से students उसे बार-बार ढूँढते रहते हैं.
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.