DHCP Callout DLL installation

Detects the installation of a Callout DLL via CalloutDlls and CalloutEnabled parameter in Registry, which can be used to execute code in context of the DHCP server (restart required)

Rule Content

- title: DHCP Callout DLL installation
  id: 9d3436ef-9476-4c43-acca-90ce06bdf33a
  status: experimental
  description: Detects the installation of a Callout DLL via CalloutDlls and CalloutEnabled
    parameter in Registry, which can be used to execute code in context of the DHCP
    server (restart required)
  references:
  - https://blog.3or.de/mimilib-dhcp-server-callout-dll-injection.html
  - https://technet.microsoft.com/en-us/library/cc726884(v=ws.10).aspx
  - https://msdn.microsoft.com/de-de/library/windows/desktop/aa363389(v=vs.85).aspx
  date: 2017/05/15
  author: Dimitrios Slamaris
  tags:
  - attack.defense_evasion
  - attack.t1073
  - attack.t1112
  logsource:
    product: windows
    service: sysmon
    category: null
  detection:
    selection:
      EventID: 13
      TargetObject:
      - '*\Services\DHCPServer\Parameters\CalloutDlls'
      - '*\Services\DHCPServer\Parameters\CalloutEnabled'
    condition: selection
  falsepositives:
  - unknown
  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-endpoint-winevent-sysmon-*', doc_type='doc')

Run Elasticsearch Query


In [ ]:
s = searchContext.query('query_string', query='(event_id:"13" AND registry_key_path.keyword:(*\\Services\\DHCPServer\\Parameters\\CalloutDlls OR *\\Services\\DHCPServer\\Parameters\\CalloutEnabled))')
response = s.execute()
if response.success():
    df = pd.DataFrame((d.to_dict() for d in s.scan()))

Show Results


In [ ]:
df.head()