Suspicious SYSVOL Domain Group Policy Access

Detects Access to Domain Group Policies stored in SYSVOL

Rule Content

- title: Suspicious SYSVOL Domain Group Policy Access
  id: 05f3c945-dcc8-4393-9f3d-af65077a8f86
  status: experimental
  description: Detects Access to Domain Group Policies stored in SYSVOL
  references:
  - https://adsecurity.org/?p=2288
  - https://www.hybrid-analysis.com/sample/f2943f5e45befa52fb12748ca7171d30096e1d4fc3c365561497c618341299d5?environmentId=100
  author: Markus Neis
  date: 2018/04/09
  modified: 2018/12/11
  tags:
  - attack.credential_access
  - attack.t1003
  logsource:
    category: process_creation
    product: windows
    service: null
  detection:
    selection:
      CommandLine: '*\SYSVOL\\*\policies\\*'
    condition: selection
  falsepositives:
  - administrative activity
  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:*\\SYSVOL\\*\\policies\\*')
response = s.execute()
if response.success():
    df = pd.DataFrame((d.to_dict() for d in s.scan()))

Show Results


In [ ]:
df.head()