Detection rules › Sigma

Potential Recon Activity Using DriverQuery.EXE

Status
test
Severity
high
Log source
category process_creation, product windows
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detect usage of the "driverquery" utility to perform reconnaissance on installed drivers

Known false positives

  • Legitimate usage by some scripts might trigger this as well

MITRE ATT&CK coverage

TacticTechniques
DiscoveryNo specific technique

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

title: Potential Recon Activity Using DriverQuery.EXE
id: 9fc3072c-dc8f-4bf7-b231-18950000fadd
related:
    - id: a20def93-0709-4eae-9bd2-31206e21e6b2
      type: similar
status: test
description: Detect usage of the "driverquery" utility to perform reconnaissance on installed drivers
references:
    - https://thedfirreport.com/2023/01/09/unwrapping-ursnifs-gifts/
    - https://www.vmray.com/cyber-security-blog/analyzing-ursnif-behavior-malware-sandbox/
    - https://www.fireeye.com/blog/threat-research/2020/01/saigon-mysterious-ursnif-fork.html
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-01-19
modified: 2023-09-29
tags:
    - attack.discovery
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: 'driverquery.exe'
        - OriginalFileName: 'drvqry.exe'
    selection_parent:
        - ParentImage|endswith:
              - '\cscript.exe'
              - '\mshta.exe'
              - '\regsvr32.exe'
              - '\rundll32.exe'
              - '\wscript.exe'
        - ParentImage|contains:
              - '\AppData\Local\'
              - '\Users\Public\'
              - '\Windows\Temp\'
    condition: all of selection_*
falsepositives:
    - Legitimate usage by some scripts might trigger this as well
level: high
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_driverquery_recon/info.yml

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

selection_img:
    - Image|endswith: 'driverquery.exe'
    - OriginalFileName: 'drvqry.exe'

Stage 2: selection_parent

selection_parent:
    - ParentImage|endswith:
          - '\cscript.exe'
          - '\mshta.exe'
          - '\regsvr32.exe'
          - '\rundll32.exe'
          - '\wscript.exe'
    - ParentImage|contains:
          - '\AppData\Local\'
          - '\Users\Public\'
          - '\Windows\Temp\'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
Imageends_with
  • driverquery.exe corpus 2 (sigma 2)
field:"Image" kind:ends_with value:"driverquery.exe"
OriginalFileNameeq
  • drvqry.exe corpus 2 (sigma 2)
field:"OriginalFileName" kind:eq value:"drvqry.exe"
ParentImageends_with
  • \cscript.exe corpus 17 (sigma 17)
  • \mshta.exe corpus 13 (sigma 13)
  • \regsvr32.exe corpus 11 (sigma 11)
  • \rundll32.exe corpus 15 (sigma 15)
  • \wscript.exe corpus 19 (sigma 19)
field:"ParentImage" kind:ends_with
ParentImagematch
  • \AppData\Local\ corpus 2 (sigma 2)
  • \Users\Public\ corpus 2 (sigma 2)
  • \Windows\Temp\ corpus 2 (sigma 2)
field:"ParentImage" kind:match