Kali Linux is a Debian-based Linux distribution specifically designed for digital forensics and penetration testing. It is maintained and funded by Offensive Security Ltd. Kali Linux comes pre-installed with numerous software applications for penetration testing, security research, computer forensics, and reverse engineering.
Key Concepts
- Overview of Kali Linux
- Purpose: Designed for security professionals and ethical hackers.
- Pre-installed Tools: Includes tools for various security tasks such as penetration testing, security research, computer forensics, and reverse engineering.
- Customization: Highly customizable to fit specific needs.
- Installation and Setup
- System Requirements: Minimum 2GB RAM, 20GB disk space, and a USB bootable drive or CD/DVD.
- Installation Methods: Live Boot, Virtual Machine, Dual Boot, and Full Installation.
- Updating and Upgrading: Regular updates to ensure the latest tools and features.
- Key Tools in Kali Linux
- Nmap: Network scanning and enumeration.
- Metasploit Framework: Exploitation framework.
- Wireshark: Network protocol analyzer.
- John the Ripper: Password cracking tool.
- Burp Suite: Web vulnerability scanner.
- Basic Commands and Usage
- Navigating the File System:
ls
,cd
,pwd
- Managing Files and Directories:
cp
,mv
,rm
,mkdir
- System Information:
uname -a
,df -h
,top
- Network Configuration:
ifconfig
,ping
,netstat
Installation and Setup
System Requirements
- Minimum: 2GB RAM, 20GB disk space, USB bootable drive or CD/DVD.
- Recommended: 4GB RAM, 50GB disk space for a smoother experience.
Installation Methods
- Live Boot: Running Kali Linux directly from a USB or CD/DVD without installing it on the hard drive.
- Virtual Machine: Using software like VMware or VirtualBox to run Kali Linux within another operating system.
- Dual Boot: Installing Kali Linux alongside another operating system, allowing you to choose which one to boot into.
- Full Installation: Installing Kali Linux as the primary operating system on your machine.
Updating and Upgrading
- Update Package List:
sudo apt update
- Upgrade Installed Packages:
sudo apt upgrade
- Full Upgrade:
sudo apt full-upgrade
Key Tools in Kali Linux
Nmap
- Purpose: Network discovery and security auditing.
- Basic Usage:
nmap [options] [target]
- Example:
This command performs a ping scan on the specified subnet.nmap -sP 192.168.1.0/24
Metasploit Framework
- Purpose: Developing and executing exploit code against a remote target machine.
- Basic Usage:
msfconsole
- Example:
use exploit/windows/smb/ms17_010_eternalblue set RHOSTS 192.168.1.10 exploit
Wireshark
- Purpose: Capturing and analyzing network traffic.
- Basic Usage:
wireshark
- Example: Capture packets on a specific interface and analyze HTTP traffic.
John the Ripper
- Purpose: Password cracking.
- Basic Usage:
john [options] [password-file]
- Example:
john --wordlist=/usr/share/wordlists/rockyou.txt password.txt
Burp Suite
- Purpose: Web vulnerability scanning and testing.
- Basic Usage:
burpsuite
- Example: Intercepting HTTP requests and responses to find vulnerabilities.
Basic Commands and Usage
Navigating the File System
- List Files:
ls
- Change Directory:
cd [directory]
- Print Working Directory:
pwd
Managing Files and Directories
- Copy Files:
cp [source] [destination]
- Move/Rename Files:
mv [source] [destination]
- Remove Files:
rm [file]
- Create Directory:
mkdir [directory]
System Information
- Kernel Information:
uname -a
- Disk Usage:
df -h
- System Processes:
top
Network Configuration
- Network Interfaces:
ifconfig
- Ping a Host:
ping [host]
- Network Statistics:
netstat
Practical Exercises
Exercise 1: Installing Kali Linux on a Virtual Machine
- Download Kali Linux ISO: Visit the official Kali Linux website and download the ISO file.
- Install VirtualBox: Download and install VirtualBox on your host machine.
- Create a New Virtual Machine:
- Open VirtualBox and click "New".
- Name your VM and select "Linux" and "Debian (64-bit)".
- Allocate at least 2GB of RAM.
- Create a virtual hard disk with at least 20GB of space.
- Install Kali Linux:
- Start the VM and select the Kali Linux ISO as the startup disk.
- Follow the installation prompts to complete the setup.
Exercise 2: Basic Network Scanning with Nmap
- Open Terminal: Launch a terminal in Kali Linux.
- Run Nmap Scan:
nmap -sP 192.168.1.0/24
- Analyze Results: Review the output to see which devices are active on the network.
Exercise 3: Capturing Network Traffic with Wireshark
- Open Wireshark: Launch Wireshark from the applications menu.
- Select Interface: Choose the network interface you want to capture traffic on.
- Start Capture: Click the "Start" button to begin capturing packets.
- Analyze Traffic: Look for HTTP traffic and analyze the requests and responses.
Conclusion
Kali Linux is an essential tool for penetration testers and security professionals. It provides a comprehensive suite of tools for various security tasks, from network scanning to exploitation and forensics. Understanding how to install, configure, and use Kali Linux effectively is crucial for anyone looking to pursue a career in cybersecurity. By mastering the basic commands and tools provided in this module, you will be well-prepared to tackle more advanced topics in penetration testing.
Pentesting Course: Penetration Testing Techniques
Module 1: Introduction to Pentesting
Module 2: Reconnaissance and Information Gathering
Module 3: Scanning and Enumeration
Module 4: Exploitation of Vulnerabilities
- Introduction to Exploitation
- Exploitation of Web Vulnerabilities
- Exploitation of Network Vulnerabilities
- Exploitation of System Vulnerabilities