

































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


































Disclaimer & Scope
Table of Contents
No. Section 1 Workflow 2 Linux Essentials 3 Linux Enumeration 4 Windows Essentials 5 Networking 6 Nmap 7 Services 8 SMB 9 Web 10 Web/API Requests 11 Credential Testing 12 File Transfer 13 Shells 14 Linux Privilege Escalation 15 Windows Privilege Escalation 16 PowerShell 17 Enumeration Tools 18 Impacket 19 Hash/Credential Reference 20 File Locations 21 Ports 22 Decision Trees 23 Troubleshooting 24 Reporting 25 Rapid Revision 26 50 Practice Questions 27 Answer Key 28 Verification Notes
2. Linux Terminal Essentials
Command pwd Purpose Current directory Lab example pwd Look for Where relative paths resolve Command ls Purpose Directory contents Lab example ls -lah /tmp Look for Permissions, owners, timestamps, hidden entries Command find Purpose Filesystem search Lab example find /var/www -type f -name '*.conf' 2>/dev/null Look for Files matching criteria Command grep Purpose Text search Lab example grep -Rni 'password' /var/www 2>/dev/null Look for Context requiring validation Command awk Purpose Field processing Lab example awk -F: '{print $1}' /etc/passwd Look for Structured fields Command sed Purpose Text selection/transformation Lab example sed -n '1,20p' config.txt Look for Selected lines Command cut Purpose Field extraction Lab example cut -d: -f1 /etc/passwd Look for Specific fields Command sort Purpose Sort lines Lab example sort -u hosts.txt Look for Normalized lists Command uniq Purpose Collapse adjacent duplicates Lab example sort hosts.txt | uniq -c Look for Duplicate/frequency data Command xargs Purpose Build command arguments Lab example printf '%s\n' *.log | xargs -n1 file Look for Input-to-argument conversion Command strings Purpose Printable strings from binary Lab example strings sample.bin | head Look for Embedded text clues
Command file Purpose Identify likely file type Lab example file upload.bin Look for Content-based type clues Command stat Purpose File metadata Lab example stat /etc/passwd Look for Mode, owner, timestamps Command tee Purpose Copy stdin to file and stdout Lab example id | tee identity.txt Look for Capture output Command wc Purpose Count lines/words/bytes Lab example wc -l users.txt Look for Counts Command diff Purpose Compare files Lab example diff -u baseline.txt current.txt Look for Changes Command basename Purpose Final path component Lab example basename /opt/tools/check.sh Look for Path manipulation Command dirname Purpose Parent path Lab example dirname /opt/tools/check.sh Look for Parent path
4. Windows Command-Line Essentials
Command Primary use whoami /groups Identity and group context whoami /priv Assigned Windows privileges systeminfo OS/build/hardware information ipconfig /all Network/DNS configuration route print Routing table arp -a ARP cache netstat -ano Connections/listeners with PIDs tasklist /svc Processes/services sc query Service states sc qc Service configuration schtasks /query /fo LIST /v Scheduled tasks icacls Windows ACLs findstr /s /i "password" *.config Controlled text search reg query HKLM\Software Registry inspection
5. Networking Command Cheat Sheet
Command Interpretation ping Basic ICMP reachability; no response does not prove the host is down. traceroute / tracert Path/hop observation; missing hops can be filtering. ip addr Linux addresses/interfaces. ip route Linux routing table. dig A DNS lookup. nslookup Common Windows/Linux DNS lookup. host -t MX Compact DNS record query.
7. Service Enumeration
Service Port Tools Inspect FTP 21 ftp Banner, authentication, directory access SSH 22 ssh Version/authentication methods SMTP 25/587 nc/openssl s_client Banner/capabilities DNS 53 dig/host/nslookup Records/resolver behavior HTTP/HTTPS 80/443 curl/ffuf/feroxbuster/gobuster Headers/status/routes/content SMB 445 smbclient/smbmap/rpcclient Shares/permissions/auth context NFS 2049 showmount Exports/permissions SNMP 161 snmpwalk/snmpget Management information LDAP 389/636 ldapsearch Directory context RDP 3389 RDP client Service/authentication WinRM 5985/5986 PowerShell/client Endpoint/authentication MySQL 3306 mysql Version/authentication MSSQL 1433 sqlcmd/client Instance/authentication PostgreSQL 5432 psql Version/authentication Redis 6379 redis-cli Protection/authentication RPC 111 rpcinfo RPC programs Telnet 23 telnet/nc Banner/authentication
8. SMB Enumeration
smbclient -L //192.0.2.10 -N smbclient //192.0.2.10/share -U user smbmap -H 192.0.2. rpcclient -U 'user%password' 192.0.2. enum4linux-ng 192.0.2.
10. Web Requests & API Testing
Task Example Purpose GET curl -i http://192.0.2.10/api/items Inspect response POST JSON curl -i -X POST -H 'Content-Type: application/json' -d '{"name":"lab"}' http://192.0.2.10/api/items
Match media type/body
Cookie curl -i -H 'Cookie: session=LABVALUE' http://192.0.2.10/account
Replay an authorized lab session
Redirects curl -i -L http://192.0.2.10/ Compare destinations
11. Password & Credential Testing
Tool Role Focus John the Ripper Offline password auditing Hash format, wordlists, rules Hashcat Offline password auditing Hash mode, dictionaries, masks Hydra Online authentication testing Protocol, concurrency, rate limits
13. Shells & Shell Stabilization
Concept Key point Reverse shell Target initiates the connection to the listener. Bind shell Target listens for an incoming connection. Non-interactive shell May lack job control, completion, history and terminal behavior. PTY Can provide a more terminal-like Unix session when supported. Stabilization Improve terminal usability; it does not itself elevate privileges.
14. Linux Privilege-Escalation Enumeration
Command Purpose sudo -l Review sudo permissions find / -perm -4000 -type f 2>/dev/null Find SUID files find / -perm -2000 -type f 2>/dev/null Find SGID files getcap -r / 2>/dev/null Find capabilities find / -writable -type f 2>/dev/null Find writable files for correlation ps auxww Inspect processes systemctl list-units --type=service --state=running
Inspect active services
find /etc/cron* -maxdepth 2 -type f -ls 2>/dev/null
Inspect common cron locations
find / -name '.conf' -o -name '.ini' 2>/dev/null
Locate configuration files
find /home -name 'id_*' -o -name 'authorized_keys' 2>/dev/null
Locate common SSH key paths
16. PowerShell
Command Use Get-Help Get-Process -Examples Discover help Get-Command Network Discover commands Get-Process | Sort-Object CPU -Descending Sort process objects Get-Service | Where-Object Status -eq Running Filter services Get-ChildItem C:\ProgramData -Force List files Get-Process | Select-Object Name,Id Select properties Get-ChildItem *.log | ForEach-Object {$_.FullName}
Process pipeline items
Get-ChildItem | Measure-Object Measure items Get-Content .\notes.txt Read text Test-NetConnection 192.0.2.10 -Port 443 Test TCP connectivity
17. Common Enumeration Tools
Tool Purpose Best practice LinPEAS Linux local enumeration Validate manually WinPEAS Windows local enumeration Prioritize high-signal results pspy Process activity observation Use to identify recurring activity Nmap Network/service enumeration Correlate with direct behavior Netcat Simple TCP/UDP client/listener Know which side listens Socat Bidirectional transport Understand endpoints NetExec Network-service enumeration/auth workflows Use explicit scope/credentials BloodHound Relationship/attack-path graphing Treat paths as hypotheses