WMI Backdoor Exchange Transport Agent

Detects a WMi backdoor in Exchange Transport Agents via WMi event filters

Rule Content

- title: WMI Backdoor Exchange Transport Agent
  id: 797011dc-44f4-4e6f-9f10-a8ceefbe566b
  status: experimental
  description: Detects a WMi backdoor in Exchange Transport Agents via WMi event filters
  author: Florian Roth
  date: 2019/10/11
  references:
  - https://twitter.com/cglyer/status/1182389676876980224
  - https://twitter.com/cglyer/status/1182391019633029120
  logsource:
    category: process_creation
    product: windows
    service: null
  tags:
  - attack.persistence
  - attack.t1084
  detection:
    selection:
      ParentImage: '*\EdgeTransport.exe'
    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-*', doc_type='doc')

Run Elasticsearch Query


In [ ]:
s = searchContext.query('query_string', query='process_parent_path.keyword:*\\EdgeTransport.exe')
response = s.execute()
if response.success():
    df = pd.DataFrame((d.to_dict() for d in s.scan()))

Show Results


In [ ]:
df.head()