Detection rules › Sigma

Suspicious Service Installed

Status
test
Severity
medium
Log source
product windows, category registry_set
Author
xknow (@xknow_infosec), xorxes (@xor_xes)
Source
github.com/SigmaHQ/sigma

Detects installation of NalDrv or PROCEXP152 services via registry-keys to non-system32 folders. Both services are used in the tool Ghost-In-The-Logs (https://github.com/bats3c/Ghost-In-The-Logs), which uses KDU (https://github.com/hfiref0x/KDU)

MITRE ATT&CK coverage

TacticTechniques
Defense ImpairmentT1685 Disable or Modify Tools

Event coverage

ProviderEventTitle
SysmonEvent ID 13RegistryEvent (Value Set)

Rule body yaml

title: Suspicious Service Installed
id: f2485272-a156-4773-82d7-1d178bc4905b
status: test
description: |
  Detects installation of NalDrv or PROCEXP152 services via registry-keys to non-system32 folders.
  Both services are used in the tool Ghost-In-The-Logs (https://github.com/bats3c/Ghost-In-The-Logs), which uses KDU (https://github.com/hfiref0x/KDU)
references:
    - https://web.archive.org/web/20200419024230/https://blog.dylan.codes/evading-sysmon-and-windows-event-logging/
author: xknow (@xknow_infosec), xorxes (@xor_xes)
date: 2019-04-08
modified: 2023-08-17
tags:
    - attack.defense-impairment
    - attack.t1685
logsource:
    category: registry_set
    product: windows
detection:
    selection:
        TargetObject:
            - 'HKLM\System\CurrentControlSet\Services\NalDrv\ImagePath'
            - 'HKLM\System\CurrentControlSet\Services\PROCEXP152\ImagePath'
    filter:
        Image|endswith:
            # Please add the full paths that you use in your environment to tighten the rule
            - '\procexp64.exe'
            - '\procexp.exe'
            - '\procmon64.exe'
            - '\procmon.exe'
            - '\handle.exe'
            - '\handle64.exe'
        Details|contains: '\WINDOWS\system32\Drivers\PROCEXP152.SYS'
    condition: selection and not filter
falsepositives:
    - Other legimate tools using this service names and drivers. Note - clever attackers may easily bypass this detection by just renaming the services. Therefore just Medium-level and don't rely on it.
level: medium

Stages and Predicates

Stage 0: condition

selection and not filter

Stage 1: selection

selection:
    TargetObject:
        - 'HKLM\System\CurrentControlSet\Services\NalDrv\ImagePath'
        - 'HKLM\System\CurrentControlSet\Services\PROCEXP152\ImagePath'

Stage 2: not filter

filter:
    Image|endswith:
        - '\procexp64.exe'
        - '\procexp.exe'
        - '\procmon64.exe'
        - '\procmon.exe'
        - '\handle.exe'
        - '\handle64.exe'
    Details|contains: '\WINDOWS\system32\Drivers\PROCEXP152.SYS'

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
Imageends_with\handle.exe
Imageends_with\handle64.exe
Imageends_with\procexp.exe
Imageends_with\procexp64.exe
Imageends_with\procmon.exe
Imageends_with\procmon64.exe
Detailsmatch\WINDOWS\system32\Drivers\PROCEXP152.SYS

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
TargetObjecteq
  • HKLM\System\CurrentControlSet\Services\NalDrv\ImagePath
  • HKLM\System\CurrentControlSet\Services\PROCEXP152\ImagePath