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

Cogburn/advanced suricata #438

Merged
merged 2 commits into from
Apr 24, 2024
Merged

Cogburn/advanced suricata #438

merged 2 commits into from
Apr 24, 2024

Conversation

coreyogburn
Copy link
Contributor

We were processing every non-commented line in the suricata rules file. Now we're processing every rule and using the comments to indicate if it's enabled or not (not commented = enabled).

Some new complexity was added that's unique to Suricata. Because we manipulate the rules through pillars, we now take advantage of a unique opportunity that will let the ruleset determine if a detection is enabled UNTIL a user modifies the detection at which point the user's preference will forever override the ruleset. The new logic is: if a community rule's sid is not in the enabled pillar or the disabled pillar at the time of import then the sid is left out of the pillars, conversely if the sid is found in a pillar then it should be updated. When not specified in either pillar, the status of a suricata detection will be determined by whether it's commented out or not in the original rule file.

De-linted a line. Readers only throw errors when unreading a non-seekable stream. The stream in use here is always seekable and will never return an error.

We were processing every non-commented line in the suricata rules file. Now we're processing every rule and using the comments to indicate if it's enabled or not (not commented = enabled).

Some new complexity was added that's unique to Suricata. Because we manipulate the rules through pillars, we now take advantage of a unique opportunity that will let the ruleset determine if a detection is enabled UNTIL a user modifies the detection at which point the user's preference will forever override the ruleset. The new logic is: if a community rule's sid is not in the enabled pillar or the disabled pillar at the time of import then the sid is left out of the pillars, conversely if the sid is found in a pillar then it should be updated. When not specified in either pillar, the status of a suricata detection will be determined by whether it's commented out or not in the original rule file.

De-linted a line. Readers only throw errors when unreading a non-seekable stream. The stream in use here is always seekable and will never return an error.
@coreyogburn coreyogburn merged commit 7ed16a8 into 2.4/dev Apr 24, 2024
3 checks passed
@coreyogburn coreyogburn deleted the cogburn/advanced-suricata branch April 24, 2024 18:21
@github-actions github-actions bot locked and limited conversation to collaborators Apr 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants