OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Intrusion Detection and Prevention »
  • Duplicate/invalid rules
« previous next »
  • Print
Pages: [1]

Author Topic: Duplicate/invalid rules  (Read 1676 times)

planetf1

  • Newbie
  • *
  • Posts: 41
  • Karma: 1
    • View Profile
Duplicate/invalid rules
« on: May 28, 2024, 08:03:42 pm »
I have suricata IDS running under opnsense.

I currently have all the ET Telemetry (proofpoint) rules enabled, along with abuse.ch

In my log I see many signature warnings ie:

Quote
2024-05-23T16:10:05   Error   suricata   [100953] <Error> -- error parsing signature "alert dns $HOME_NET any -> any any (msg:"ET COINMINER Observed DNS Query to Browser Coinminer (crypto-loot[.]com)"; dns.query; content:"crypto-loot.com"; endswith; classtype:coin-mining; sid:2024828; rev:5; metadata:affected_product Any, attack_target Client_Endpoint, created_at 2017_10_09, deployment Perimeter, former_category COINMINER, malware_family CoinMiner, signature_severity Major, tag Coinminer, updated_at 2020_09_15, mitre_tactic_id TA0040, mitre_tactic_name Impact, mitre_technique_id T1496, mitre_technique_name Resource_Hijacking;)" from file /usr/local/etc/suricata/opnsense.rules/emerging-coinminer.rules at line 62   
2024-05-23T16:10:05   Error   suricata   [100953] <Error> -- Duplicate signature "alert dns $HOME_NET any -> any any (msg:"ET COINMINER Observed DNS Query to Browser Coinminer (crypto-loot[.]com)"; dns.query; content:"crypto-loot.com"; endswith; classtype:coin-mining; sid:2024828; rev:5; metadata:affected_product Any, attack_target Client_Endpoint, created_at 2017_10_09, deployment Perimeter, former_category COINMINER, malware_family CoinMiner, signature_severity Major, tag Coinminer, updated_at 2020_09_15, mitre_tactic_id TA0040, mitre_tactic_name Impact, mitre_technique_id T1496, mitre_technique_name Resource_Hijacking;)"

There are 10,000s or more of these.

When I look on disk, I see that I do have 2 files with this sid in
* /usr/local/etc/suricata/opnsense.rules/emerging-coinminer.rules
* /usr/local/etc/suricata/rules/emerging-coinminer.rules

In suricata.yaml I see:

default-rule-path: /usr/local/etc/suricata/opnsense.rules

I'm not sure on the process here, I am guessing one copy is the raw download, the other may be after modifications? But if so, why are these errors being reported on suricata startup? I'd presume it would only look at the opnsense.rules directory?

Logged

someone

  • Full Member
  • ***
  • Posts: 115
  • Karma: 2
    • View Profile
Re: Duplicate/invalid rules
« Reply #1 on: June 10, 2024, 09:41:42 pm »
First line says cant parse
Sometimes its an error in the rule, sometimes syntax, setup, language
I first ran into this back when I was converting snort ET rules to suricata rules
Cant run snort rules on suricata and vice versa
Logged

someone

  • Full Member
  • ***
  • Posts: 115
  • Karma: 2
    • View Profile
Re: Duplicate/invalid rules
« Reply #2 on: June 10, 2024, 09:49:00 pm »
Just so you know I get them also
I dont delete them
I try and fix them
I have fixed many
Sometimes its simple, syntax, punctuation
Logged

someone

  • Full Member
  • ***
  • Posts: 115
  • Karma: 2
    • View Profile
Re: Duplicate/invalid rules
« Reply #3 on: June 26, 2024, 01:40:23 am »
Sorry your having trouble
Opnsense will set up your rules, done in proper order, no trouble
One of the paths you gave is the rule directory, not sure about the other
But it doesnt matter as opnsense will load correctly by default
You should not have that trouble with duplicates, not sure how you got them
 Dont download them twice, it handles updates by default
Logged

someone

  • Full Member
  • ***
  • Posts: 115
  • Karma: 2
    • View Profile
Re: Duplicate/invalid rules
« Reply #4 on: June 26, 2024, 10:23:36 pm »
You didnt mention which version you are using
Version 24 is running very smooth
I had a few problems with earlier version, nothing serious
Logged

MagikMark

  • Newbie
  • *
  • Posts: 40
  • Karma: 2
    • View Profile
Re: Duplicate/invalid rules
« Reply #5 on: June 28, 2024, 01:58:51 am »
I get these also in OpnSense and pfSene.  The maintainer of suricata in pfsense said that this is because some rules and designed for Snort which may not be compatible with Suricata
Logged

notspam

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
    • View Profile
Re: Duplicate/invalid rules
« Reply #6 on: October 21, 2024, 10:03:27 pm »
- clean install of 24.7
- update to 24.7.6
- install the whole plugins like suricata
- enable rules
- save
- download and install
- activate service as ips
- perhaps i press hours later the "download and install" button again

result:
- dozens of duplicate entries
- instable ips service

=> how can i fix this ?
=> how is the misbehaviour fixes in future releases ?

Thanks for your help and your hard work @ opnsense

« Last Edit: October 21, 2024, 10:09:46 pm by notspam »
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Intrusion Detection and Prevention »
  • Duplicate/invalid rules
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2