(YARA) Detect GetForegroundWindow Usage

Download Raw

import "pe"
 
rule UNPROTECT_Possible_GetForegroundWindow_Evasion
{
    meta:
        description = "Attempts to detect possible usage of sandbox evasion techniques using GetForegroundWindow API, based on module imports."
        author = "Kyle Cucci"
        date = "2020-09-30"
 
    condition:
        uint16(0) == 0x5A4D and
        pe.imports("user32.dll", "GetForegroundWindow") and
        pe.imports("kernel32.dll", "Sleep")
}

Associated Techniques

Matching Samples 10 most recent

Sample Name Matching Techniques First Seen Last Seen
Sotfgmc.exe 3 2026-08-26 1 week, 2 days ago
enigma.dll 4 2026-08-09 3 weeks, 5 days ago
ietabhelper.exe 5 2026-08-01 1 month ago
Activator.exe 10 2026-07-30 1 month ago
prestige.dll 8 2026-07-01 2 months ago
2m96.exe 6 2026-06-30 2 months ago
KincoBuilderV85En.exe 4 2026-06-24 2 months, 1 week ago
nopggplus.dll 5 2026-06-12 2 months, 3 weeks ago
superman.exe 6 2026-04-20 4 months, 2 weeks ago
b2a17fbdf536bd79dba9eb5e4ea3...0fdd7eb07ca6c5bdf73de001.exe 11 2026-04-07 4 months, 4 weeks ago
View All

Created

June 20, 2022

Last Revised

March 27, 2026