Hacking-Cheatsheet
Hacking Cheatsheet
General enumeration
Network discovery
nmap -sV -O --top-ports 50 --open -oA nmap/initial <ip or cidr>
nmap -sC -sV -O --open -p- -oA nmap/full <ip or cidr>
nmap -sU -p- -oA nmap/udp <ip or cidr>
--top-ports only scan the N most common ports
--open only show open ports
-sC use the default scripts
-sV detect versions
-O detect Operating Systems
-p- scan all the ports
-oA save the output in normal format, grepable and xml
-sU scan UDP portsPorts discovery (without nmap)
Powershell
Web directorie/file scanner
Most usefull dictionaries (OSCP/HTB)
Trusted Folders (Windows)
Samba
Login through CIFS/WinRM/PSSession

Exfiltration
Samba
HTTP
FTP
Sockets
RDP
Pivoting
sshuttle

Chisel with remote port forward from machine in the net
Metasploit: autoroute + socks_proxy
Reverse shells
php
bash
sh + nc
Perl (example deploy as cgi-bin)
Java (example to deploy on tomcat)
Windows HTTP download reverse shell
Windows staged reverse TCP
Windows stageless reverse TCP
Linux staged reverse TCP
Linux staged reverse TCP
Privilege escalation
Windows
Linux
Good to know (either Windows and/or Linux)
Arch cross compile exploit (and diff glibc version)
IP restriction at application level, bypass
Windows - check OS information
Windows - check architecture
Powershell running as 32 or 64 bits
Linux LFI - intesresting files to look after
Windows LFI - intesresting files to look after
Enable execution of PowerShell Scripts
Encode Powershell b64 from Linux
Encode/Decode b64 in Windows WITHOUT Powershell
Check the Type of Language available with Powershell
Set Proxy in code used (Windows)
Hide Foreground with WMI (Windows, Office Macros)
Simple Buffer Overflow (32 bits, NO ASLR and NO DEP)
Summarized steps
Fuzzing: example with vulnserver + spike on TRUN command
Badchars
Usefull tools (on Kali Linux)
Shellcode POC: calc.exe
Antivirus Bypass
Signature Bypass
Heuristics Bypass
If NOT AV Bypass and Admin, DISABLE Defender
AMSI Bypass
Active Directory
Permissions: ACE (Access Control Enties) SDDL (Security Descriptor Definition Language) - Format
BloodHound
PowerView methods for enumeration
Exploitation
Last updated