Detection rules › Sigma

Suspicious Svchost Process Access

Status
test
Severity
high
Log source
category process_access, product windows
Author
Tim Burrell
Source
github.com/SigmaHQ/sigma

Detects suspicious access to the "svchost" process such as that used by Invoke-Phantom to kill the thread of the Windows event logging service.

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 10: ProcessAccess

Rule body

title: Suspicious Svchost Process Access
id: 166e9c50-8cd9-44af-815d-d1f0c0e90dde
status: test
description: Detects suspicious access to the "svchost" process such as that used by Invoke-Phantom to kill the thread of the Windows event logging service.
references:
    - https://github.com/hlldz/Invoke-Phant0m
    - https://twitter.com/timbmsft/status/900724491076214784
author: Tim Burrell
date: 2020-01-02
modified: 2023-01-30
tags:
    - attack.defense-impairment
    - attack.t1685.001
logsource:
    category: process_access
    product: windows
detection:
    selection:
        TargetImage|endswith: ':\Windows\System32\svchost.exe'
        GrantedAccess: '0x1F3FFF'
        CallTrace|contains: 'UNKNOWN'
    filter_main_msbuild:
        SourceImage|contains: ':\Program Files\Microsoft Visual Studio\'
        SourceImage|endswith: '\MSBuild\Current\Bin\MSBuild.exe'
        # Just to make sure it's "really" .NET :)
        CallTrace|contains:
            - 'Microsoft.Build.ni.dll'
            - 'System.ni.dll'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_*

Stage 1: selection

selection:
    TargetImage|endswith: ':\Windows\System32\svchost.exe'
    GrantedAccess: '0x1F3FFF'
    CallTrace|contains: 'UNKNOWN'

Stage 2: not filter_main_msbuild

filter_main_msbuild:
    SourceImage|contains: ':\Program Files\Microsoft Visual Studio\'
    SourceImage|endswith: '\MSBuild\Current\Bin\MSBuild.exe'
    CallTrace|contains:
        - 'Microsoft.Build.ni.dll'
        - 'System.ni.dll'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
CallTracematchMicrosoft.Build.ni.dllexcludes:CallTrace field:"CallTrace" value:"Microsoft.Build.ni.dll"
CallTracematchSystem.ni.dllexcludes:CallTrace field:"CallTrace" value:"System.ni.dll"
SourceImageends_with\MSBuild\Current\Bin\MSBuild.exeexcludes:SourceImage field:"SourceImage" value:"\MSBuild\Current\Bin\MSBuild.exe"
SourceImagematch:\Program Files\Microsoft Visual Studio\excludes:SourceImage field:"SourceImage" value:":\Program Files\Microsoft Visual Studio\"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CallTracematch
  • UNKNOWN corpus 5 (sigma 3, elastic 2)
field:"CallTrace" kind:match value:"UNKNOWN"
GrantedAccesseq
  • 0x1F3FFF corpus 3 (sigma 2, splunk 1)
field:"GrantedAccess" kind:eq value:"0x1F3FFF"
TargetImageends_with
  • :\Windows\System32\svchost.exe
field:"TargetImage" kind:ends_with value:":\Windows\System32\svchost.exe"