Skip to content

Commit 7cd8380

Browse files
authored
Merge pull request #5 from dlamspl/dev
Dev to master
2 parents 18abb88 + c47c2f8 commit 7cd8380

File tree

3 files changed

+57
-23
lines changed

3 files changed

+57
-23
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,5 @@ Finally there is a dashboard made with Splunk dashboards - Beta which looks nice
3838

3939
![Main - Beta](appserver/static/docs/img/ar_dashboards_beta_preview.png?raw=true "Main-Beta")
4040

41+
## Contributors
42+
[Christian Cloutier](https://github.com/ccloutier-splunk)

default/app.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ is_configured = 0
55

66
[launcher]
77
description = Splunk Attack range dashboards
8-
version = 1.0.5
8+
version = 1.0.6
99
1010

1111
[ui]

default/data/ui/views/attack_range_main_dashboard.xml

Lines changed: 54 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@
88
<earliest>$time_token.earliest$</earliest>
99
<latest>$time_token.latest$</latest>
1010
</search>
11+
<!-- Check if ES is installed, and prefix the ES Analytic Story Link field with "_" if not (which hides it in a table) -->
12+
<search id="BaseESInstalledSearch">
13+
<query>
14+
| rest /services/apps/local
15+
| where title = "SplunkEnterpriseSecuritySuite"
16+
</query>
17+
<finalized >
18+
<condition match=" 'job.resultCount' != 0">
19+
<set token="filterESLink">noop</set>
20+
</condition>
21+
<condition>
22+
<set token="filterESLink">rename view_es as _view_es</set>
23+
</condition>
24+
</finalized >
25+
</search>
1126
<label>Attack Range Dashboard</label>
1227
<description>Shows tests already run and relevant statistics in addition to possible analytic stories for executed tests. Currently supports only Atomic Red tests</description>
1328
<fieldset submitButton="false">
@@ -255,26 +270,36 @@
255270
<progress>
256271
<set token="story_count">$job.resultCount$</set>
257272
</progress>
273+
<!-- Note: The link to SSE is not used yet - as it's not ready at this point - it's a placeholder for now -->
274+
<!-- Note: The _docs_title field turns the Analytic Story into the HREF Anchor format used in the documentation, for example: Cloud Federated Credential Abuse -> Cloud_federated_credential_abuse.
275+
and also normalizes the field for other fringe cases (duplicate spaces, extra spaces at the end, etc.) -->
258276
<query>`get_attack_data`
259-
|lookup enterprise-attack-lookup Technique
277+
| lookup enterprise-attack-lookup Technique
260278
| eval mitre_id = Technique+" - "+mitre_technique_display, atomic_test= 'Test Number'+"-"+'Test Name'
261279

262280
| join type=left max=0 Technique
263-
[ | rest /services/configs/conf-analytic_stories splunk_server=local count=0
264-
|rex field=mappings ".*,+\s\"mitre_attack\":(?&lt;technique&gt;.*),+\s\"nist\""
265-
|rex field=technique mode=sed "s/\[//g"
266-
|rex field=technique mode=sed "s/\]//g"
267-
| eval technique=split(technique, ",")
268-
|rex field=technique mode=sed "s/\"//g"
269-
| mvexpand technique
270-
| eval Technique=trim(technique)
271-
| where Technique!=""
272-
|fields Technique, title]
273-
274-
|eval view="View [ESCU]"
275-
|eval execute="Execute [ASX]"
276-
|stats dc(title) by title, view, execute
277-
| fields title, view, execute</query>
281+
[
282+
| rest /services/configs/conf-analytic_stories splunk_server=local count=0
283+
| rex field=mappings ".*,+\s\"mitre_attack\":(?&lt;technique&gt;.*),+\s\"nist\""
284+
| rex field=technique mode=sed "s/\[//g"
285+
| rex field=technique mode=sed "s/\]//g"
286+
| eval technique=split(technique, ",")
287+
| rex field=technique mode=sed "s/\"//g"
288+
| mvexpand technique
289+
| eval Technique=trim(technique)
290+
| where Technique!=""
291+
| fields Technique, title
292+
]
293+
| eval view_es="View [ES]"
294+
| eval view_sse="View [SSE]"
295+
| eval view_docs="View [Docs]"
296+
| eval execute="Execute [ASX]"
297+
| eval _docs_title = trim(replace(title, "\s+", " "))
298+
| eval _docs_title = upper(substr(mvjoin(split(lower(_docs_title), " "), "_"),1,1)).substr(mvjoin(split(lower(_docs_title), " "), "_"), 2)
299+
| stats dc(title) by title, _docs_title, view_es, view_docs, execute
300+
| fields title, _docs_title, view_es, view_docs, execute
301+
| $filterESLink$
302+
</query>
278303
<earliest>$time_token.earliest$</earliest>
279304
<latest>$time_token.latest$</latest>
280305
<sampleRatio>1</sampleRatio>
@@ -288,11 +313,18 @@
288313
<option name="totalsRow">false</option>
289314
<option name="wrap">true</option>
290315
<drilldown>
291-
<condition field="view">
292-
<link target="_blank">/app/DA-ESS-ContentUpdate/analytic_story_details?form.analytic_story_name=$click.value$</link>
316+
<condition field="view_es">
317+
<link target="_blank">/app/SplunkEnterpriseSecuritySuite/ess_analytic_story_details?analytic_story=$click.value$</link>
293318
</condition>
319+
<!--<condition field="view_sse">
320+
<link target="_blank">/app/Splunk_Security_Essentials/TBD?=$click.value$</link>
321+
</condition>-->
322+
<condition field="view_docs">
323+
<link target="_blank">https://docs.splunk.com/Documentation/ESSOC/latest/stories/UseCase#$row._docs_title$</link>
324+
</condition>
325+
<!-- Default link is the documentation -->
294326
<condition field="title">
295-
<link target="_blank">/app/DA-ESS-ContentUpdate/analytic_story_details?form.analytic_story_name=$click.value$</link>
327+
<link target="_blank">https://docs.splunk.com/Documentation/ESSOC/latest/stories/UseCase#$row._docs_title$</link>
296328
</condition>
297329
<condition field="execute">
298330
<link target="_blank">/app/Splunk_ASX/execute?form.mode=now&amp;form.time.earliest=-24h@h&amp;form.time.latest=now&amp;form.story=$row.title$</link>
@@ -309,11 +341,11 @@
309341
</progress>
310342
<query>`get_attack_data`
311343
|rename Technique as mitre_technique
312-
313344
| join type=left max=0 mitre_technique
314345
[| sseanalytics
315-
|search mitre_technique!="None"
316-
|mvexpand mitre_technique]
346+
|search mitre_id!="None"
347+
|mvexpand mitre_id
348+
|rename mitre_id as mitre_technique]
317349
|stats dc(name) by name,mitre_technique,channel
318350
|table name, mitre_technique, channel</query>
319351
<earliest>$time_token.earliest$</earliest>

0 commit comments

Comments
 (0)