Pentest_Notes
Recon
# Enumerate subnet
nmap -sn 10.11.1.1/24
# Fast simple scan
nmap -sS 10.11.1.111
# Full complete slow scan with output
nmap -v -sT -A -T4 -p- -Pn --script vuln -oA full 10.11.1.111
#Scan All the ports:
masscan -p1-65535,U:1-65535 --rate=1000 192.168.232.43 -e tun0 > ports
ports=$(cat ports | awk -F " " '{print $4}' | awk -F "/" '{print $1}' | sort -n | tr '\n' ',' | sed 's/,$//')
sudo nmap -Pn -sV -sC -p$ports 192.168.232.43
# OneTwoPunch
https://raw.githubusercontent.com/superkojiman/onetwopunch/master/onetwopunch.sh
onetwopunch.sh ip.txt tcp
# Scan for UDP
nmap 10.11.1.111 -sU
unicornscan -mU -v -I 10.11.1.111
# Connect to udp if one is open
nc -u 10.11.1.111 48772
# Responder
responder -I eth0 -A
# Amass
amass enum -ip 10.11.1.1/24
Enumeration AIO
File enumeration
Common
Disk files
Images
Audio
Port 21 - FTP
Port 22 - SSH
Port 25 - SMTP
Port 69 - UDP - TFTP
Port 79 - Finger
Kerberos - 88
Port 110 - Pop3
Port 111 - Rpcbind
Port 135 - MSRPC
Port 139/445 - SMB
Port 143/993 IMAP
Port 161/162 UDP - SNMP
LDAP - 389,636,3268, 3269
LDAP Data Interchange Format
HTTPS - 443
500 - ISAKMP IKE
513 - Rlogin
541 - FortiNet SSLVPN
Port 554 - RTSP
Port 873 - Rsync
Port 1030/1032/1033/1038
MSSQL - 1433
Port 1521 - Oracle
Port 2049 - NFS
Port 2100 - Oracle XML DB
2375, 2376 Docker
Step 1: External Reconnaissance
Step 2: Vulnerability Exploitation
Step 3: Privilege Escalation
Step 4: Docker Escape
Tools and Resources
Security Best Practices
3306 - MySQL
Port 3339 - Oracle web interface
RDP - 3389
PostgreSQL - 5432/5433
Erland Port Mapper - 4369
VNC - 5900
WinRM - 5985
Redis - 6379
MsDeploy - 8172
Port 27017 - MongoDB
Webdav
Unknown ports
Port 80 - Web server
Url brute force
Default/Weak login
LFI/RFI
SQL-Injection
XSS
SQL-login-bypass
Bypass image upload restrictions
Password brute force - last resort
Offline local resources
Hashcat
Online crackers
Vulnerability analysis
BOF
Find exploits - Searchsploit and Google
Reverse Shells
Privilege escalation
Common
Set up Webserver
Set up FTP Server
Set up TFTP
Linux
Useful commands
Basic info
Kernel exploits
Programs running as root
Installed software
Weak/reused/plaintext passwords
Inside service
Suid misconfiguration
Unmounted filesystems
Cronjob
SSH Keys
Bad path configuration
Find plain passwords
Scripts
BASH
MSFVENOM LIBRARY Priv Esc
Linux Privesc Tools
Linux Precompiled Exploits
Windows
Basic info
Kernel exploits
Cleartext passwords
Reconfigure service parameters
Dump process for passwords
Inside service
Programs running as Admin/system
Installed software
Scheduled tasks
Weak passwords
Add user and enable RDP
Powershell sudo for Windows
Windows download with bitsadmin
Windows download with certutil.exe
Windows download with powershell
PowerShell Priv Esc
Windows Download from FTP
Windows NC File Transfer
Windows create SMB Server transfer files
Windows download with VBS
Windowss XP SP1 PrivEsc
Pass The Hash
Scripts
Windows privesc/enum tools
Windows precompiled exploits
Port Forwarding
Windows
Linux
Active Directory
LLMNR/NBT-NS
SMB Relay Attack
IPv6 Attack
AD Recon
PowerView
Bloodhound
Mimikatz Commands
Loot
Linux
Proof
Local
Network secret
Passwords and hashes
Dualhomed
Tcpdump
Interesting files
Databases
SSH-Keys
Browser
Mail
GUI
Windows
Proof
Passwords and hashes
Dualhomed
Tcpdump
Interesting files
Last updated