Latest alertCVE-2018-11776 in Apache Struts Confirmed Exploited in the WildRead
Search all news in the platform

Detection rule

HackTool - Mimikatz Execution

HighTest-data validatedSigmaHQ (community)T1003.001T1003.002T1003.004T1003.005T1003.006

Overview

Detection well-known mimikatz command line arguments

Rule id
a642964e-bead-4bed-8910-1bb4d63e3b4d
ATT&CK techniques
T1003.001 OS Credential Dumping: LSASS Memory, T1003.002 OS Credential Dumping: Security Account Manager, T1003.004 OS Credential Dumping: LSA Secrets, T1003.005 OS Credential Dumping: Cached Domain Credentials, T1003.006 OS Credential Dumping: DCSync
Severity
High
Confidence
Low
Origin
SigmaHQ (community)
SigmaHQ status
test
Used in defense packs
The Gentlemen, qilin, Akira, safepay, Play, nightspire

Validation

  1. ExperimentalSyntax checked only. Not yet tested on events.
  2. Test-data validatedMatched positive test events and ignored near-miss events. Not yet run in a production SIEM.
  3. SIEM-validatedRun in a real SIEM, with a recorded result.

1 of 1 positive test events matched; 1 of 1 near-miss events were correctly ignored. Community rule reused unmodified from SigmaHQ. OffSet7 converted it and tested it on synthetic events.

Detection logic and queries

Queries are shown exactly as generated. Test them in your environment before you deploy them.

Sigma

Sigma (YAML) · a642964e-bead-4bed-8910-1bb4d63e3b4d

Download
title: HackTool - Mimikatz Execution
id: a642964e-bead-4bed-8910-1bb4d63e3b4d
status: test
description: Detection well-known mimikatz command line arguments
references:
    - https://www.slideshare.net/heirhabarov/hunting-for-credentials-dumping-in-windows-environment
    - https://tools.thehacker.recipes/mimikatz/modules
author: Teymur Kheirkhabarov, oscd.community, David ANDRE (additional keywords), Tim Shelton
date: 2019-10-22
modified: 2023-02-21
tags:
    - attack.credential-access
    - attack.t1003.001
    - attack.t1003.002
    - attack.t1003.004
    - attack.t1003.005
    - attack.t1003.006
logsource:
    category: process_creation
    product: windows
detection:
    selection_tools_name:
        CommandLine|contains:
            - 'DumpCreds'
            - 'mimikatz'
    selection_function_names: # To cover functions from modules that are not in module_names
        CommandLine|contains:
            - '::aadcookie' # misc module
            - '::detours' # misc module
            - '::memssp' # misc module
            - '::mflt' # misc module
            - '::ncroutemon' # misc module
            - '::ngcsign' # misc module
            - '::printnightmare' # misc module
            - '::skeleton' # misc module
            - '::preshutdown'  # service module
            - '::mstsc'  # ts module
            - '::multirdp'  # ts module
    selection_module_names:
        CommandLine|contains:
            - 'rpc::'
            - 'token::'
            - 'crypto::'
            - 'dpapi::'
            - 'sekurlsa::'
            - 'kerberos::'
            - 'lsadump::'
            - 'privilege::'
            - 'process::'
            - 'vault::'
    condition: 1 of selection_*
falsepositives:
    - Unlikely
level: high
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_hktl_mimikatz_command_line/info.yml

QRadar AQL

IBM QRadar AQL (hunting query)Hunting query

Hunting search for the Log Activity tab or the API. It is not a QRadar rule.

AQL search for the Log Activity tab or the API. It is NOT a deployable QRadar rule: real-time detection in QRadar is a CRE (Custom Rule Engine) rule, for which this build only writes a design specification (qradar_cre).

SELECT * FROM events WHERE devicetype=12 AND ((LOWER(Command) LIKE '%dumpcreds%' OR LOWER(Command) LIKE '%mimikatz%') OR (LOWER(Command) LIKE '%::aadcookie%' OR LOWER(Command) LIKE '%::detours%' OR LOWER(Command) LIKE '%::memssp%' OR LOWER(Command) LIKE '%::mflt%' OR LOWER(Command) LIKE '%::ncroutemon%' OR LOWER(Command) LIKE '%::ngcsign%' OR LOWER(Command) LIKE '%::printnightmare%' OR LOWER(Command) LIKE '%::skeleton%' OR LOWER(Command) LIKE '%::preshutdown%' OR LOWER(Command) LIKE '%::mstsc%' OR LOWER(Command) LIKE '%::multirdp%') OR (LOWER(Command) LIKE '%rpc::%' OR LOWER(Command) LIKE '%token::%' OR LOWER(Command) LIKE '%crypto::%' OR LOWER(Command) LIKE '%dpapi::%' OR LOWER(Command) LIKE '%sekurlsa::%' OR LOWER(Command) LIKE '%kerberos::%' OR LOWER(Command) LIKE '%lsadump::%' OR LOWER(Command) LIKE '%privilege::%' OR LOWER(Command) LIKE '%process::%' OR LOWER(Command) LIKE '%vault::%'))

QRadar CRE

Design for the QRadar Rule Wizard. It is not importable and has not been tested in QRadar.

Rule name
OffSet7: HackTool - Mimikatz Execution
Rule type
Event rule (Local)
Log source types
Microsoft Windows Security Event Log DSM: Security 4688 (with command-line auditing) or Sysmon EID 1

Building blocks

  • BB:OffSet7:HackTool Mimikatz Execution:selection_tools_name (match)
    All test lines must match (AND).
    • Command contains: DumpCreds, mimikatz
  • BB:OffSet7:HackTool Mimikatz Execution:selection_function_names (match)
    All test lines must match (AND).
    • Command contains: ::aadcookie, ::detours, ::memssp, ::mflt, ::ncroutemon, ::ngcsign, ::printnightmare, ::skeleton, ::preshutdown, ::mstsc, ::multirdp
  • BB:OffSet7:HackTool Mimikatz Execution:selection_module_names (match)
    All test lines must match (AND).
    • Command contains: rpc::, token::, crypto::, dpapi::, sekurlsa::, kerberos::, lsadump::, privilege::, process::, vault::

Main rule, option A (building blocks)

  1. when the event(s) were detected by one or more of these log source types: Microsoft Windows Security Event Log DSM: Security 4688 (with command-line auditing) or Sysmon EID 1
  2. when an event matches the condition built from these building blocks: (ANY of [BB:OffSet7:HackTool Mimikatz Execution:selection_tools_name, BB:OffSet7:HackTool Mimikatz Execution:selection_function_names, BB:OffSet7:HackTool Mimikatz Execution:selection_module_names])

Main rule, option B (AQL filter test)

  1. when the event matches this AQL filter query: devicetype=12 AND ((LOWER(Command) LIKE '%dumpcreds%' OR LOWER(Command) LIKE '%mimikatz%') OR (LOWER(Command) LIKE '%::aadcookie%' OR LOWER(Command) LIKE '%::detours%' OR LOWER(Command) LIKE '%::memssp%' OR LOWER(Command) LIKE '%::mflt%' OR LOWER(Command) LIKE '%::ncroutemon%' OR LOWER(Command) LIKE '%::ngcsign%' OR LOWER(Command) LIKE '%::printnightmare%' OR LOWER(Command) LIKE '%::skeleton%' OR LOWER(Command) LIKE '%::preshutdown%' OR LOWER(Command) LIKE '%::mstsc%' OR LOWER(Command) LIKE '%::multirdp%') OR (LOWER(Command) LIKE '%rpc::%' OR LOWER(Command) LIKE '%token::%' OR LOWER(Command) LIKE '%crypto::%' OR LOWER(Command) LIKE '%dpapi::%' OR LOWER(Command) LIKE '%sekurlsa::%' OR LOWER(Command) LIKE '%kerberos::%' OR LOWER(Command) LIKE '%lsadump::%' OR LOWER(Command) LIKE '%privilege::%' OR LOWER(Command) LIKE '%process::%' OR LOWER(Command) LIKE '%vault::%'))

Rule response

  • Severity 7, credibility 6, relevance 7
  • Ensure the detected event is part of an offense; index offense on Log Source (host) and annotate with the rule title and OffSet7 rule id
  • Respond no more than once per 30 minutes per Log Source (tune per environment)

Limitations

  • QRadar AQL LIKE / CRE string tests are case-sensitive unless the property is lower-cased; the AQL option uses LOWER() where the backend applied it.

Splunk

Splunk SPLSearch

Search for Splunk with Windows/Sysmon field names. A scheduled search or ES correlation search also needs a schedule, time range, throttling and an adaptive response, set in your environment.

CommandLine IN ("*DumpCreds*", "*mimikatz*") OR CommandLine IN ("*::aadcookie*", "*::detours*", "*::memssp*", "*::mflt*", "*::ncroutemon*", "*::ngcsign*", "*::printnightmare*", "*::skeleton*", "*::preshutdown*", "*::mstsc*", "*::multirdp*") OR CommandLine IN ("*rpc::*", "*token::*", "*crypto::*", "*dpapi::*", "*sekurlsa::*", "*kerberos::*", "*lsadump::*", "*privilege::*", "*process::*", "*vault::*")

Splunk savedsearches.conf stanzaScheduled search template

Template stanza. Review schedule, alert actions and index/sourcetype for your environment before enabling.

[default]
dispatch.earliest_time = -30d
dispatch.latest_time = now

[HackTool - Mimikatz Execution]
description = Detection well-known mimikatz command line arguments
search = CommandLine IN ("*DumpCreds*", "*mimikatz*") OR CommandLine IN ("*::aadcookie*", "*::detours*", "*::memssp*", "*::mflt*", "*::ncroutemon*", "*::ngcsign*", "*::printnightmare*", "*::skeleton*", "*::preshutdown*", "*::mstsc*", "*::multirdp*") OR CommandLine IN ("*rpc::*", "*token::*", "*crypto::*", "*dpapi::*", "*sekurlsa::*", "*kerberos::*", "*lsadump::*", "*privilege::*", "*process::*", "*vault::*")

Microsoft Sentinel

Microsoft Sentinel KQL (ASIM)Hunting query

Hunting query over ASIM-normalized tables. An analytics rule also needs a schedule, entity mapping and alert grouping.

imProcessCreate
| where (TargetProcessCommandLine contains "DumpCreds" or TargetProcessCommandLine contains "mimikatz") or (TargetProcessCommandLine contains "::aadcookie" or TargetProcessCommandLine contains "::detours" or TargetProcessCommandLine contains "::memssp" or TargetProcessCommandLine contains "::mflt" or TargetProcessCommandLine contains "::ncroutemon" or TargetProcessCommandLine contains "::ngcsign" or TargetProcessCommandLine contains "::printnightmare" or TargetProcessCommandLine contains "::skeleton" or TargetProcessCommandLine contains "::preshutdown" or TargetProcessCommandLine contains "::mstsc" or TargetProcessCommandLine contains "::multirdp") or (TargetProcessCommandLine contains "rpc::" or TargetProcessCommandLine contains "token::" or TargetProcessCommandLine contains "crypto::" or TargetProcessCommandLine contains "dpapi::" or TargetProcessCommandLine contains "sekurlsa::" or TargetProcessCommandLine contains "kerberos::" or TargetProcessCommandLine contains "lsadump::" or TargetProcessCommandLine contains "privilege::" or TargetProcessCommandLine contains "process::" or TargetProcessCommandLine contains "vault::")

Defender XDR

Microsoft Defender XDR KQLHunting query

Advanced hunting query. A custom detection rule also needs a frequency, impacted entities and actions.

DeviceProcessEvents
| where (ProcessCommandLine contains "DumpCreds" or ProcessCommandLine contains "mimikatz") or (ProcessCommandLine contains "::aadcookie" or ProcessCommandLine contains "::detours" or ProcessCommandLine contains "::memssp" or ProcessCommandLine contains "::mflt" or ProcessCommandLine contains "::ncroutemon" or ProcessCommandLine contains "::ngcsign" or ProcessCommandLine contains "::printnightmare" or ProcessCommandLine contains "::skeleton" or ProcessCommandLine contains "::preshutdown" or ProcessCommandLine contains "::mstsc" or ProcessCommandLine contains "::multirdp") or (ProcessCommandLine contains "rpc::" or ProcessCommandLine contains "token::" or ProcessCommandLine contains "crypto::" or ProcessCommandLine contains "dpapi::" or ProcessCommandLine contains "sekurlsa::" or ProcessCommandLine contains "kerberos::" or ProcessCommandLine contains "lsadump::" or ProcessCommandLine contains "privilege::" or ProcessCommandLine contains "process::" or ProcessCommandLine contains "vault::")

Elastic

Elastic Lucene (ECS)Hunting query

Lucene query over ECS fields (Winlogbeat/Elastic Agent Windows mappings). A detection rule also needs an index pattern, schedule and actions.

(process.command_line:(*DumpCreds* OR *mimikatz*)) OR (process.command_line:(*\:\:aadcookie* OR *\:\:detours* OR *\:\:memssp* OR *\:\:mflt* OR *\:\:ncroutemon* OR *\:\:ngcsign* OR *\:\:printnightmare* OR *\:\:skeleton* OR *\:\:preshutdown* OR *\:\:mstsc* OR *\:\:multirdp*)) OR (process.command_line:(*rpc\:\:* OR *token\:\:* OR *crypto\:\:* OR *dpapi\:\:* OR *sekurlsa\:\:* OR *kerberos\:\:* OR *lsadump\:\:* OR *privilege\:\:* OR *process\:\:* OR *vault\:\:*))

Elastic EQL (ECS)Hunting query

EQL query over ECS fields. Usable in an Elastic Security EQL rule after review; index pattern and schedule are set per environment.

any where (process.command_line like~ ("*DumpCreds*", "*mimikatz*")) or (process.command_line like~ ("*::aadcookie*", "*::detours*", "*::memssp*", "*::mflt*", "*::ncroutemon*", "*::ngcsign*", "*::printnightmare*", "*::skeleton*", "*::preshutdown*", "*::mstsc*", "*::multirdp*")) or (process.command_line like~ ("*rpc::*", "*token::*", "*crypto::*", "*dpapi::*", "*sekurlsa::*", "*kerberos::*", "*lsadump::*", "*privilege::*", "*process::*", "*vault::*"))

Elastic ES|QL (ECS)Hunting query

ES|QL query over ECS fields; the FROM clause uses * and must be narrowed to your indices.

from * metadata _id, _index, _version | where process.command_line like "*DumpCreds*" or process.command_line like "*mimikatz*" or process.command_line like "*::aadcookie*" or process.command_line like "*::detours*" or process.command_line like "*::memssp*" or process.command_line like "*::mflt*" or process.command_line like "*::ncroutemon*" or process.command_line like "*::ngcsign*" or process.command_line like "*::printnightmare*" or process.command_line like "*::skeleton*" or process.command_line like "*::preshutdown*" or process.command_line like "*::mstsc*" or process.command_line like "*::multirdp*" or process.command_line like "*rpc::*" or process.command_line like "*token::*" or process.command_line like "*crypto::*" or process.command_line like "*dpapi::*" or process.command_line like "*sekurlsa::*" or process.command_line like "*kerberos::*" or process.command_line like "*lsadump::*" or process.command_line like "*privilege::*" or process.command_line like "*process::*" or process.command_line like "*vault::*"

Required telemetry

Log source
product: windows · category: process_creation
Fields used
CommandLine

False positives

  • Unlikely

Investigation and response

No OffSet7 investigation guidance has been written for this rule yet. Start from the false positives above and the ATT&CK technique pages.

References

Author and attribution

Author
Teymur Kheirkhabarov, oscd.community, David ANDRE (additional keywords), Tim Shelton
Source
SigmaHQ · rules/windows/process_creation/proc_creation_win_hktl_mimikatz_command_line.yml
Upstream commit
9688134317a2
Licence
Detection Rule License (DRL) 1.1

Version history

  1. Version 1Imported from SigmaHQ
  2. OffSet7 build · SigmaHQ 9688134317a2

Related rules