Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

threat fields #505

Merged
merged 15 commits into from
Oct 3, 2019
Merged

threat fields #505

merged 15 commits into from
Oct 3, 2019

Conversation

dainperkins
Copy link
Contributor

added threat fields for e.g. threat reports from IDS/IPS, NGFW, etc...

Copy link
Contributor

@webmat webmat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for submitting this!

There's a few things that need discussion & adjustments, but looking very good overall.

@webmat
Copy link
Contributor

webmat commented Jul 23, 2019

Also, please make sure to run a full make before pushing.

Right now CI is failing because schema.json hasn't been updated. I think your merge of the master branch brought in a fix to generate this file, that's why your previous commit wasn't modifying that file.

added text miulti fields, modified tactic/technique to be suggested as Mitre Att&ck, added possible qualitative options
added multifields for fts, modified tactic and technique to suggest ATT&CK, etc.
@dainperkins
Copy link
Contributor Author

dainperkins commented Aug 13, 2019 via email

@dainperkins
Copy link
Contributor Author

dainperkins commented Aug 13, 2019 via email

@dainperkins
Copy link
Contributor Author

Not really sure what to do about the conflicts...

Updated threat fields per recommendations
@dainperkins
Copy link
Contributor Author

I think I figured it out

Copy link
Contributor

@MikePaquette MikePaquette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropped a few comments that need fixing but overall looks good.

revised short desc. to better align to tootip thoughts
Copy link
Contributor

@webmat webmat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

Please make sure to address Mike's comments at the end of threat.yml as well.

@webmat
Copy link
Contributor

webmat commented Sep 5, 2019

Suppose someone's looking at a Suricata alert like this one:

        "suricata.eve.alert.category": "Attempted Information Leak",
        "suricata.eve.alert.gid": 1,
        "suricata.eve.alert.rev": 4,
        "suricata.eve.alert.signature": "ET POLICY curl User-Agent Outbound",
        "suricata.eve.alert.signature_id": 2013028,

How would you suggest the mapping is done?

I think alert.signature_id maps to threat.id and alert.signature maps to threat.name.

But should alert.category be mapped to threat.technique.name? Seems like we'd like to both want to allow people to keep their alert source's categorization, as it's good to have a 1:1 mapping with the source, when investigating what the alert means. But it would also be useful to let people map to a third party categorization framework. I'm sure there's already people who've mapped Suricata's alerts to the ATT&CK framework.

Or perhaps we should treat actual alerts as a separate entity than threats? Map the alert details to an eventual alert field set, and add the threat field set purely as a categorization scheme on top of the alert?

@dainperkins
Copy link
Contributor Author

dainperkins commented Sep 5, 2019 via email

@webmat
Copy link
Contributor

webmat commented Sep 5, 2019

@dainperkins another thing that occurred to me. It might be worth adding a field that states which kind of categorization is being done. Is it MITRE, are people shoving QRadar in tactic & technique, or another vendor specific thing.

So perhaps something like threat.taxonomy, or threat.framework, in which you could put values such as "mitre_attack", "qradar", etc...

I can guarantee that in a big enough organization, people will be using more than one different taxonomy, because [reasons]. So being able to separate them from one another may be helpful.

@dainperkins
Copy link
Contributor Author

dainperkins commented Sep 5, 2019 via email

@dainperkins
Copy link
Contributor Author

dainperkins commented Sep 5, 2019 via email

revised changelog.next, added threat.category, threat.framework, revised organization
make of previous updates
fixed spelling updated desc's
@mbudge
Copy link
Contributor

mbudge commented Sep 12, 2019

An "outcome" or "action" field could store actions take by the observer or agent.

For example

  • Firewall blocking inbound or outbound connection
  • Web proxy blocking outbound http request
  • Anti-virus quarantining malware file
  • Endpoint software blocking suspicious file
  • IPS blocking connection

Not sure if this should go in threat or the event schema.

@MikePaquette
Copy link
Contributor

@mbudge Yes, the actions such as those you list, are in many ways the "story" of the event, so I think this is better captured at the event level using the event.action field.

@webmat
Copy link
Contributor

webmat commented Sep 30, 2019

I'd like to close on this soon, but there's something that's been bugging me about the proposal.

According to the field set's definition, it sounds like it would be fine to either use this to map one's alerts to a taxonomy, or to use the source alert categorization as is (e.g. the Suricata alert categories). I think this field set should purely focus on making it possible to map alerts to the user's chosen taxonomy. Can be mitre, can be another taxonomy.

Corollary to that, I think it would be important to work on a sister field set that is specifically meant to capture the generic concepts about alerts. Before we have both, I think having only "threat.*" will be confusing.

I think the absence of the "alert" field set is what led us to discussing the addition .revision in here, for example. I think tracking a revision makes sense if you're talking about the version of an alert, but not if you're mapping alerts to a taxonomy. I mean it would make sense to have it in alert.revision, not in threat.revision.

Here's how I would envision the two. Let's take the same example as above to illustrate:

        "suricata.eve.alert.category": "Attempted Information Leak",
        "suricata.eve.alert.gid": 1,
        "suricata.eve.alert.rev": 4,
        "suricata.eve.alert.signature": "ET POLICY curl User-Agent Outbound",
        "suricata.eve.alert.signature_id": 2013028,

Given the existence of an alert field set, the mapping I would see would be:

ECS Field Value Source Field
message ET POLICY curl User-Agent Outbound suricata.eve.alert.signature
alert.id 2013028 suricata.eve.alert.signature_id
alert.category.id 1 suricata.eve.alert.gid
alert.category.name Attempted Information Leak suricata.eve.alert.category
alert.revision 4 suricata.eve.alert.rev

Then if someone is using Mitre, they would have mapped the known Suricata alerts to the mitre taxonomy, and the resulting event would also have these populated:

ECS Field Value
threat.framework mitre_att&ck
threat.tactic.id TA0010
threat.tactic.name exfiltration
threat.tactic.reference https://attack.mitre.org/tactics/TA0010/
threat.technique.id T1048
threat.technique.name Exfiltration Over Alternative Protocol
threat.technique.reference https://attack.mitre.org/techniques/T1048

If the user is actually using a different taxonomy, all of alert.* would remain exactly the same, but only what's under threat would be changing to that other taxonomy.

@webmat
Copy link
Contributor

webmat commented Sep 30, 2019

Heads up as well. Ray is working on a misp importer Filebeat module here elastic/beats#13805. There's some commonalities.

Worth giving this a look, while pondering all this.

- name: revision
format: string
level: extended
type: long
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just spotted this. It should be keyword. Not all revisions are purely numeric.

@dainperkins
Copy link
Contributor Author

Forgot to commit before pull req 1 today...

@@ -11,6 +11,8 @@ Thanks, you're awesome :-) -->

### Added

* Remnoved threat event fields #505
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We simplified the PR, but this PR is still "Adding threat fields" :-)

Copy link
Contributor

@webmat webmat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had not noticed all the places you had added the multi_fields. Since the threat fields are now solely focused on mapping to a taxonomy, it means the range of expected values will be much more limited. Therefore I think we should remove all of the multi-fields in here for now. We can add them back later if there's a need.

I'm also requesting changes on the field set short and full definitions.

Once these are in place, we can merge.

  • Fix the changelog
  • Remove all multi-field
  • Adjust fieldset's short description
  • Adjust fieldset's main description

Thanks @dainperkins!

simplified threat fields, limiting to taxonomy fields for ecs 1.2
updated changelog for revised threat fieldset for 1.2
spelling / changelog fixes
Comment on lines 9 to 12
These fields are for users to classify alerts from all of their sources (e.g. IDS, NGFW, etc.) within a
common taxonomy. The threat.technique.* are meant to capture the high level category of the threat
(e.g. "exfiltration"). The threat.tactic.* fields are meant to capture which kind of approach is used by
this detected threat, to accomplish the goal (e.g. "data compressed").
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I asked you to adjust the fieldset definition, and I got tactic and technique reversed 😂 Sorry about that.

High level category is tactic, and technique is the actual method used. Please update it to undo my mistake:

These fields are for users to classify alerts from all of their sources (e.g. IDS, NGFW, etc.) within a
common taxonomy. The threat.tactic.* fields are meant to capture the high level category of the threat
(e.g. "exfiltration"). The threat.technique.* fields are meant to capture the method used by
this detected threat, to accomplish the goal (e.g. "data compressed").

fixed tactc/technique & replicated impact:endpoint DOS in top level example
Copy link
Contributor

@webmat webmat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see you aligned the field set description with the examples used across the fields. Love it!

LGTM

Copy link
Contributor

@webmat webmat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Thanks for all the last minute adjustments 🙂

@webmat
Copy link
Contributor

webmat commented Oct 2, 2019

Oops, that last LGTM was on the wrong PR 🤦‍♂

Copy link
Contributor

@MikePaquette MikePaquette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@webmat webmat merged commit 3f9d048 into elastic:master Oct 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants