(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
prestige.dll 8 2026-07-01 5 days ago
2m96.exe 6 2026-06-30 5 days, 20 hours ago
KincoBuilderV85En.exe 4 2026-06-24 1 week, 5 days ago
nopggplus.dll 5 2026-06-12 3 weeks, 2 days ago
superman.exe 6 2026-04-20 2 months, 2 weeks ago
b2a17fbdf536bd79dba9eb5e4ea3...0fdd7eb07ca6c5bdf73de001.exe 11 2026-04-07 2 months, 4 weeks ago
FilterKeysSetter.exe 5 2026-03-28 3 months, 1 week ago
UnPackMe_VMProtect_1.53.exe 7 2026-03-19 3 months, 2 weeks ago
x64_Acrobat.exe 9 2026-01-30 5 months ago
x64_Acrobat.exe 9 2026-01-30 5 months ago
View All

Created

June 20, 2022

Last Revised

March 27, 2026