Antivirus Exploitation Framework Detection

Detects a highly relevant Antivirus alert that reports an exploitation framework

Rule Content

- title: Antivirus Exploitation Framework Detection
  id: 238527ad-3c2c-4e4f-a1f6-92fd63adb864
  description: Detects a highly relevant Antivirus alert that reports an exploitation
    framework
  date: 2018/09/09
  modified: 2019/01/16
  author: Florian Roth
  references:
  - https://www.nextron-systems.com/2018/09/08/antivirus-event-analysis-cheat-sheet-v1-4/
  tags:
  - attack.execution
  - attack.t1203
  - attack.command_and_control
  - attack.t1219
  logsource:
    product: antivirus
    service: null
    category: null
  detection:
    selection:
      Signature:
      - '*MeteTool*'
      - '*MPreter*'
      - '*Meterpreter*'
      - '*Metasploit*'
      - '*PowerSploit*'
      - '*CobaltSrike*'
      - '*Swrort*'
      - '*Rozena*'
      - '*Backdoor.Cobalt*'
    condition: selection
  fields:
  - FileName
  - User
  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='signature.keyword:(*MeteTool* OR *MPreter* OR *Meterpreter* OR *Metasploit* OR *PowerSploit* OR *CobaltSrike* OR *Swrort* OR *Rozena* OR *Backdoor.Cobalt*)')
response = s.execute()
if response.success():
    df = pd.DataFrame((d.to_dict() for d in s.scan()))

Show Results


In [ ]:
df.head()