mirror of https://github.com/infosecn1nja/HELK.git
131 lines
2.9 KiB
Plaintext
131 lines
2.9 KiB
Plaintext
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"# Fireball Archer Install\n",
|
||
|
"Detects Archer malware invocation via rundll32"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "markdown",
|
||
|
"metadata": {},
|
||
|
"source": [
|
||
|
"## Rule Content\n",
|
||
|
"```\n",
|
||
|
"- title: Fireball Archer Install\n",
|
||
|
" id: 3d4aebe0-6d29-45b2-a8a4-3dfde586a26d\n",
|
||
|
" status: experimental\n",
|
||
|
" description: Detects Archer malware invocation via rundll32\n",
|
||
|
" author: Florian Roth\n",
|
||
|
" date: 2017/06/03\n",
|
||
|
" references:\n",
|
||
|
" - https://www.virustotal.com/en/file/9b4971349ae85aa09c0a69852ed3e626c954954a3927b3d1b6646f139b930022/analysis/\n",
|
||
|
" - https://www.hybrid-analysis.com/sample/9b4971349ae85aa09c0a69852ed3e626c954954a3927b3d1b6646f139b930022?environmentId=100\n",
|
||
|
" tags:\n",
|
||
|
" - attack.execution\n",
|
||
|
" - attack.t1059\n",
|
||
|
" - attack.defense_evasion\n",
|
||
|
" - attack.t1085\n",
|
||
|
" logsource:\n",
|
||
|
" category: process_creation\n",
|
||
|
" product: windows\n",
|
||
|
" service: null\n",
|
||
|
" detection:\n",
|
||
|
" selection:\n",
|
||
|
" CommandLine: '*\\rundll32.exe *,InstallArcherSvc'\n",
|
||
|
" condition: selection\n",
|
||
|
" fields:\n",
|
||
|
" - CommandLine\n",
|
||
|
" - ParentCommandLine\n",
|
||
|
" falsepositives:\n",
|
||
|
" - Unknown\n",
|
||
|
" level: high\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-*', 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='process_command_line.keyword:*\\\\rundll32.exe\\ *,InstallArcherSvc')\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
|
||
|
}
|