πΏRed Teaming All The Things
About Red Teaming All The Things
Scanning & Enumeration
Port Scanning
nmap -sC -sV -p- --min-rate 10000 x.x.x.xnmap -A -sS -Pn -n x.x.x.xnmap -sU -p- --max-retries 0 --min-rate 500 x.x.x.xnmap -p- -sV -sC $IP --open
Web Fuzzing
gobuster
gobuster dns -d haxtables.htb -w ~/Tools/SecLists/Discovery/DNS/subdomains-top1million-20000.txtgobuster -u x.x.x.x -w /usr/share/seclists/Discovery/Web_Content/common.txt -t 20gobuster -u x.x.x.x -w /usr/share/seclists/Discovery/Web_Content/quickhits.txt -t 20gobuster -u x.x.x.x -w /usr/share/seclists/Discovery/Web_Content/common.txt -t 20 -x .txt,.phpWfuzz
wfuzz -w /usr/share/seclists/Discovery/Web_Content/common.txt --hc 400,404,500 http://x.x.x.x/FUZZwfuzz -w /usr/share/seclists/Discovery/Web_Content/quickhits.txt --hc 400,404,500 http://x.x.x.x/FUZZSMB
SNMP
Git
https://github.com/internetwache/GitTools
PHP filter chain generator
Enumerate for Web
Enumerate for Linux
DNS Zone Transfer
WPscan
id_rsa
Searching id_rsa key
Dirsearch
Linux Privilege Escalation
find SUID
Sticky bit
SGID ( chmod 2000 )
SUID ( chmod 4000 )
SUID or GUID
Ubuntu 16.04 4.4 Exploit
[double_fdput](wget https://github.com/offensive-security/exploitdb-bin-sploits/raw/master/bin-sploits/39772.zip)
Linux privilege escalation
Spawn Interactive Shell and set env
Restricted bash
Automated scripts
Check environment
Check OS and Kernel
Check environment variables
Check any restricitions on any folders
Applications and services
Running application / services
Installed applications - Check for vulnerable versions
Application config files
Jobs / CRONS
Network
Network details
Existing connections
USER and sensitive info
FileSystem
Find SUID Files
Writable file and nobody files
Writable by current user
Any script files that we can modify?
Any service running by root?
Find password
Interesting files
Exploitation techniques
SUID
find / -perm -4000 -type f -exec ls -la {} 2>/dev/null Check GTFOBins
Is suid bit set on these applications?
Is there a custom SUID / SUDO application?
How can this application be run? Can be modify the path variable so that it will execute something else
NFS priv esc
https://medium.com/@Kan1shka9/hacklab-vulnix-walkthrough-b2b71534c0eb
Linux capability
Mysql run by root
Docker group
SSH bad keys attack
LINKS
https://book.hacktricks.xyz/linux-unix/linux-privilege-escalation-checklist https://blog.g0tmi1k.com/2011/08/basic-linux-privilege-escalation/ https://sushant747.gitbooks.io/total-oscp-guide/content/privilege_escalation_-_linux.html https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Linux%20-%20Privilege%20Escalation.md
Windows Privilege Escalation
https://github.com/Sp4c3Tr4v3l3r/OSCP/blob/main/Windows%20Privilege%20Escalation.md
https://github.com/gtworek/Priv2Admin
Windows
Windows Privilege Escalation
Check OS, Patch level, Basic
Firewall / AV / Defender
Network
Checklist automated tools
Installed applications and services
Scheduled Tasks
Startups and autoruns
Service Permissions
Check if service config can be modified
Check service with weak file permission
Unquoted Service Path
AlwaysInstallElevated << IF 64 bits use: %SystemRoot%\Sysnative\reg.exe
Service only available from inside
Pasword in files
Check for savecred
Can we find any SAM files?
Unattended config
Registry
REGSVC ACL
################################################################################################################################################
Unquoted Service Path Exploitation
Weak service permissions Exploitation
Weak Registry Permissions Exploitation
Weak Service Executable File Permissions Exploitation
AlwaysInstallElevated privilege Escalation
DLL hijacking
Stored credentials
Get passwords from windows registry
Search for password in registry
Files that may contain passwords
Find all weak folder permissions per drive.
Find all weak file permissions per drive.
LINK
https://www.fuzzysecurity.com/tutorials/16.html https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Windows%20-%20Privilege%20Escalation.md https://www.absolomb.com/2018-01-26-Windows-Privilege-Escalation-Guide/ https://sushant747.gitbooks.io/total-oscp-guide/content/privilege_escalation_windows.html
Last updated