T1036
Masquerading
Description from ATT&CK
Adversaries may attempt to manipulate features of their artifacts to make them appear legitimate or benign to users and/or security tools. Masquerading occurs when the name or location of an object, legitimate or malicious, is manipulated or abused for the sake of evading defenses and observation. This may include manipulating file metadata, tricking users into misidentifying the file type, and giving legitimate task or service names.
Renaming abusable system utilities to evade security monitoring is also a form of Masquerading.(Citation: LOLBAS Main Site)
Atomic Tests
- Atomic Test #1: System File Copied to Unusual Location
- Atomic Test #2: Malware Masquerading and Execution from Zip File
- Atomic Test #3: Masquerading File Extension Restoration via PowerShell and esentutl
Atomic Test #1: System File Copied to Unusual Location
It may be suspicious seeing a file copy of an EXE in System32 or SysWOW64 to a non-system directory or executing from a non-system directory.
Supported Platforms: Windows
auto_generated_guid: 51005ac7-52e2-45e0-bdab-d17c6d4916cd
Attack Commands: Run with powershell!
copy-item "$env:windir\System32\cmd.exe" -destination "$env:allusersprofile\cmd.exe"
start-process "$env:allusersprofile\cmd.exe"
sleep -s 5
stop-process -name "cmd" | out-nullCleanup Commands
remove-item "$env:allusersprofile\cmd.exe" -force -erroraction silentlycontinueAtomic Test #2: Malware Masquerading and Execution from Zip File
When the file is unzipped and the README.cmd file opened, it executes and changes the .pdf to .dll and executes the dll. This is a BazaLoader technique as reported here
Supported Platforms: Windows
auto_generated_guid: 4449c89b-ec82-43a4-89c1-91e2f1abeecc
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| url | Location of zip file | url | https://github.com/redcanaryco/atomic-red-team/raw/master/atomics/T1036/bin/T1036.zip |
Attack Commands: Run with powershell!
Expand-Archive -Path "PathToAtomicsFolder\..\ExternalPayloads\T1036.zip" -DestinationPath "$env:userprofile\Downloads\T1036" -Force
cd "$env:userprofile\Downloads\T1036"
cmd /c "$env:userprofile\Downloads\T1036\README.cmd" >$null 2>$nullCleanup Commands
taskkill /IM Calculator.exe /f >$null 2>$null
Remove-Item "$env:userprofile\Downloads\T1036" -recurse -ErrorAction IgnoreDependencies: Run with powershell!
Description: Zip file must be present.
Check Prereq Commands
if (Test-Path "PathToAtomicsFolder\..\ExternalPayloads\T1036.zip") {exit 0} else {exit 1}Get Prereq Commands
New-Item -Type Directory "PathToAtomicsFolder\..\ExternalPayloads\" -ErrorAction ignore -Force | Out-Null
Invoke-WebRequest #{url} -OutFile "PathToAtomicsFolder\..\ExternalPayloads\T1036.zip" -UseBasicParsingAtomic Test #3: Masquerading File Extension Restoration via PowerShell and esentutl
Simulates the technique of restoring or altering file extensions using the built-in Windows database utility esentutl.exe via PowerShell. Threat actors such as menuPass (G0045) have leveraged esentutl to copy and rename files (such as changing payloads masquerading as .txt back to true executable types) to evade defenses and bypass simple name-based monitoring.
Supported Platforms: Windows
auto_generated_guid: ba3f1b66-0c42-4cef-b316-12cff72b70db
Inputs
| Name | Description | Type | Default Value |
|---|---|---|---|
| workdir | Working directory path to stage the files. | path | C:\Users\Public\Libraries\staging |
Attack Commands: Run with powershell!
$WorkDir = "#{workdir}"
if (-not (Test-Path -Path $WorkDir)) {
New-Item -ItemType Directory -Path $WorkDir -Force | Out-Null
}
$SourceFile = Join-Path $WorkDir "payload.txt"
$DestFile = Join-Path $WorkDir "payload.exe"
"This is actually a malicious executable" | Out-File -FilePath $SourceFile -Encoding ascii -Force
$EsentutlArgs = @("/y", $SourceFile, "/d", $DestFile, "/o")
$null = & "esentutl.exe" @EsentutlArgs 2>&1
if (Test-Path -Path $DestFile) {
Write-Host " -> Copied payload.txt to payload.exe (true extension revealed)"
} else {
Write-Host " [!] esentutl copy failed"
}Cleanup Commands
Remove-Item -Path "C:\Users\Public\Libraries\staging\payload.txt" -Force -ErrorAction SilentlyContinue
Remove-Item -Path "C:\Users\Public\Libraries\staging\payload.exe" -Force -ErrorAction SilentlyContinue
if (Test-Path "C:\Users\Public\Libraries\staging") {
if ((Get-ChildItem "C:\Users\Public\Libraries\staging").Count -eq 0) {
Remove-Item -Path "C:\Users\Public\Libraries\staging" -Force
}
}Atomic test(s) for this technique last updated: 2026-11-06 23:23:51 UTC