πCommunication with Processes
π― Overview
Process communication analysis focuses on identifying privilege escalation opportunities through running services and inter-process communication. Processes running with elevated privileges, especially those accessible via network services or named pipes, can provide direct escalation paths.
π Access Tokens
Concept
Access tokens describe the security context of processes/threads
Contain user identity and privilege information
Token presentation occurs with every process interaction
Token inheritance from parent processes
Key Token Privileges:
SeImpersonatePrivilege- Rogue/Juicy/Lonely Potato attacksSeAssignPrimaryTokenPrivilege- Token manipulationSeDebugPrivilege- Process debugging and memory access
π Network Service Enumeration
Active Connections Analysis
Target Service Categories
π― High-Value Services:
Port 21 - FTP (FileZilla Server)
Port 80/8080 - Web servers (IIS, XAMPP, Tomcat)
Port 3389 - RDP
Port 5985/5986 - WinRM
Port 1433 - MSSQL
π Localhost-Only Services:
Service-to-Process Mapping
π Named Pipes
Concept
Named pipes enable inter-process communication via shared memory
Client-server model - creator is server, communicator is client
Communication types:
Half-duplex - One-way (client β server)
Full-duplex - Two-way communication
Named Pipe Enumeration
Using Pipelist (Sysinternals)
Using PowerShell
Named Pipe Security Analysis
Permission Enumeration with AccessChk
Dangerous Permission Patterns
π¨ Common Attack Vectors
Web Server Exploitation
Scenario: IIS/XAMPP running as privileged user
FileZilla Server Attack
Scenario: Admin interface on localhost:14147
Splunk Universal Forwarder
Scenario: Default configuration without authentication
Default behavior: Runs as SYSTEM
Attack method: Deploy malicious applications
Impact: Direct SYSTEM-level code execution
Named Pipe Privilege Escalation
Example: WindscribeService vulnerability
π― HTB Academy Lab Solutions
Lab Environment
Target:
10.129.43.43(ACADEMY-WINLPE-SRV01)Credentials:
htb-student:HTB_@cademy_stdnt!Tools:
C:\Tools\AccessChk\
Question 1: Service on Port 21
Objective: Identify service listening on 0.0.0.0:21
Solution Steps:
Answer: filezilla server
Question 2: WRITE_DAC Privileges on Named Pipe
Objective: Find account with WRITE_DAC over \pipe\SQLLocal\SQLEXPRESS01
Solution Steps:
Answer: NT Service\MSSQL$SQLEXPRESS01
π Attack Pattern Recognition
Network Service Indicators
Named Pipe Red Flags
Service Context Analysis
π Process Communication Checklist
Network Services
Named Pipes
Attack Surface Assessment
π‘ Key Takeaways
Network services running as privileged users provide direct escalation paths
Localhost-only services often lack security controls
Named pipes with excessive permissions enable privilege escalation
Web servers with SeImpersonatePrivilege lead to SYSTEM access
Default configurations frequently contain security weaknesses
Service context matters - identify which user runs each service
Process communication analysis reveals privilege escalation opportunities through network services and inter-process communication vulnerabilities.
Last updated