-
Notifications
You must be signed in to change notification settings - Fork 85
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 rule group from msg when parsing #41
Comments
The usage of the group field is actually to contain the filename the rule was extracted from (see https://github.com/jasonish/py-idstools/blob/master/idstools/scripts/rulecat.py#L749). Rulecat then has a keyword, "group:" to enable/disable rules based on their group. I do see use for what you are suggesting, but perhaps under a different name than group? Or perhaps the filename was misnamed, and should be something else. From this blog post http://blog.snort.org/2012/03/rule-category-reorganization.html, it looks like Talos refers to the filename and the leading all caps in the message as a category. Perhaps the rule parser should parse out this all caps data as "category" and not group - keeping group as the filename. |
Referring this attribute as
I think that These are some example of categorization:
Rules coming from ET follow this convention on the
However, looking into Talos' rules for SNORT, I noticed they use a different convention on `msg:
With this in mind I think that a better solution whould be to add some code to the parser that can recognize if the It whould be great if we can also make it work with other naming convention, but this will require more reasoning. |
Going deeper in SNORT rules i foud that they use a more particular pattern to include metadata in the
With in mind I think that a parser to extract metadata from Something like
|
Ok, this feature is out of scope. If needed I will use it out of this library. |
When parsing a merged rule file, using in example
rule.parse_file
, is not possible to assign the group parameter and the rule group is not parsed into the object.However the group is somehow standardized in the rule
msg
using this convention:botcc.rules
ciarmy.rules
compromised.rules
drop.rules
(alsodshield.rules
)emerging-activex.rules
emerging-attack_response.rules
emerging-chat.rules
emerging-current_events.rules
emerging-deleted.rules
emerging-dns.rules
emerging-dos.rules
emerging-exploit.rules
emerging-ftp.rules
emerging-games.rules
emerging-icmp_info.rules
emerging-icmp.rules
emerging-imap.rules
emerging-inappropriate.rules
emerging-info.rules
emerging-malware.rules
emerging-misc.rules
emerging-mobile_malware.rules
emerging-netbios.rules
emerging-p2p.rules
emerging-policy.rules
emerging-pop3.rules
emerging-rpc.rules
emerging-scada.rules
emerging-scan.rules
emerging-shellcode.rules
emerging-smtp.rules
emerging-snmp.rules
emerging-sql.rules
emerging-telnet.rules
emerging-tftp.rules
emerging-trojan.rules
emerging-user_agents.rules
emerging-voip.rules
emerging-web_client.rules
emerging-web_server.rules
emerging-web_specific_apps.rules
emerging-worm.rules
tor.rules
So, if rules are well writtent and no group is provided the parser should extract it from the
msg
second word.If you find this interesting I can make a PR for this feature.
The text was updated successfully, but these errors were encountered: