Thick Client Penetration Testing Methodology
1. Pre-Engagement & Scoping
1.1 Initial Planning
1.2 Technical Scoping
Platform identification
Copy Operating System:
β‘ Windows (Version/Build)
β‘ Linux (Distribution)
β‘ macOS (Version)
Architecture:
β‘ x86 (32-bit)
β‘ x64 (64-bit)
β‘ ARM
Development Platform:
β‘ .NET Framework/Core
β‘ Java
β‘ Electron
β‘ Native (C++/Delphi)
1.3 Business Logic Analysis
1.4 Architecture Review
Copy Data Flow Components:
β‘ Client-side processing
β‘ Server communication
β‘ Local storage
β‘ External integrations
β‘ Database interactions
2.1 Installation Analysis
Copy # Common installation paths
Get-ChildItem "C:\Program Files" -Recurse
Get-ChildItem "C:\Program Files (x86)" -Recurse
Get-ChildItem "$env:LOCALAPPDATA" -Recurse
Get-ChildItem "$env:APPDATA" -Recurse
2.2 File System Enumeration
Document application directory structure
Copy tree /F > directory_structure.txt # Windows
tree -a > directory_structure.txt # Linux
Identify config files
Copy β‘ .config, .ini, .xml, .json
β‘ Connection strings
β‘ API endpoints
β‘ Feature flags
Locate log files and analyze content
Copy Get-Content *.log | Select-String "password", "key", "secret", "token"
2.3 Dependencies Analysis
Copy # Windows
Dependencies.exe <executable>
PEStudio.exe <executable>
# Linux
ldd <executable>
objdump -p <executable>
2.4 Registry Analysis
Copy # Export relevant registry keys
reg export HKLM\Software\<AppName> app_hklm.reg
reg export HKCU\Software\<AppName> app_hkcu.reg
# Monitor registry access
Process Monitor -> Filter -> Registry Activity
3. Static Analysis
3.1 Binary Analysis
Copy # Initial analysis
strings -n 8 <binary>
pestudio <binary>
die <binary>
# Identify protection/packing
detect it easy (die) <binary>
PEiD <binary>
3.2 Decompilation
.NET Applications
Copy # Use dnSpy or dotPeek
dnSpy.exe <assembly>
# Check for obfuscation
de4dot.exe <assembly>
Java Applications
Copy # Decompile JAR/class files
jd-gui <jar>
procyon <class>
# Extract resources
jar xf <jar>
Native Applications
Copy # Load in Ghidra/IDA
# Analyze key functions:
β‘ Authentication
β‘ Cryptographic operations
β‘ File I/O
β‘ Network communication
3.3 Code Review Focus Areas
Copy β‘ Hardcoded credentials
β‘ API keys and tokens
β‘ Connection strings
β‘ Cryptographic material
β‘ Debug/test code
β‘ Error handling
β‘ File operations
β‘ Command execution
4. Dynamic Analysis
4.1 Runtime Monitoring
Copy # Process monitoring
Start-Process procmon.exe
Start-Process "Process Hacker.exe"
# Network monitoring
Start-Process wireshark.exe
4.2 Debugging Setup
Copy # .NET debugging
dnSpy -> Debug -> Start Debugging
# Native debugging
x64dbg <executable>
WinDbg <executable>
4.3 Frida Instrumentation
Copy // Hook function calls
frida-trace -i "function*" <process>
// Modify return values
Interceptor.attach(targetAddr, {
onLeave: function(retval) {
retval.replace(0x1);
}
});
4.4 Behavioral Analysis
5. Network Communication Testing
5.1 Traffic Interception Setup
Copy # Burp Suite setup
java -jar burpsuite.jar
# Configure proxy: 127.0.0.1:8080
# Fiddler setup
fiddler.exe
# Enable HTTPS decryption
5.2 SSL/TLS Analysis
Copy # Check certificate pinning
openssl s_client -connect host:port
# Bypass certificate validation
# .NET:
System.Net.ServicePointManager.ServerCertificateValidationCallback = {$true}
# Java:
-Djavax.net.ssl.trustAll=true
5.3 Traffic Analysis
6. Authentication & Authorization Testing
6.1 Authentication Analysis
Copy Test Vectors:
β‘ Null credentials
β‘ Default credentials
β‘ SQL injection
β‘ Authentication bypass
β‘ Remember me functionality
β‘ Password reset mechanism
6.2 Session Management
6.3 Credential Storage
Copy # Memory analysis
procdump.exe -ma <PID>
strings64.exe memory.dmp | findstr /i "password"
# File analysis
findstr /s /i "password" *.*
7. Local Storage Analysis
7.1 File System
Copy # Search for sensitive files
Get-ChildItem -Recurse -Include *.config,*.ini,*.xml,*.json
Select-String -Path * -Pattern "password","key","secret"
7.2 Registry Analysis
Copy # Export and analyze registry
reg export HKLM\Software\* hklm.reg
reg export HKCU\Software\* hkcu.reg
7.3 Temporary Files
Copy # Windows temp locations
%TEMP%
%APPDATA%
%LOCALAPPDATA%
# Linux temp locations
/tmp
/var/tmp
~/.cache
8. Reverse Engineering & Code Injection
8.1 Binary Analysis
Copy # Identify interesting functions
β‘ Authentication routines
β‘ Cryptographic operations
β‘ Network communication
β‘ File operations
8.2 Code Injection
Copy // DLL injection template
BOOL APIENTRY DllMain(HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
// Injection code here
break;
}
return TRUE;
}
8.3 Function Hooking
Copy // Frida hook template
Interceptor.attach(ptr('ADDRESS'), {
onEnter: function(args) {
// Pre-function code
},
onLeave: function(retval) {
// Post-function code
}
});
9. Privilege Escalation & Post-Exploitation
9.1 Local Privilege Escalation
Copy # Check file permissions
icacls "C:\Program Files\*"
icacls "C:\Program Files (x86)\*"
# Check service permissions
sc qc <service_name>
accesschk.exe -ucqv <service_name>
9.2 Service Exploitation
Copy # Monitor service creation
procmon.exe -> Filter -> Operation is CreateFile
# Check for DLL hijacking
Process Monitor -> Filter -> Result contains "NAME NOT FOUND"
Copy # Dump process memory
procdump.exe -ma <PID>
# Extract credentials
mimikatz.exe
sekurlsa::logonpasswords
10. Reporting
10.1 Vulnerability Documentation
Copy For each finding:
β‘ Description
β‘ Reproduction steps
β‘ Impact
β‘ Risk rating
β‘ Remediation advice
10.2 Evidence Collection
10.3 Report Structure
Copy 1. Executive Summary
β‘ Overview
β‘ Risk summary
β‘ Key findings
2. Technical Details
β‘ Methodology
β‘ Findings
β‘ Reproduction steps
β‘ Impact analysis
3. Remediation
β‘ Short-term fixes
β‘ Long-term recommendations
β‘ Strategic advice
11. Optional Add-Ons
11.1 Hybrid Application Testing
11.2 API Security Testing
Copy β‘ API documentation review
β‘ Authentication mechanisms
β‘ Rate limiting
β‘ Input validation
β‘ Error handling
β‘ Data exposure
11.3 Source Code Review
Copy Focus Areas:
β‘ Authentication mechanisms
β‘ Cryptographic implementations
β‘ File operations
β‘ Network communication
β‘ Error handling
β‘ Input validation
β‘ Third-party components