HELK/docker/helk-jupyter/notebooks/sigma/win_susp_dhcp_config.ipynb

128 lines
2.8 KiB
Plaintext
Raw Normal View History

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# DHCP Server Loaded the CallOut DLL\n",
"This rule detects a DHCP server in which a specified Callout DLL (in registry) was loaded"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Rule Content\n",
"```\n",
"- title: DHCP Server Loaded the CallOut DLL\n",
" id: 13fc89a9-971e-4ca6-b9dc-aa53a445bf40\n",
" status: experimental\n",
" description: This rule detects a DHCP server in which a specified Callout DLL (in\n",
" registry) was loaded\n",
" references:\n",
" - https://blog.3or.de/mimilib-dhcp-server-callout-dll-injection.html\n",
" - https://technet.microsoft.com/en-us/library/cc726884(v=ws.10).aspx\n",
" - https://msdn.microsoft.com/de-de/library/windows/desktop/aa363389(v=vs.85).aspx\n",
" date: 2017/05/15\n",
" author: Dimitrios Slamaris\n",
" tags:\n",
" - attack.defense_evasion\n",
" - attack.t1073\n",
" logsource:\n",
" product: windows\n",
" service: system\n",
" category: null\n",
" detection:\n",
" selection:\n",
" EventID: 1033\n",
" condition: selection\n",
" falsepositives:\n",
" - Unknown\n",
" level: critical\n",
"\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Querying Elasticsearch"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Import Libraries"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from elasticsearch import Elasticsearch\n",
"from elasticsearch_dsl import Search\n",
"import pandas as pd"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Initialize Elasticsearch client"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"es = Elasticsearch(['http://helk-elasticsearch:9200'])\n",
"searchContext = Search(using=es, index='logs-endpoint-winevent-system-*', doc_type='doc')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Run Elasticsearch Query"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"s = searchContext.query('query_string', query='event_id:\"1033\"')\n",
"response = s.execute()\n",
"if response.success():\n",
" df = pd.DataFrame((d.to_dict() for d in s.scan()))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Show Results"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"df.head()"
]
}
],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 4
}