- title: Detection of SafetyKatz
id: e074832a-eada-4fd7-94a1-10642b130e16
status: experimental
description: Detects possible SafetyKatz Behaviour
references:
- https://github.com/GhostPack/SafetyKatz
tags:
- attack.credential_access
- attack.t1003
author: Markus Neis
date: 2018/07/24
logsource:
product: windows
service: sysmon
category: null
detection:
selection:
EventID: 11
TargetFilename: '*\Temp\debug.bin'
condition: selection
falsepositives:
- Unknown
level: high
In [ ]:
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Search
import pandas as pd
In [ ]:
es = Elasticsearch(['http://helk-elasticsearch:9200'])
searchContext = Search(using=es, index='logs-endpoint-winevent-sysmon-*', doc_type='doc')
In [ ]:
s = searchContext.query('query_string', query='(event_id:"11" AND file_name.keyword:*\\Temp\\debug.bin)')
response = s.execute()
if response.success():
df = pd.DataFrame((d.to_dict() for d in s.scan()))
In [ ]:
df.head()