Ryuk Ransomware

Detects Ryuk ransomware activity

Rule Content

- title: Ryuk Ransomware
  id: c37510b8-2107-4b78-aa32-72f251e7a844
  status: experimental
  description: Detects Ryuk ransomware activity
  author: Florian Roth
  date: 2019/12/16
  references:
  - https://app.any.run/tasks/d860402c-3ff4-4c1f-b367-0237da714ed1/
  logsource:
    category: process_creation
    product: windows
    service: null
  detection:
    selection:
      CommandLine|contains|all:
      - Microsoft\Windows\CurrentVersion\Run
      - C:\users\Public\
    condition: selection
  fields:
  - CommandLine
  - ParentCommandLine
  falsepositives:
  - Unlikely
  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-*', doc_type='doc')

Run Elasticsearch Query


In [ ]:
s = searchContext.query('query_string', query='(process_command_line.keyword:*Microsoft\\Windows\\CurrentVersion\\Run* AND process_command_line.keyword:*C\:\\users\\Public\*)')
response = s.execute()
if response.success():
    df = pd.DataFrame((d.to_dict() for d in s.scan()))

Show Results


In [ ]:
df.head()