Skip to content
This repository was archived by the owner on Dec 11, 2023. It is now read-only.

Commit 404a10c

Browse files
committed
tightened up training content
1 parent f12c102 commit 404a10c

2 files changed

Lines changed: 64 additions & 45 deletions

File tree

trainings/detection-training/Data Sources.ipynb

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@
66
"source": [
77
"# Data Source Investigation\n",
88
"\n",
9-
"We'll use the [ATT&CK Python Client](https://github.com/hunters-forge/ATTACK-Python-Client) to manually examine the techniques, list the data sources, and build a heatmap out of our selected sources.\n",
9+
"Let's use the [ATT&CK Python Client](https://github.com/hunters-forge/ATTACK-Python-Client) to manually examine the techniques, list the data sources, and build a heatmap out of our selected sources.\n",
1010
"\n",
1111
"If you're looking for less development or a more in-depth and finely-grained dive, check out:\n",
12+
"\n",
1213
"* [DeTTACK](https://github.com/rabobank-cdc/DeTTECT)\n",
13-
"* [AttackDatamap](https://github.com/olafhartong/ATTACKdatamap)"
14+
"* [AttackDatamap](https://github.com/olafhartong/ATTACKdatamap)\n",
15+
"\n",
16+
"*Consider: What have you used to track data sources? What has worked well, and what has not worked so well?*"
1417
]
1518
},
1619
{
@@ -100,7 +103,7 @@
100103
"source": [
101104
"## Show the chart in altair\n",
102105
"\n",
103-
"Altair can be used to easily turn pandas dataframes into visualizations. In this case, we just show a bar chart of the top 10 data sources (those that help you detect the most techniques)."
106+
"Altair can be used to easily turn pandas dataframes into visualizations. In this case, we just show a histogram that you can scan."
104107
]
105108
},
106109
{
@@ -109,18 +112,38 @@
109112
"metadata": {},
110113
"outputs": [],
111114
"source": [
112-
"alt.Chart(df.reset_index()).mark_bar().encode(\n",
115+
"df.reset_index()\n",
116+
"\n",
117+
"alt.Chart(df.reset_index().sort_values('count', ascending=False)).mark_bar().encode(\n",
113118
" y=alt.Y(\n",
114119
" 'source',\n",
115120
" sort=alt.EncodingSortField(\n",
116-
" field=\"count\", # The field to use for the sort\n",
117-
" order=\"descending\" # The order to sort in\n",
121+
" field=\"count\",\n",
122+
" order=\"descending\"\n",
118123
" )\n",
119124
" ),\n",
120125
" x='count'\n",
121126
")"
122127
]
123128
},
129+
{
130+
"cell_type": "markdown",
131+
"metadata": {},
132+
"source": [
133+
"## Advanced Filtering (BONUS)\n",
134+
"\n",
135+
"How would you alter this chart to only consider some techniques? Maybe (peeking ahead) we have a list of threat actors or techniques we want to prioritize? Can you generate a chart that prioritizes techniques used by APT1 or APT3?"
136+
]
137+
},
138+
{
139+
"cell_type": "code",
140+
"execution_count": null,
141+
"metadata": {},
142+
"outputs": [],
143+
"source": [
144+
"# TODO: Your code to show a similar chart for APT1 and APT3"
145+
]
146+
},
124147
{
125148
"cell_type": "markdown",
126149
"metadata": {},
@@ -140,7 +163,7 @@
140163
"source": [
141164
"# First, list the data sources alphabetically so we can figure out which ones we have\n",
142165
"\n",
143-
"df.reset_index().sort_values('source')[['source', 'count']].style.hide_index()"
166+
"df.sort_index()[['count']]"
144167
]
145168
},
146169
{
@@ -151,7 +174,7 @@
151174
"\n",
152175
"In the list below, add the data sources that we have available in BRAWL. As a reminder, we have:\n",
153176
"* Sysmon\n",
154-
"* Windows event logs"
177+
"* Windows event logs (common security , authentication, and audit logs)"
155178
]
156179
},
157180
{
@@ -162,8 +185,7 @@
162185
"source": [
163186
"# Case sensitive!!!\n",
164187
"sources_we_have = [\n",
165-
" 'Windows event logs',\n",
166-
" 'Process monitoring'\n",
188+
" '' # e.g. 'Web proxy'\n",
167189
"]"
168190
]
169191
},
@@ -248,22 +270,6 @@
248270
" \n",
249271
"FileLink('data_sources.json')"
250272
]
251-
},
252-
{
253-
"cell_type": "code",
254-
"execution_count": null,
255-
"metadata": {},
256-
"outputs": [],
257-
"source": [
258-
"heatmap"
259-
]
260-
},
261-
{
262-
"cell_type": "code",
263-
"execution_count": null,
264-
"metadata": {},
265-
"outputs": [],
266-
"source": []
267273
}
268274
],
269275
"metadata": {

trainings/detection-training/Prioritization Scenarios.ipynb

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,46 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# Prioritizing Using ATT&CK and the Navigator\n",
7+
"# Prioritizing Detection Using ATT&CK and the Navigator\n",
8+
"\n",
9+
"We're going to use the ATT&CK Navigator to overlay some layers and start to prioritize what we want to detect. This is a simplistic approach based on selecting a set of adversaries in the navigator and relying on mapping a threat report."
10+
]
11+
},
12+
{
13+
"cell_type": "markdown",
14+
"metadata": {},
15+
"source": [
16+
"## Scoring Existing Adversaries\n",
17+
"\n",
18+
"ATT&CK itself already has a set of threat intelligence mapped and accessible in the navigator. We can use that CTI in order to select all techniques that we've seen specific adversary groups use.\n",
19+
"\n",
20+
"In this case, let's select and score APT1 and APT3.\n",
821
"\n",
922
"1. Open up the [ATT&CK Navigator](https://mitre-attack.github.io/attack-navigator/enterprise/).\n",
10-
"2. Select all of the techniques for APT1 and APT3.\n",
11-
"3. Assign them a score."
23+
"2. Our threat model includes APT1 and APT3. How would you show that in a heatmap?\n",
24+
"3. To be safe, download the JSON to save it for later.\n",
25+
"\n",
26+
"*Consider: What are the downsides of this approach?*"
1227
]
1328
},
1429
{
15-
"attachments": {},
1630
"cell_type": "markdown",
1731
"metadata": {},
1832
"source": [
1933
"# Adding Additional Internal or Local CTI\n",
2034
"\n",
2135
"Create a new layer, and select the techniques you see in the following threat report, which impacts your sector and was active over the past summer.\n",
2236
"\n",
37+
"**Note: MITRE's ATT&CK for CTI training discusses how to map threat reports into ATT&CK in order to arrive at this list of techniques. We didn't want to duplicate that training, so have simply provided a list.**\n",
38+
"\n",
2339
"* Credential Dumping: https://attack.mitre.org/techniques/T1003/ \n",
2440
"* Bypass User Account Control: https://attack.mitre.org/techniques/T1088/ \n",
2541
"* Powershell: https://attack.mitre.org/techniques/T1086/ \n",
2642
"* NTFS File Attributes: https://attack.mitre.org/techniques/T1096/\n",
2743
"* File Permissions Modification: https://attack.mitre.org/techniques/T1222/ \n",
28-
"* Indicator Blocking: https://attack.mitre.org/techniques/T1054/"
44+
"* Indicator Blocking: https://attack.mitre.org/techniques/T1054/\n",
45+
"\n",
46+
"*Consider: What extra threat information, in addition to the techniques, would be helpful at building detections?*"
2947
]
3048
},
3149
{
@@ -34,13 +52,10 @@
3452
"source": [
3553
"# Developing our Priorities\n",
3654
"\n",
37-
"We need to combine these layers into one set of priorities.\n",
38-
"\n",
39-
"1. Create a new layer as a function on previous layers.\n",
40-
"2. Adjust the formula and scoring so that you get prioritized detections.\n",
55+
"We need to combine these layers into one set of priorities. We can do that by creating a new layer as a function of previous layers.\n",
4156
"\n",
42-
"BONUS:\n",
43-
"1. What if you want to weight the recent incidents higher?\n"
57+
"1. Making sure to have the APT1/APT3 layer in the navigator and the new custom layer in the navigator, hit the plus to create a new layer.\n",
58+
"2. Adjust the formula and scoring so that you get prioritized detections. How would you weight these different sets of intelligence? What are your top techniques?"
4459
]
4560
},
4661
{
@@ -51,15 +66,13 @@
5166
"\n",
5267
"Let's assume we want to detect the techniques used in the recent Blue Panda campaign. How would we see which techniques we could cover given our data sources?\n",
5368
"\n",
54-
"What other changes might we want to make?"
69+
"1. Keeping your prioritization heatmap in the navigator, open up your data sources layer.\n",
70+
"2. Create a new layer that shows you, of your prioritized techniques:\n",
71+
" * Which can be detected given current data collection\n",
72+
" * Where you have gaps.\n",
73+
"\n",
74+
"*Consider: What data sources might you want to add to increase coverage?*"
5575
]
56-
},
57-
{
58-
"cell_type": "code",
59-
"execution_count": null,
60-
"metadata": {},
61-
"outputs": [],
62-
"source": []
6376
}
6477
],
6578
"metadata": {

0 commit comments

Comments
 (0)