Ursnif

Detects new registry key created by Ursnif malware.

Rule Content

- title: Ursnif
  id: 21f17060-b282-4249-ade0-589ea3591558
  status: experimental
  description: Detects new registry key created by Ursnif malware.
  references:
  - https://blog.yoroi.company/research/ursnif-long-live-the-steganography/
  - https://blog.trendmicro.com/trendlabs-security-intelligence/phishing-campaign-uses-hijacked-emails-to-deliver-ursnif-by-replying-to-ongoing-threads/
  tags:
  - attack.execution
  - attack.t1112
  author: megan201296
  date: 2019/02/13
  logsource:
    product: windows
    service: sysmon
    category: null
  detection:
    selection:
      EventID: 13
      TargetObject: '*\Software\AppDataLow\Software\Microsoft\\*'
    condition: selection
  falsepositives:
  - Unknown
  level: critical

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-sysmon-*', doc_type='doc')

Run Elasticsearch Query


In [ ]:
s = searchContext.query('query_string', query='(event_id:"13" AND registry_key_path.keyword:*\\Software\\AppDataLow\\Software\\Microsoft\\*)')
response = s.execute()
if response.success():
    df = pd.DataFrame((d.to_dict() for d in s.scan()))

Show Results


In [ ]:
df.head()