T1564.003 - Hidden Window#

Adversaries may use hidden windows to conceal malicious activity from the plain sight of users. In some cases, windows that would typically be displayed when an application carries out an operation can be hidden. This may be utilized by system administrators to avoid disrupting user work environments when carrying out administrative tasks.

On Windows, there are a variety of features in scripting languages in Windows, such as PowerShell, Jscript, and Visual Basic to make windows hidden. One example of this is powershell.exe -WindowStyle Hidden. (Citation: PowerShell About 2019)

Similarly, on macOS the configurations for how applications run are listed in property list (plist) files. One of the tags in these files can be apple.awt.UIElement, which allows for Java applications to prevent the application’s icon from appearing in the Dock. A common use for this is when applications run in the system tray, but don’t also want to show up in the Dock.

Adversaries may abuse these functionalities to hide otherwise visible windows from users so as not to alert the user to adversary activity on the system.(Citation: Antiquated Mac Malware)

Atomic Tests#

Atomic Test #1 - Hidden WindowLaunch PowerShell with the “-WindowStyle Hidden” argument to conceal PowerShell windows by setting the WindowStyle parameter to hidden.#

Upon execution a hidden PowerShell window will launch calc.exe Supported Platforms: windows#### Attack Commands: Run with powershell

Start-Process powershell.exe -WindowStyle hidden calc.exe
Invoke-AtomicTest T1564.003 -TestNumbers 1

Atomic Test #2 - Headless Browser Accessing MockbinThe following Atomic Red Team test leverages the Chrome headless browser to access a mockbin site. Create your own Mockbin.org site and replace the BIN in the inputs.#

The default Mockbin ID forwards to google.com and you may view the details here https://mockbin.org/bin/f6b9a876-a826-4ac0-83b8-639d6ad516ec/view. Reference: https://cert.gov.ua/article/5702579 Supported Platforms: windows#### Attack Commands: Run with command_prompt

start "" chrome --headless --disable-gpu https://mockbin.org/bin/f6b9a876-a826-4ac0-83b8-639d6ad516ec
Invoke-AtomicTest T1564.003 -TestNumbers 2

Cleanup:#

taskkill /im chrome /f
Invoke-AtomicTest T1564.003 -TestNumbers 2 -Cleanup

Detection#

Monitor processes and command-line arguments for actions indicative of hidden windows. In Windows, enable and configure event logging and PowerShell logging to check for the hidden window style. In MacOS, plist files are ASCII text files with a specific format, so they’re relatively easy to parse. File monitoring can check for the apple.awt.UIElement or any other suspicious plist tag in plist files and flag them.