File Transfer Detection & Evasion Techniques
Detection Methods
1. Command Line Detection
Methodology: Implement whitelisting over blacklisting
Key Point: Whitelisting is more time-consuming but provides better security
Best Practice: Focus on detecting unusual command-line patterns
2. HTTP Protocol Analysis
Focus Area: User Agent String Detection
Implementation Steps:
Create whitelist of legitimate user agents
Include common system processes
Document legitimate services (Windows Update, AV)
Configure SIEM for user agent monitoring
Common Transfer Methods & Detection Signatures
1. PowerShell Invoke-WebRequest
2. WinHttpRequest
3. Msxml2.XMLHTTP
4. Certutil
5. BITS Transfer
Evasion Techniques
1. User Agent Manipulation
Listing Available User Agents
Common User Agent Strings
Internet Explorer:
Firefox:
Chrome:
Opera:
Safari:
Custom User Agent Implementation
2. LOLBAS (Living Off The Land Binaries)
Purpose: Bypass application whitelisting
Example Using GfxDownloadWrapper.exe:
Detection & Defense Methodology Checklist
Immediate Actions
Regular Monitoring
Investigation Steps
Identify suspicious user agents
Analyze transfer patterns
Cross-reference with whitelist
Document new threat patterns
Additional Resources
LOLBAS Project (Windows): https://lolbas-project.github.io/
GTFOBins (Linux): https://gtfobins.github.io/