Detection rules › Sigma

Creation of an Executable by an Executable

Status
test
Severity
low
Log source
category file_event, product windows
Author
frack113
Source
github.com/SigmaHQ/sigma

Detects the creation of an executable by another executable.

Known false positives

  • Software installers
  • Update utilities
  • 32bit applications launching their 64bit versions

MITRE ATT&CK coverage

TacticTechniques
Resource Development

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 11: FileCreate

Rule body

title: Creation of an Executable by an Executable
id: 297afac9-5d02-4138-8c58-b977bac60556
status: test
description: Detects the creation of an executable by another executable.
references:
    - Internal Research
author: frack113
date: 2022-03-09
modified: 2025-02-24
tags:
    - attack.resource-development
    - attack.t1587.001
    - detection.threat-hunting
logsource:
    product: windows
    category: file_event
detection:
    selection:
        Image|endswith: '.exe'
        TargetFilename|endswith: '.exe'
    filter_main_generic_1:
        Image|endswith:
            - ':\Windows\System32\msiexec.exe'
            - ':\Windows\system32\cleanmgr.exe'
            - ':\Windows\explorer.exe'
            - ':\WINDOWS\system32\dxgiadaptercache.exe'
            - ':\WINDOWS\system32\Dism.exe'
            - ':\Windows\System32\wuauclt.exe'
    filter_main_update:
        # Security_UserID: S-1-5-18
        # Example:
        #   TargetFilename: C:\Windows\SoftwareDistribution\Download\803d1df4c931df4f3e50a022cda56e88\WindowsUpdateBox.exe
        Image|endswith: ':\WINDOWS\system32\svchost.exe'
        TargetFilename|contains: ':\Windows\SoftwareDistribution\Download\'
    filter_main_upgrade:
        Image|endswith: ':\Windows\system32\svchost.exe'
        TargetFilename|contains|all:
            # Example:
            #   This example was seen during windows upgrade
            #   TargetFilename: :\WUDownloadCache\803d1df4c931df4f3e50a022cda56e29\WindowsUpdateBox.exe
            - ':\WUDownloadCache\'
            - '\WindowsUpdateBox.exe'
    filter_main_windows_update_box:
        # This FP was seen during Windows Upgrade
        # ParentCommandLine: C:\WINDOWS\system32\svchost.exe -k netsvcs -p -s wuauserv
        Image|contains: ':\WINDOWS\SoftwareDistribution\Download\'
        Image|endswith: '\WindowsUpdateBox.Exe'
        TargetFilename|contains: ':\$WINDOWS.~BT\Sources\'
    filter_main_tiworker:
        Image|contains: ':\Windows\WinSxS\'
        Image|endswith: '\TiWorker.exe'
    filter_main_programfiles:
        - Image|contains:
              - ':\Program Files\'
              - ':\Program Files (x86)\'
        - TargetFilename|contains:
              - ':\Program Files\'
              - ':\Program Files (x86)\'
    filter_main_defender:
        Image|contains:
            - ':\ProgramData\Microsoft\Windows Defender\'
            - ':\Program Files\Windows Defender\'
    filter_main_windows_apps:
        TargetFilename|contains: '\AppData\Local\Microsoft\WindowsApps\'
    filter_main_teams:
        Image|endswith: '\AppData\Local\Microsoft\Teams\Update.exe'
        TargetFilename|endswith:
            - '\AppData\Local\Microsoft\Teams\stage\Teams.exe'
            - '\AppData\Local\Microsoft\Teams\stage\Squirrel.exe'
            - '\AppData\Local\Microsoft\SquirrelTemp\tempb\'
    filter_main_mscorsvw:
        # Example:
        #   ParentCommandLine: "C:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe" ExecuteQueuedItems /LegacyServiceBehavior
        #   Image: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorsvw.exe
        #       TargetFilename: C:\Windows\assembly\NativeImages_v4.0.30319_32\Temp\4f8c-0\MSBuild.exe
        #       TargetFilename: C:\Windows\assembly\NativeImages_v4.0.30319_32\Temp\49bc-0\testhost.net47.x86.exe
        #       TargetFilename: C:\Windows\assembly\NativeImages_v4.0.30319_32\Temp\39d8-0\fsc.exe
        Image|contains:
            - ':\Windows\Microsoft.NET\Framework\'
            - ':\Windows\Microsoft.NET\Framework64\'
            - ':\Windows\Microsoft.NET\FrameworkArm\'
            - ':\Windows\Microsoft.NET\FrameworkArm64\'
        Image|endswith: '\mscorsvw.exe'
        TargetFilename|contains: ':\Windows\assembly\NativeImages_'
    filter_main_vscode:
        Image|contains: '\AppData\Local\'
        Image|endswith: '\Microsoft VS Code\Code.exe'
        TargetFilename|contains: '\.vscode\extensions\'
    filter_main_githubdesktop:
        Image|endswith: '\AppData\Local\GitHubDesktop\Update.exe'
        # Example TargetFileName:
        #   \AppData\Local\SquirrelTemp\tempb\lib\net45\GitHubDesktop_ExecutionStub.exe
        #   \AppData\Local\SquirrelTemp\tempb\lib\net45\squirrel.exe
        TargetFilename|contains: '\AppData\Local\SquirrelTemp\'
    filter_main_windows_temp:
        - Image|contains: ':\WINDOWS\TEMP\'
        - TargetFilename|contains: ':\WINDOWS\TEMP\'
    filter_optional_python:
        Image|contains: '\Python27\python.exe'
        TargetFilename|contains:
            - '\Python27\Lib\site-packages\'
            - '\Python27\Scripts\'
            - '\AppData\Local\Temp\'
    filter_optional_squirrel:
        Image|contains: '\AppData\Local\SquirrelTemp\Update.exe'
        TargetFilename|contains: '\AppData\Local'
    filter_main_temp_installers:
        - Image|contains: '\AppData\Local\Temp\'
        - TargetFilename|contains: '\AppData\Local\Temp\'
    filter_optional_chrome:
        Image|endswith: '\ChromeSetup.exe'
        TargetFilename|contains: '\Google'
    filter_main_dot_net:
        Image|contains: ':\Windows\Microsoft.NET\Framework'
        Image|endswith: '\mscorsvw.exe'
        TargetFilename|contains: ':\Windows\assembly'
    condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
    # Please contribute to FP to increase the level
    - Software installers
    - Update utilities
    - 32bit applications launching their 64bit versions
level: low

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_* and not 1 of filter_optional_*

Stage 1: selection

selection:
    Image|endswith: '.exe'
    TargetFilename|endswith: '.exe'

Stage 2: not filter_main_*

filter_main_generic_1:
    Image|endswith:
        - ':\Windows\System32\msiexec.exe'
        - ':\Windows\system32\cleanmgr.exe'
        - ':\Windows\explorer.exe'
        - ':\WINDOWS\system32\dxgiadaptercache.exe'
        - ':\WINDOWS\system32\Dism.exe'
        - ':\Windows\System32\wuauclt.exe'
filter_main_update:
    Image|endswith: ':\WINDOWS\system32\svchost.exe'
    TargetFilename|contains: ':\Windows\SoftwareDistribution\Download\'
filter_main_upgrade:
    Image|endswith: ':\Windows\system32\svchost.exe'
    TargetFilename|contains|all:
        - ':\WUDownloadCache\'
        - '\WindowsUpdateBox.exe'
filter_main_windows_update_box:
    Image|contains: ':\WINDOWS\SoftwareDistribution\Download\'
    Image|endswith: '\WindowsUpdateBox.Exe'
    TargetFilename|contains: ':\$WINDOWS.~BT\Sources\'
filter_main_tiworker:
    Image|contains: ':\Windows\WinSxS\'
    Image|endswith: '\TiWorker.exe'
filter_main_programfiles:
    - Image|contains:
          - ':\Program Files\'
          - ':\Program Files (x86)\'
    - TargetFilename|contains:
          - ':\Program Files\'
          - ':\Program Files (x86)\'
filter_main_defender:
    Image|contains:
        - ':\ProgramData\Microsoft\Windows Defender\'
        - ':\Program Files\Windows Defender\'
filter_main_windows_apps:
    TargetFilename|contains: '\AppData\Local\Microsoft\WindowsApps\'
filter_main_teams:
    Image|endswith: '\AppData\Local\Microsoft\Teams\Update.exe'
    TargetFilename|endswith:
        - '\AppData\Local\Microsoft\Teams\stage\Teams.exe'
        - '\AppData\Local\Microsoft\Teams\stage\Squirrel.exe'
        - '\AppData\Local\Microsoft\SquirrelTemp\tempb\'
filter_main_mscorsvw:
    Image|contains:
        - ':\Windows\Microsoft.NET\Framework\'
        - ':\Windows\Microsoft.NET\Framework64\'
        - ':\Windows\Microsoft.NET\FrameworkArm\'
        - ':\Windows\Microsoft.NET\FrameworkArm64\'
    Image|endswith: '\mscorsvw.exe'
    TargetFilename|contains: ':\Windows\assembly\NativeImages_'
filter_main_vscode:
    Image|contains: '\AppData\Local\'
    Image|endswith: '\Microsoft VS Code\Code.exe'
    TargetFilename|contains: '\.vscode\extensions\'
filter_main_githubdesktop:
    Image|endswith: '\AppData\Local\GitHubDesktop\Update.exe'
    TargetFilename|contains: '\AppData\Local\SquirrelTemp\'
filter_main_windows_temp:
    - Image|contains: ':\WINDOWS\TEMP\'
    - TargetFilename|contains: ':\WINDOWS\TEMP\'
filter_main_temp_installers:
    - Image|contains: '\AppData\Local\Temp\'
    - TargetFilename|contains: '\AppData\Local\Temp\'
filter_main_dot_net:
    Image|contains: ':\Windows\Microsoft.NET\Framework'
    Image|endswith: '\mscorsvw.exe'
    TargetFilename|contains: ':\Windows\assembly'

Stage 3: not filter_optional_*

filter_optional_python:
    Image|contains: '\Python27\python.exe'
    TargetFilename|contains:
        - '\Python27\Lib\site-packages\'
        - '\Python27\Scripts\'
        - '\AppData\Local\Temp\'
filter_optional_squirrel:
    Image|contains: '\AppData\Local\SquirrelTemp\Update.exe'
    TargetFilename|contains: '\AppData\Local'
filter_optional_chrome:
    Image|endswith: '\ChromeSetup.exe'
    TargetFilename|contains: '\Google'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
Imagematch:\Windows\Microsoft.NET\Framework64\excludes:Image field:"Image" value:":\Windows\Microsoft.NET\Framework64\"
Imagematch:\Windows\Microsoft.NET\FrameworkArm64\excludes:Image field:"Image" value:":\Windows\Microsoft.NET\FrameworkArm64\"
Imagematch:\Windows\Microsoft.NET\FrameworkArm\excludes:Image field:"Image" value:":\Windows\Microsoft.NET\FrameworkArm\"
Imagematch:\Windows\Microsoft.NET\Framework\excludes:Image field:"Image" value:":\Windows\Microsoft.NET\Framework\"
Imageends_with\mscorsvw.exeexcludes:Image field:"Image" value:"\mscorsvw.exe"
TargetFilenamematch:\Windows\assembly\NativeImages_excludes:TargetFilename field:"TargetFilename" value:":\Windows\assembly\NativeImages_"
TargetFilenameends_with\AppData\Local\Microsoft\SquirrelTemp\tempb\excludes:TargetFilename field:"TargetFilename" value:"\AppData\Local\Microsoft\SquirrelTemp\tempb\"
TargetFilenameends_with\AppData\Local\Microsoft\Teams\stage\Squirrel.exeexcludes:TargetFilename field:"TargetFilename" value:"\AppData\Local\Microsoft\Teams\stage\Squirrel.exe"
TargetFilenameends_with\AppData\Local\Microsoft\Teams\stage\Teams.exeexcludes:TargetFilename field:"TargetFilename" value:"\AppData\Local\Microsoft\Teams\stage\Teams.exe"
Imageends_with\AppData\Local\Microsoft\Teams\Update.exeexcludes:Image field:"Image" value:"\AppData\Local\Microsoft\Teams\Update.exe"
Imageends_with:\WINDOWS\system32\svchost.exeexcludes:Image field:"Image" value:":\WINDOWS\system32\svchost.exe"
TargetFilenamematch:\Windows\SoftwareDistribution\Download\excludes:TargetFilename field:"TargetFilename" value:":\Windows\SoftwareDistribution\Download\"
Imageends_with:\Windows\system32\svchost.exeexcludes:Image field:"Image" value:":\Windows\system32\svchost.exe"
TargetFilenamematch:\WUDownloadCache\excludes:TargetFilename field:"TargetFilename" value:":\WUDownloadCache\"
TargetFilenamematch\WindowsUpdateBox.exeexcludes:TargetFilename field:"TargetFilename" value:"\WindowsUpdateBox.exe"
Imageends_with\AppData\Local\GitHubDesktop\Update.exeexcludes:Image field:"Image" value:"\AppData\Local\GitHubDesktop\Update.exe"
TargetFilenamematch\AppData\Local\SquirrelTemp\excludes:TargetFilename field:"TargetFilename" value:"\AppData\Local\SquirrelTemp\"
Imageends_with\Microsoft VS Code\Code.exeexcludes:Image field:"Image" value:"\Microsoft VS Code\Code.exe"
Imagematch\AppData\Local\excludes:Image field:"Image" value:"\AppData\Local\"
TargetFilenamematch\.vscode\extensions\excludes:TargetFilename field:"TargetFilename" value:"\.vscode\extensions\"
Imageends_with\TiWorker.exeexcludes:Image field:"Image" value:"\TiWorker.exe"
Imagematch:\Windows\WinSxS\excludes:Image field:"Image" value:":\Windows\WinSxS\"
Imageends_with\WindowsUpdateBox.Exeexcludes:Image field:"Image" value:"\WindowsUpdateBox.Exe"
Imagematch:\WINDOWS\SoftwareDistribution\Download\excludes:Image field:"Image" value:":\WINDOWS\SoftwareDistribution\Download\"
TargetFilenamematch:\$WINDOWS.~BT\Sources\excludes:TargetFilename field:"TargetFilename" value:":\$WINDOWS.~BT\Sources\"
Imagematch:\Windows\Microsoft.NET\Frameworkexcludes:Image field:"Image" value:":\Windows\Microsoft.NET\Framework"
TargetFilenamematch:\Windows\assemblyexcludes:TargetFilename field:"TargetFilename" value:":\Windows\assembly"
Imageends_with:\WINDOWS\system32\Dism.exeexcludes:Image field:"Image" value:":\WINDOWS\system32\Dism.exe"
Imageends_with:\WINDOWS\system32\dxgiadaptercache.exeexcludes:Image field:"Image" value:":\WINDOWS\system32\dxgiadaptercache.exe"
Imageends_with:\Windows\System32\msiexec.exeexcludes:Image field:"Image" value:":\Windows\System32\msiexec.exe"
Imageends_with:\Windows\System32\wuauclt.exeexcludes:Image field:"Image" value:":\Windows\System32\wuauclt.exe"
Imageends_with:\Windows\explorer.exeexcludes:Image field:"Image" value:":\Windows\explorer.exe"
Imageends_with:\Windows\system32\cleanmgr.exeexcludes:Image field:"Image" value:":\Windows\system32\cleanmgr.exe"
Imagematch:\Program Files (x86)\excludes:Image field:"Image" value:":\Program Files (x86)\"
Imagematch:\Program Files\excludes:Image field:"Image" value:":\Program Files\"
Imagematch:\Program Files\Windows Defender\excludes:Image field:"Image" value:":\Program Files\Windows Defender\"
Imagematch:\ProgramData\Microsoft\Windows Defender\excludes:Image field:"Image" value:":\ProgramData\Microsoft\Windows Defender\"
Imagematch:\WINDOWS\TEMP\excludes:Image field:"Image" value:":\WINDOWS\TEMP\"
Imagematch\AppData\Local\Temp\excludes:Image field:"Image" value:"\AppData\Local\Temp\"
TargetFilenamematch:\Program Files (x86)\excludes:TargetFilename field:"TargetFilename" value:":\Program Files (x86)\"
TargetFilenamematch:\Program Files\excludes:TargetFilename field:"TargetFilename" value:":\Program Files\"
TargetFilenamematch:\WINDOWS\TEMP\excludes:TargetFilename field:"TargetFilename" value:":\WINDOWS\TEMP\"
TargetFilenamematch\AppData\Local\Microsoft\WindowsApps\excludes:TargetFilename field:"TargetFilename" value:"\AppData\Local\Microsoft\WindowsApps\"
TargetFilenamematch\AppData\Local\Temp\excludes:TargetFilename field:"TargetFilename" value:"\AppData\Local\Temp\"
TargetFilenamematch\Python27\Lib\site-packages\excludes:TargetFilename field:"TargetFilename" value:"\Python27\Lib\site-packages\"
TargetFilenamematch\Python27\Scripts\excludes:TargetFilename field:"TargetFilename" value:"\Python27\Scripts\"
Imagematch\Python27\python.exeexcludes:Image field:"Image" value:"\Python27\python.exe"
Imageends_with\ChromeSetup.exeexcludes:Image field:"Image" value:"\ChromeSetup.exe"
TargetFilenamematch\Googleexcludes:TargetFilename field:"TargetFilename" value:"\Google"
Imagematch\AppData\Local\SquirrelTemp\Update.exeexcludes:Image field:"Image" value:"\AppData\Local\SquirrelTemp\Update.exe"
TargetFilenamematch\AppData\Localexcludes:TargetFilename field:"TargetFilename" value:"\AppData\Local"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Imageends_with
  • .exe corpus 4 (sigma 4)
field:"Image" kind:ends_with value:".exe"
TargetFilenameends_with
  • .exe corpus 21 (sigma 20, splunk 1)
field:"TargetFilename" kind:ends_with value:".exe"