Sysprep on AppData Folder

Detects suspicious sysprep process start with AppData folder as target (as used by Trojan Syndicasec in Thrip report by Symantec)

Rule Content

- title: Sysprep on AppData Folder
  id: d5b9ae7a-e6fc-405e-80ff-2ff9dcc64e7e
  status: experimental
  description: Detects suspicious sysprep process start with AppData folder as target
    (as used by Trojan Syndicasec in Thrip report by Symantec)
  references:
  - https://www.symantec.com/blogs/threat-intelligence/thrip-hits-satellite-telecoms-defense-targets
  - https://app.any.run/tasks/61a296bb-81ad-4fee-955f-3b399f4aaf4b
  tags:
  - attack.execution
  author: Florian Roth
  date: 2018/06/22
  modified: 2018/12/11
  logsource:
    category: process_creation
    product: windows
    service: null
  detection:
    selection:
      CommandLine:
      - '*\sysprep.exe *\AppData\\*'
      - sysprep.exe *\AppData\\*
    condition: selection
  falsepositives:
  - False positives depend on scripts and administrative tools used in the monitored
    environment
  level: medium

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

Show Results


In [ ]:
df.head()