Sneed-Reactivity/yara-mikesxrs/nex/embedded_win_api.yar
Sam Sneed 08e8d462fe OMG ISTG PLS WORK
RED PILL 🔴 💊
2024-07-25 12:43:35 -05:00

29 lines
No EOL
747 B
Text

// Copyright (C) 2013 Claudio "nex" Guarnieri
rule embedded_win_api
{
meta:
author = "nex"
description = "A non-Windows executable contains win32 API functions names"
strings:
$mz = { 4d 5a }
$api1 = "CreateFileA"
$api2 = "GetProcAddress"
$api3 = "LoadLibraryA"
$api4 = "WinExec"
$api5 = "GetSystemDirectoryA"
$api6 = "WriteFile"
$api7 = "ShellExecute"
$api8 = "GetWindowsDirectory"
$api9 = "URLDownloadToFile"
$api10 = "IsBadReadPtr"
$api11 = "IsBadWritePtr"
$api12 = "SetFilePointer"
$api13 = "GetTempPath"
$api14 = "GetWindowsDirectory"
condition:
not ($mz at 0) and any of ($api*)
}