Exploit for CVE-2017-8759

Detects Winword starting uncommon sub process csc.exe as used in exploits for CVE-2017-8759

Rule Content

- title: Exploit for CVE-2017-8759
  id: fdd84c68-a1f6-47c9-9477-920584f94905
  description: Detects Winword starting uncommon sub process csc.exe as used in exploits
    for CVE-2017-8759
  references:
  - https://www.hybrid-analysis.com/sample/0b4ef455e385b750d9f90749f1467eaf00e46e8d6c2885c260e1b78211a51684?environmentId=100
  - https://www.reverse.it/sample/0b4ef455e385b750d9f90749f1467eaf00e46e8d6c2885c260e1b78211a51684?environmentId=100
  tags:
  - attack.execution
  - attack.t1203
  author: Florian Roth
  date: 2017/09/15
  logsource:
    category: process_creation
    product: windows
    service: null
  detection:
    selection:
      ParentImage: '*\WINWORD.EXE'
      Image: '*\csc.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:*\\WINWORD.EXE AND process_path.keyword:*\\csc.exe)')
response = s.execute()
if response.success():
    df = pd.DataFrame((d.to_dict() for d in s.scan()))

Show Results


In [ ]:
df.head()