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

Bug: parse multiple metadata tags #57

Closed
sevdog opened this issue Aug 9, 2017 · 1 comment
Closed

Bug: parse multiple metadata tags #57

sevdog opened this issue Aug 9, 2017 · 1 comment
Assignees

Comments

@sevdog
Copy link

sevdog commented Aug 9, 2017

Starting from 08 August 2017 ET is adding new metadata to its rules, (as stated herre).

This is a big help for developers and analists, but there are some problem with the rule parser: if there are more than 1 metadata tag in the raw rule only the last will be kept by the parser. This because the code does not assume that anyone would use more than 1 metadata tag in each rule (code here).

However some rule now has 2 metadata tags, ie:

alert udp $HOME_NET any -> any 53 (msg:"ET TROJAN CryptON/Nemesis/X3M Ransomware Onion Domain"; content:"|01 00 00 01 00 00 00 00 00 00|"; depth:10; offset:2; content:"|10|yvvu3fqglfceuzfu"; fast_pattern; distance:0; nocase; metadata: former_category TROJAN; reference:url,blog.emsisoft.com/2017/05/01/remove-cry128-ransomware-with-emsisofts-free-decrypter/; reference:url,www.cyber.nj.gov/threat-profiles/ransomware-variants/crypt-on; classtype:trojan-activity; sid:2024525; rev:2; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, attack_target Client_Endpoint, deployment Perimeter, tag Ransomware_Onion_Domain, tag Ransomware, signature_severity Major, created_at 2017_08_08, malware_family Crypton, malware_family Nemesis, performance_impact Low, updated_at 2017_08_08;)

This rule has these metadata:

metadata: former_category TROJAN; 
metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, attack_target Client_Endpoint, deployment Perimeter, tag Ransomware_Onion_Domain, tag Ransomware, signature_severity Major, created_at 2017_08_08, malware_family Crypton, malware_family Nemesis, performance_impact Low, updated_at 2017_08_08;

As stated in SNORT rule manual and in Suricata sources, metadata are ignored by IDS/IPS engine. Also examples states that a writer can use more than one metadata tag.

The right behaviour would be to append any new metadata list to the existing one.

@jasonish jasonish self-assigned this Aug 9, 2017
jasonish added a commit that referenced this issue Aug 9, 2017
When metadata exists more than once in a rule, append to the list
instead of replacing it.

Github issue:
#57
@jasonish
Copy link
Owner

Closing. This was fixed in 0.6.2.

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