LOLBAS. GitHub
LIVING OFF THE LAND / OTHER MICROSOFT BINARIES

vstest.console.exe

View source

VSTest.Console.exe is the command-line tool to run tests

01COMMAND EXAMPLES
01ATT&CK TECHNIQUES
00DETECTION RESOURCES
01CAPABILITIES
01 / TRADECRAFT

Command reference

1 examples

AWL Bypass1

EXAMPLE 01T1127

VSTest functionality may allow an adversary to executes their malware by wrapping it as a test method then build it to a .exe or .dll file to be later run by vstest.console.exe. This may both allow AWL bypass or defense bypass in general

COMMAND
vstest.console.exe {PATH:.dll}
USE CASE
Proxy Execution and AWL bypass, Adversaries may run malicious code embedded inside the test methods of crafted dll/exe
PRIVILEGES
User
OPERATING SYSTEM
Windows 10, Windows 11
Execute · DLL
02 / ON DISK

Known paths

C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe
C:\Program Files (x86)\Microsoft Visual Studio\2022\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe
03 / DEFENSIVE INTELLIGENCE

Detection & indicators

0 resources

Indicators & detection notes

  • IOC

    vstest.console.exe spawning unexpected processes

REFERENCE IMPLEMENTATIONS

Code samples

FURTHER READING

Research & resources

COMMUNITY RESEARCH

Acknowledgements

Onat Uzunyayla
Ayberk Halac