Bug bounty hunting is an exciting yet challenging field that requires the mastery of numerous tools and techniques. While graphical interfaces can simplify tasks, the real power often lies in command-line interfaces (CLI). For bug bounty hunters, knowing the right CLI commands and flags can make the difference between success and failure.
This guide explores 100 essential CLI flags and tricks across popular tools for reconnaissance, scanning, exploitation, and post-exploitation. Whether you're just starting out or refining your skills, these commands will boost your efficiency and effectiveness.
Reconnaissance and OSINT Tools
Reconnaissance is the foundation of bug bounty hunting. These commands help you gather critical information about your targets:
nmap -A
– Enable OS detection and version detection.nmap -sC
– Run default scripts for enumeration.nmap -sV
– Detect service versions.nmap --script vuln
– Run vulnerability detection scripts.nmap -Pn
– Disable host discovery and scan all targets.nmap -p-
– Scan all 65,535 ports.nmap --top-ports 100
– Scan top 100 ports.nmap -oN output.txt
– Save output in normal format.nmap -oX output.xml
– Save output in XML format for automation.nmap -iL targets.txt
– Input list of targets to scan.amass enum -d domain.com
– Enumerate subdomains.amass intel -whois -d domain.com
– Perform WHOIS-based reconnaissance.amass track -d domain.com
– Track subdomain changes over time.amass viz -d domain.com -o output.graphml
– Visualize enumeration results.subfinder -d domain.com
– Find subdomains quickly.subfinder -d domain.com -silent
– Silent mode for clean output.subfinder -d domain.com -o output.txt
– Save subdomains to file.assetfinder --subs-only domain.com
– Discover subdomains.waybackurls domain.com
– Fetch URLs from the Wayback Machine.gau domain.com
– Fetch archived URLs from multiple sources.httpx -silent
– Test HTTP/HTTPS services silently.httpx -status-code
– Include HTTP status codes in output.httpx -title
– Display page titles.httpx -tech-detect
– Detect technologies used on target.dnsx -d domain.com
– Perform DNS probing.
Scanning Tools
Use these commands to scan for open ports, directories, and vulnerabilities:
masscan -p0-65535 target
– Fast scan for all ports.masscan --rate 1000 -p22,80 target
– Set rate limit for scanning.masscan -iL targets.txt
– Read targets from a file.ffuf -w wordlist.txt -u http://target/FUZZ
– Fuzz directories.ffuf -w wordlist.txt -u http://target/FUZZ -mc 200
– Match HTTP status 200 only.ffuf -c
– Use colors for better readability.ffuf -H "Authorization: Bearer TOKEN"
– Add headers to requests.ffuf -fs 4242
– Filter results by size.ffuf -recursion
– Enable directory recursion fuzzing.dirsearch -u http://target
– Directory brute-forcing.dirsearch -e php,html,js
– Add extensions to fuzzing.dirsearch --threads 50
– Set thread count.dirsearch -x 404
– Exclude 404 responses.gobuster dir -u http://target -w wordlist.txt
– Fuzz directories.gobuster dns -d domain.com -w wordlist.tx
t – Fuzz DNS subdomains.gobuster -k
– Ignore SSL certificate warnings.gobuster dir -o output.txt
– Save results to file.nikto -host http://target
– Scan for vulnerabilities.nikto -ssl
– Force SSL scanning.nikto -output output.txt
– Save scan results.
Exploitation Tools
Once reconnaissance and scanning are complete, these tools help you exploit discovered vulnerabilities:
sqlmap -u http://target --dbs
– Enumerate databases.sqlmap -u http://target -D dbname --tables
– List tables in a database.sqlmap -u http://target -D dbname -T table --columns
– List columns.sqlmap -u http://target -D dbname -T table -C column --dump
– Dump data.sqlmap --batch
– Run in non-interactive mode.sqlmap --risk 3 --level 5
– Increase testing depth.hydra -l admin -P passwords.txt target http-post-form "/ login:username=^USER^&password=^PASS^:F=Invalid"
– Brute-forcehydra -t 16 -L users.txt -P passwords.txt ssh://target
– SSH brute-forcing.metasploit (msfconsole)
– Launch the Metasploit framework.searchsploit software
– Search for exploits in Exploit-DB.msfvenom -p payload -f exe > shell.exe
– Generate payloads.xssstrike -u http://target
– Scan for XSS vulnerabilities.wfuzz -w wordlist.txt -u http://target/FUZZ
– Fuzzing tool.wfuzz -z range,1-100
– Use numeric range for fuzzing.rescope -r scope.txt
– Restrict scanning to in-scope domains.
Post-Exploitation Tools
After gaining access, these tools help you analyze and maintain your foothold:
john --wordlist=passwords.txt hash.txt
– Crack hashes with wordlists.hashcat -m 0 hash.txt passwords.txt
– Use GPU for cracking hashes.hashcat --show -m 0 hash.txt
– Display cracked passwords.sshuttle -r user@host 0/0
– Create a quick VPN-like tunnel.proxychains tool
– Route tools through a proxy.socat -d -d TCP-LISTEN:4444 STDOUT
– Create reverse shells.netcat -lvnp 4444
– Set up a listener for reverse shells.curl -I http://targe
t – Fetch HTTP headers.curl -X POST -d "param=value" http://target
– Test POST requests.curl -H "Authorization: Bearer TOKEN"
– Add headers to requests.
Miscellaneous Tricks
Expand your flexibility with these handy tricks:
git clone https://github.com/repo.git
– Clone a Git repository.git log -p
– Check for sensitive changes in Git history.git grep 'password'
– Search for sensitive keywords in Git repositories.strings binary
– Extract strings from a binary file.hexdump -C file
– View file in hex format.exiftool file.jpg
– Extract metadata from files.jq '.' file.json
– Pretty-print JSON output.sed 's/old/new/g' file
– Replace text in files.awk '{print $1}' file
– Extract specific fields from files.sort file | uniq -c
– Count unique lines.base64 -d encoded.txt
– Decode base64 strings.openssl s_client -connect host:443
– Test SSL/TLS connections.openssl enc -d -aes-256-cbc -in encrypted.txt
– Decrypt files with OpenSSL.pspy64
– Monitor processes without root.strace -p PID
– Trace system calls.lsof -i :80
– List processes using a specific port.
Network and System Tools
Finish with these powerful network and system utilities:
tcpdump -i eth0 port 80
– Capture packets on a specific port.wireshark
– Analyze network traffic.nc -zv host 1-1000
– Scan ports with netcat.iptables -L
– List firewall rules.traceroute target
– Trace network paths.dig domain.com
– Query DNS records.nslookup domain.com
– Resolve domain names.host domain.com
– Fetch DNS records.arp -a
– Display ARP table.whois domain.com
– Fetch domain ownership details.wget --mirror -p --convert-links -P ./target http://site
– Mirror a website.scp file user@host:/path
– Securely copy files.ssh user@host
– SSH into a target machine.tmux
– Use terminal multiplexer for managing multiple sessions.
Conclusion
Mastering these 100 CLI flags and tricks will greatly enhance your bug bounty hunting skills. Whether you're gathering reconnaissance data, scanning for vulnerabilities, or performing exploitation and post-exploitation tasks, the right CLI commands can save time and uncover hidden weaknesses. Happy hunting!