Ryuk Ransomware

Detects Ryuk Ransomware command lines

Rule Content

- title: Ryuk Ransomware
  id: 0acaad27-9f02-4136-a243-c357202edd74
  description: Detects Ryuk Ransomware command lines
  status: experimental
  references:
  - https://research.checkpoint.com/ryuk-ransomware-targeted-campaign-break/
  author: Vasiliy Burov
  date: 2019/08/06
  logsource:
    category: process_creation
    product: windows
    service: null
  detection:
    selection:
      CommandLine:
      - '*\net.exe stop "samss" *'
      - '*\net.exe stop "audioendpointbuilder" *'
      - '*\net.exe stop "unistoresvc_?????" *'
    condition: selection
  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:(*\\net.exe\ stop\ \"samss\"\ * OR *\\net.exe\ stop\ \"audioendpointbuilder\"\ * OR *\\net.exe\ stop\ \"unistoresvc_?????\"\ *)')
response = s.execute()
if response.success():
    df = pd.DataFrame((d.to_dict() for d in s.scan()))

Show Results


In [ ]:
df.head()