user-secretFile 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:

    1. Create whitelist of legitimate user agents

    2. Include common system processes

    3. Document legitimate services (Windows Update, AV)

    4. 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

  1. Identify suspicious user agents

  2. Analyze transfer patterns

  3. Cross-reference with whitelist

  4. Document new threat patterns

Additional Resources