Query: rule covering Detects PowerShell download and execution cradles.
Matching passage: Sigma rule: Detects PowerShell download and execution cradles.. Logsource: windows / process_creation. Rule: title: PowerShell Download and Execution Cradles id: 85b0b087-eddf-4a2b-b033-d771fa2b9775 status: test description: Detects PowerShell download and execution cradles. references: - https://github.com/VirtualAlllocEx/Payload-Download-Cradles/blob/88e8eca34464a547c90d9140d70e9866dcbc6a12/Download-Cradles.cmd - https://labs.withsecure.com/publications/fin7-target-veeam-servers author: Florian Roth (Nextron Systems) date: 2022-03-24 modified: 2025-07-18 tags: - attack.execution - attack.t1059 logsource: product: windows category: process_creation detection: selection_download: CommandLine|contains: - .DownloadString( - .DownloadFile( - 'Invoke-WebRequest ' - 'iwr ' - 'Invoke-RestMethod ' - 'irm ' selection_iex: CommandLine|contains: - ;iex $ - '| IEX' - '|IEX ' - I`E`X - I`EX - IE`X - 'iex ' - IEX ( - IEX( - Invoke-Expression condition: all of selection_* falsepositives: - Some PowerShell installers were seen using similar combinations. Apply filters accordingly level: high
Near-miss passage: Sigma rule: Detects the use of WinAPI Functions via the commandline. As seen used by threat actors via the tool winapiexec. Logsource: windows / process_creation. Rule: title: Potential WinAPI Calls Via CommandLine id: ba3f5c1b-6272-4119-9dbd-0bc8d21c2702 related: - id: 03d83090-8cba-44a0-b02f-0b756a050306 type: derived status: test description: Detects the use of WinAPI Functions via the commandline. As seen used by threat actors via the tool winapiexec references: - https://twitter.com/m417z/status/1566674631788007425 author: Nasreddine Bencherchali (Nextron Systems) date: 2022-09-06 modified: 2025-03-06 tags: - attack.execution - attack.t1106 logsource: category: process_creation product: windows detection: selection: CommandLine|contains: - AddSecurityPackage - AdjustTokenPrivileges - Advapi32 - CloseHandle - CreateProcessWithToken - CreatePseudoConsole - CreateRemoteThread - CreateThread - CreateUserThread - DangerousGetHandle - DuplicateTokenEx - EnumerateSecurityPackages - FreeHGlobal - FreeLibrary - GetDelegateForFunctionPointer - GetLogonSessionData - GetModuleHandle - GetProcAddress - GetProcessHandle - GetTokenInformation - ImpersonateLoggedOnUser - kernel32 - LoadLibrary - memcpy - MiniDumpWriteDump - ntdll - OpenDesktop - OpenProcess - OpenProcessToken - OpenThreadToken - OpenWindowStation - PtrToString - QueueUserApc - ReadProcessMemory - RevertToSelf - RtlCreateUserThread - secur32 - SetThreadToken - VirtualAlloc - VirtualFree - VirtualProtect - WaitForSingleObject - WriteInt32 - WriteProcessMemory - ZeroFreeGlobalAllocUnicode filter_optional_mpcmdrun: Image|endswith: \MpCmdRun.exe CommandLine|contains: GetLoadLibraryWAddress32 filter_optional_compatTelRunner: ParentImage|endswith: \CompatTelRunner.exe CommandLine|contains: - FreeHGlobal - PtrToString - kernel32 - CloseHandle condition: selection and not 1 of filter_optional_* falsepositives: - Some legitimate action or applications may use these functions. Investigate further to determine the legitimacy of the activity. level: high