BlueMashroom DLL Load

Detects a suspicious DLL loading from AppData Local path as described in BlueMashroom report

Rule Content

- title: BlueMashroom DLL Load
  id: bd70d3f8-e60e-4d25-89f0-0b5a9cff20e0
  status: experimental
  description: Detects a suspicious DLL loading from AppData Local path as described
    in BlueMashroom report
  references:
  - https://www.virusbulletin.com/conference/vb2019/abstracts/apt-cases-exploiting-vulnerabilities-region-specific-software
  tags:
  - attack.defense_evasion
  - attack.t1117
  author: Florian Roth
  date: 2019/10/02
  logsource:
    category: process_creation
    product: windows
    service: null
  detection:
    selection:
      CommandLine:
      - '*\regsvr32*\AppData\Local\\*'
      - '*\AppData\Local\\*,DllEntry*'
    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:(*\\regsvr32*\\AppData\\Local\\* OR *\\AppData\\Local\\*,DllEntry*)')
response = s.execute()
if response.success():
    df = pd.DataFrame((d.to_dict() for d in s.scan()))

Show Results


In [ ]:
df.head()