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

added rule fields #665

Merged
merged 13 commits into from
Dec 12, 2019
Merged

added rule fields #665

merged 13 commits into from
Dec 12, 2019

Conversation

dainperkins
Copy link
Contributor

@dainperkins dainperkins commented Dec 2, 2019

Added rule fields for agent / observer rule based events/actions

Closes #598

Added rule fields for agent / observer rule based events/actions
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.

Where do we add text about field re-use?

@dainperkins
Copy link
Contributor Author

also added "a link to the vendors documentation regarding the rule" to the reference field (e.g. https://www.snort.org/rule_docs/1-50032)

Should we have multiple examples?

@dainperkins
Copy link
Contributor Author

Where do we add text about field re-use?

unsure @webmat?

Also @MikePaquette & @webmat

  • should we provide some rule.type examples?
    • acl (base ip / port decision)
    • url (e.g. blocked url)
    • protocol (e.g. malformed or tunneled protocol)
    • intrusion (detection/prevention)

updated descriptions per mikes requests, added rule.reference text to to include vendor references
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 @dainperkins!

Here's my preliminary review. A lot of small nitpicks to clean things up, but also a few important questions.

Please run make on subsequent pushes, I'd like to see this in the docs preview as well :-)


example: DNS

- name: ruleset
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the relationship between ruleset and type? Is there a hierarchy there?

Copy link
Contributor Author

@dainperkins dainperkins Dec 3, 2019

Choose a reason for hiding this comment

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

Ruleset is a logical grouping of rules (e.g. a collection of individual rules that are applied to a group for e.g. url filtering or nac policies)

Type is what kind of action does the rule concern itself with, I'm not sure type is necessary across the board.

Copy link
Contributor Author

@dainperkins dainperkins Dec 4, 2019

Choose a reason for hiding this comment

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

per ecs meeting - I'm thinking rule.type can probably be dropped for now.... leaving just ruleset which I can see still being useful for easily visualizing alerts / events related to a group of rules

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I'm good with dropping .type for now.

Just to be sure we're on the same page, .ruleset is meant to capture a value according to the source of these events?

For example, using this to map Suricata alerts like this one, we would have this?

rule.category="Attempted Information Leak" (from suricata.eve.alert.category)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dropped, tho now I am reading the above and thinking maybe we need discrete rulesets (groups of rules/signatures that may apply to e.g. specific networks - e.g. GUEST NET IPS SIGNATURE AND rule.type or rule.category - e.g. "Attempted Information Leak" as they are definitely different things logistically

I think category is more descriptive so I will add that in.

removed vlan pr
@webmat
Copy link
Contributor

webmat commented Dec 3, 2019

Where do we add text about field re-use?

@MikePaquette What do you mean by that? We agreed that rule would be at the top level, right? Nesting it under agent + observer would mean we can't analyze both sets of rules together.

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.

Here's another round of comments.

Please don't forget to address the smaller diffs I proposed in my previous review.


example: DNS

- name: ruleset
Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I'm good with dropping .type for now.

Just to be sure we're on the same page, .ruleset is meant to capture a value according to the source of these events?

For example, using this to map Suricata alerts like this one, we would have this?

rule.category="Attempted Information Leak" (from suricata.eve.alert.category)

fixed spelling, cap., and gram errors.  Changes rule.type to be rule.category
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.

Pretty much ready to merge. I'd love to confirm one thing before, and then I think we're good.

What is the relationship between ruleset and category? Is there a hierarchy there? If so which one is higher? Are both vendor-supplied, or do users do these groupings themselves?

schemas/rule.yml Outdated
group: 2
short: Fields to capture details about rules used to generate alerts or other events.
description: >
Rule fields are used to capture the specifics of any observer or agent rules that generate alerts or other events.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: "or other notable events"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm good with that, will update today

on the other question - rule.category is, typically, the category of action the rule is alerting on (e.g. "Web Attacks" rulesets would include xss, directory traversal, etc) and you could then apply the "WEB ATTACKS" rule wherever it needed to be applied, instead of enabling each individual rule.

ruleset is a logical configuration which (often times across multiple managed implementations of a solution - e.g. Panorama managing multiple Palo Altos) combines rules into a single logical set (e.g. on the GUEST NETWORK apply the GUEST rule.ruleset which includes [blocks DNS-over_TLS, blocks nsfw/guns/and competitors web sites, limits bandwidth, etc.)

Copy link
Contributor

Choose a reason for hiding this comment

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

So ruleset is a wider grouping than category? Or are these orthogonal?

Copy link
Contributor Author

@dainperkins dainperkins Dec 11, 2019

Choose a reason for hiding this comment

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

orthogonal...

Ruleset is localized configuration/implementation specific (as in apply ruleset MY_RULES to this subnet / vlan / group) where MY_RULES have been defined to include e.g. 10 discrete rules.

Category is a grouping of rules by type (think Mitre technique or vulnerable system type)

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

I'll likely merge this tomorrow. Leaving a little more time for anyone else to jump in with a final look.

Thanks Dain!

type: keyword
short: Rule description
description: The description of the rule generating the event.
example: Block requests to public DNS over HTTPS / TLS protocols
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm assuming the plan was to do a subsequent PR with the corresponding #680 changes that likely ought to be added?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah the default text indexer would be useful here, but we should do another round later.

@webmat webmat merged commit c29bff4 into elastic:master Dec 12, 2019
dcode pushed a commit to dcode/ecs that referenced this pull request Apr 15, 2020
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.

Add Rule Fields for Observers and Agents
4 participants