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

Feature request: extract ruleset when parsing #42

Open
sevdog opened this issue Mar 20, 2017 · 1 comment
Open

Feature request: extract ruleset when parsing #42

sevdog opened this issue Mar 20, 2017 · 1 comment

Comments

@sevdog
Copy link

sevdog commented Mar 20, 2017

The Rule object has no ruleset attribute.

Examples:

alert http $EXTERNAL_NET any -> $HOME_NET any (msg:"ET MALWARE Windows executable sent when remote host claims to send an image 2"; flow: established,from_server; content:"|0d 0a|Content-Type|3a| image/jpeg|0d 0a 0d 0a|MZ"; fast_pattern:12,20; classtype:trojan-activity; sid:2020757; rev:2;)

is from ET ruleset

alert ip any any -> any any (msg:"GPL ATTACK_RESPONSE id check returned root"; content:"uid=0|28|root|29|"; classtype:bad-unknown; sid:2100498; rev:7; metadata:created_at 2010_09_23, updated_at 2010_09_23;)

is from SNORT GPL

Usually the ruleset is the first word in the Rule.msg attribute, so it should not be difficult to extract. If someone does not use this convention it should be possible to opt-out this parsing function, maybe letting the parser get this value as an optional argument.

@jasonish
Copy link
Owner

I'm not to sure about this one. I don't like to make guesses or assumptions. Do you have an example use case in mind?

If using the parser as a library in your own tool, I think its easy enough to add something like this post-parsing, but I don't think its deterministic enough to bake in.

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

No branches or pull requests

2 participants