Ethical Hacking Commands Cheatsheet

A curated, safe reference of common recon, enumeration, and system-inspection commands. Authorized use only.
Curated safe cheatsheet — authorized use only. Only run these commands against systems and domains you own or have explicit written permission to test.
Recon
whois target.com
# Domain registration info
nslookup target.com
# DNS lookup
dig target.com
# Detailed DNS records
traceroute target.com
# Network pathEnumeration
theHarvester -d target.com -b google
# Public emails & subdomains
dnsenum target.com
# DNS enumeration
sublist3r -d target.com
# Find subdomains
wget --spider -r target.com
# Crawl structureNetwork Analysis
nmap -sV target.com
# Detect services
arp -a
# View ARP cache
tcpdump -i eth0
# Capture traffic
nc -zv target.com 22
# Check open portWeb Checks
whatweb target.com
# Identify technologies
nikto -h http://target.com
# Server checks
curl -I http://target.com
# Inspect headers
curl -s http://target.com | grep "admin"
# Search page contentSystem Inspection
uname -a
# System info
cat /etc/passwd
# View users
ps aux | grep process
# Find process
dmesg | tail
# Recent kernel messagesFile / Firewall
iptables -L
# View firewall rules
scp file.txt user@target.com:/home/user/
# Secure transfer
shred -u file.txt
# Secure delete
gpg --decrypt file.gpg
# Decrypt owned fileKnowledge is power. Ethics is our strength. Stay legal. Stay ethical. Stay safe.
Credit: Spyriot Security Cyber Hub — @spyriotsecuritycyberhub

Written by Robin te Hofstee
Technology enthusiast with a deep love for programming. Sharing practical guides on React, Next.js, Linux and self-hosting.
Related Posts
Securing a Next.js Application in Production
Securing a Next.js app in production means protecting the client bundle, the server, and the data flow. This post shows how to lock down Content‑Secur
How Git Works
Git is a distributed version control system that allows multiple people to collaborate on a project while maintaining a complete history of all change
How to Check Disk Usage and Find Large Files on Linux
After setting up a new Linux server, you’ll want to know how to check what’s taking up space. Disk space is often the weakest link in system stability


