Successful Overpass the Hash Attempt

Detects successful logon with logon type 9 (NewCredentials) which matches the Overpass the Hash behavior of e.g Mimikatz's sekurlsa::pth module.

Rule Content

- title: Successful Overpass the Hash Attempt
  id: 192a0330-c20b-4356-90b6-7b7049ae0b87
  status: experimental
  description: Detects successful logon with logon type 9 (NewCredentials) which matches
    the Overpass the Hash behavior of e.g Mimikatz's sekurlsa::pth module.
  references:
  - https://cyberwardog.blogspot.de/2017/04/chronicles-of-threat-hunter-hunting-for.html
  author: Roberto Rodriguez (source), Dominik Schaudel (rule)
  date: 2018/02/12
  tags:
  - attack.lateral_movement
  - attack.t1075
  - attack.s0002
  logsource:
    product: windows
    service: security
    category: null
  detection:
    selection:
      EventID: 4624
      LogonType: 9
      LogonProcessName: seclogo
      AuthenticationPackageName: Negotiate
    condition: selection
  falsepositives:
  - Runas command-line tool using /netonly parameter
  level: high

Querying Elasticsearch

Import Libraries


In [ ]:
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Search
import pandas as pd

Initialize Elasticsearch client


In [ ]:
es = Elasticsearch(['http://helk-elasticsearch:9200'])
searchContext = Search(using=es, index='logs-endpoint-winevent-security-*', doc_type='doc')

Run Elasticsearch Query


In [ ]:
s = searchContext.query('query_string', query='(event_id:"4624" AND logon_type:"9" AND logon_process_name:"seclogo" AND logon_authentication_package:"Negotiate")')
response = s.execute()
if response.success():
    df = pd.DataFrame((d.to_dict() for d in s.scan()))

Show Results


In [ ]:
df.head()