This project is an attempt at building a method of orchestrating threat hunting queries and tasks within RSA NetWitness Orchestrator (NWO). The concept is to start with a hunting model defining a set of hunting steps (represented in JSON), have NWO ingest the model and make all of the appropriate "look ahead" queries into NetWitness, organizing results, adding context and automatically refining large result sets before distributing hunting tasks among analysts. The overall goal is to have NWO keep track of all hunting activities, provide a platform for threat hunting metrics, and (most importantly) to offload as much of the tedious and repetitive data querying, refining, and management that is typical of threat hunting from the analyst as possible.
Please leave a comment if you'd like some help getting everything going, or have a specific question. I'd love to hear all types of feedback and suggestions to make this thing useful.
The primary dashboard shows the results of the most recent Hunting playbook run, which essentially contains each hunting task on it's own row in the table, a link to the dynamically generated Investigation task associated with that task, a count of the look ahead query results, and multiple links to the data in (in this case) RSA NetWitness. The analyst has not been involved up until now, as NWO did all of this work in the background.
Primary Hunting Dashboard
Pre-built Pivot into Toolset (NetWitness here)
The automations will also try to add extra context if the result set is Rare, has Possible Beaconing, contains Indicators, and a few other such "influencers" along with extra links to just those subsets of the overall results for that task. Influencers are special logic embedded within the automations to help extract additional insight so that the analyst doesn't have to. There hasn't been too much thought put into the logic behind these pieces just yet, so please consider them all proofs of concept and/or placeholders and definitely share any ideas or improvements you may have. The automations will also try to pare down large result sets if you have defined thresholds within the hunting model JSON. The entire result set will still be reachable, but you'll get secondary counts/links where the system has tried to aggregate the rarest N results based on the "Refine by" logic also defined in the model, eg:
If defined in the huntingcontent.json, a specific query/task can be given a threshold and will try to refine results by rarity if the threshold is hit. Example above shows a raw count of 6850 results, but a refined set of 35 results mapping to the rarest 20 {ip.dst, org.dst} tuples seen.
For each task, the assigned owner can drill directly into the relevant NetWitness data, or can drill into the Investigation associated with the task. Right now the investigation playbooks for each task are void of any special playbooks themselves - they simply serve as a way to organize tasks, contain findings for each hunt task and a place from which to spawn child incidents if anything is found:
From here it is currently just up to the analyst to create notes, complete the task, or generate child investigations. Future versions will do more with these sub investigation/hunt task playbooks to help the analyst. For now it's just a generic "Perform the Hunt" manual task. Note that when these hunt task investigations get closed, the Hunt Master will updated the hunting table and mark that item as "complete", signified by a green dot and a cross-through as shown in the first screenshot.
(Both the "Hunt Master" and the generated "Hunt Tasks" are created as incidents, tied together with a unique ID - while they could certainly be interacted with inside of the Incidents panel, the design is to have hunters operate from the hunting dashboard)
Everything is driven off of the hunting model & content. The idea is to be able to implement any model/set of hunting tasks along with the queries that would normally get an analyst to the corresponding subset of data. The example and templates given here corresponding with the RSA Network Hunting Labyrinth, modeled after the RSA NetWitness Hunting Guide: RSA NetWitness Hunting Guide
This file must sit on a web server somewhere, accessible by the NWO server. You will later configure your huntingcontentmodel.json file to point to it's location if you want to manage you're own (instead of the default version found here: https://raw.githubusercontent.com/smennis/nwohunt/master/content/huntingcontent.json
This file defines hunting tasks in each full branch of the JSON file, along with queries and other information to help NWO populate discover the data and organize the results:
(snippet of hunting content json)
The JSON file can have branches of length N, but the last element in any given branch, which defines a single hunting technique/task must have an element of the following structure. Note that "threshold" and "refineby" are optional, but "query" and "description" are mandatory, even if the values are blank.
The attached (same as the github link above as of the first release) example huntingcontent.json is meant to be a template as it is currently at the very beginning stages of being mapped to the RSA Network Hunting Labyrinth methodology. This will be updated with higher resolution queries over time. Once we can see this operate in a real environment, the plan is to leverage a lot more of the ioc/eoc/boc and *.analysis keys in RSA NetWitness to take this beyond a simple proof of concept. You may also choose to completely define your own to get you started.
This file must sit on a web server somewhere, accessible by the NWO server. A public version is available here: https://raw.githubusercontent.com/smennis/nwohunt/master/content/huntingcontentmodel.json but you will have to clone and update this to include references to your NWO and NW servers before it will work. This serves as the configuration file specific to your environment that describes structure of the huntingcontent.json file, display options, icon options, language, resource locations, and a few other configurations. It was done this way to avoid hard coding anything into the actual playbooks and automations:
model: Defines the heading for each level of huntingcontent.json. A "-" in front means it will still be looked for programatically but will not be displayed in the table.
language: This is a basic attempt at making the hunting tasks described by the model more human readable by connecting each level of the json with a connector word. Again, a "-" in front of the value means it will not be displayed in the table.
groupingdepth: This tells NWO how many levels to go when grouping the tasks into separate tables. Eg. a grouping level of "0" would contain one large table with each full JSON branch in a row. A grouping level of "3" will create a separate table for each group defined 3 levels into the JSON (this is what's shown in the dashboard table above)
verbosity: 0 or 1 - a value of 1 means that an additional column will be added to the table with the entire "description" value displayed. When 0, you can still see the description information by hovering over the "hover for info" link in the table.
queryurl: This defines the base URL where the specific queries (in the 'query' element of huntingcontent.json) will be appended in order to drill into the data. Example above is from my lab, so be sure to adjust this for your environment.
influencers: The set of influencers above are the ones that have been built into the logic so far. This isn't as modular under the hood as it should be, but I think this is where there is a big opportunity for collaboration and innovation, and where some of the smarter & continuous data exploration will be governed. iocs, criticalassets, blacklist, and whitelist are just additional queries the system will do to gain more insight and add the appropriate icon to the hunt item row. rarity is not well implemented yet and just adds the icon when there are < N (10 in this case) results. This will eventually be updated to look for rarity in the dataset against a specific entity (single IP, host, etc.) rather than the overall result count. possiblebeacon is implemented to look for a 24 hour average of communication between two hosts signifying approximately 1 beacon per minute, 5 minutes, or 10 minutes along with a tolerance percentage. Just experimenting with it at this point. Note that the "weight" element doesn't affect anything just yet. The eventual concept is to build a scoring algorithm to help prioritize or add fidelity the individual hunting tasks.
- GenerateHuntingIncidents
- PopulateHuntingTable
- GenerateHuntingIncidentNameID
- LoadHuntingJSON
- NetWitness LookAhead
- ReturnRandomUser
- UpdateHuntingStatus
- GetCurrentHuntMasterForWidget
- GetHuntParticipants
- GetHuntTableForWidget
- Initialize Hunting Instance
- Hunting Investigation Playbook
- 0105 Hunting
Map "0105 Hunting" Playbook to "Hunt" Incident Type (Settings > Incident Types > Hunt) and set the playbook to automatically start
Map "Hunting Investigation Playbook" to "Hunt Item" Incident Type and set playbook to automatically start
Import Dashboard
Place huntingcontent.json, huntingcontentmodel.json (within the www folder of the packaged zip), onto a web server somewhere, accessible by the NWO server. Note, by default the attached/downloadable huntingcontentmodel.json points at github for the huntingcontent.json file. You can leave this as is (and over time you'll get a more complete set of hunting queries) or create your own as you see fit and place it on your web server as well.
Before the first run, you'll have to make a few changes to point the logic at your own environment:
Opening up the Hunt Master incident Summary page (or Hunting Dashboard) should show you the full hunting table:
Please add comments as you find bugs or have additional ideas and content to contribute.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.