Kali Linux: A Comprehensive Tools Cheatsheet for Pentesters

πŸ€– AI Prompts Cheatsheet

Priya Nair — Prompt Engineering Expert

What is Kali Linux?

Kali Linux is a Debian-based Linux distribution that is specifically tailored for penetration testing, security research, computer forensics, and reverse engineering. It comes with numerous pre-installed tools designed for various security tasks.

Installation

Kali Linux can be installed on a physical machine, set up in a virtual environment, or run live from a USB drive. The installation process can be performed using a straightforward graphical installer or command-line options for advanced users.

Basic Syntax

Most tools in Kali Linux follow a command-line interface (CLI) syntax. The basic structure often looks like this:

TOOL_NAME [options] [target]

Discovery

Nmap

Nmap is a powerful network scanning tool used for discovering hosts and services on a network. Here are some useful commands:

nmap -sP 192.168.1.0/24

Use this command to perform a ping scan across the subnet to identify live hosts.

nmap -sV -p 1-65535 192.168.1.1

This command scans for open ports (1 to 65535) and attempts to detect service versions on the target.

Scanning

Netcat

Netcat (nc) is a versatile networking utility. Here’s how you can use it for scanning:

nc -zv 192.168.1.1 1-1000

This command attempts to connect to open ports from 1 to 1000 on the target.

Exploitation

Metasploit Framework

Metasploit is an advanced framework for developing and executing exploit code against a remote target:

msfconsole

Start Metasploit console, interactively managing exploits.

use exploit/windows/smb/ms17_010_eternalblue

Load the EternalBlue exploit to attack vulnerable Microsoft machines.

Analysis

Wireshark

Wireshark is a network protocol analyzer used for capturing and examining packets:

wireshark &

Run Wireshark in the background.

Evasion

Tor

Tor can anonymize your internet traffic:

torsocks curl http://example.com

This allows you to access a site through the Tor network.

Reporting

Dradis

Dradis is a tool that helps manage and share information from your engagements:

dradis

Start Dradis for team collaboration and report generation.

Quick Reference Table

Flag Description
-sS TCP SYN scan (stealth scan)
-A Enable OS detection, version detection, script scanning, and traceroute

Pro Tips

  • Use Screen: Run long scans in a screen session to avoid interruptions.
  • Output Formats: Redirect Nmap output to XML or grepable formats for easier parsing.
  • Use Scripting: Leverage Nmap scripts (NSE) for detailed scans with the ‘-sC’ option.

Real-World Examples

Consider the following real-world task: identifying open ports and services on a target while avoiding detection. Using a combination of Nmap’s stealth scan (-sS) along with the use of Tor can significantly enhance your testing methodology. Save your scans and use Dradis to report these findings effectively.