Ps.exe Renamed SysInternals Tool

Detects renamed SysInternals tool execution with a binary named ps.exe as used by Dragonfly APT group and documented in TA17-293A report

Rule Content

- title: Ps.exe Renamed SysInternals Tool
  id: 18da1007-3f26-470f-875d-f77faf1cab31
  description: Detects renamed SysInternals tool execution with a binary named ps.exe
    as used by Dragonfly APT group and documented in TA17-293A report
  references:
  - https://www.us-cert.gov/ncas/alerts/TA17-293A
  tags:
  - attack.defense_evasion
  - attack.g0035
  - attack.t1036
  - car.2013-05-009
  author: Florian Roth
  date: 2017/10/22
  logsource:
    category: process_creation
    product: windows
    service: null
  detection:
    selection:
      CommandLine: ps.exe -accepteula
    condition: selection
  falsepositives:
  - Renamed SysInternals tool
  level: high

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:"ps.exe\ \-accepteula"')
response = s.execute()
if response.success():
    df = pd.DataFrame((d.to_dict() for d in s.scan()))

Show Results


In [ ]:
df.head()