-
Notifications
You must be signed in to change notification settings - Fork 760
Wazuh agent repeated offenders #5116
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
Wazuh agent repeated offenders #5116
Conversation
| "parameters":{ | ||
| "keys": [event['parameters']['alert']['rule']['id']] | ||
| unique_key = "%s-%s" % (event['parameters']['alert']['rule']['id'], srcip) | ||
| "keys": [unique_key] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mbedworth did you rebase your branch? this change looks like the one we merged recently
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my fault let me try that again.... New to this process sorry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mbedworth no problem, we all learn every day.
| </client_buffer> | ||
|
|
||
| <!-- Active response --> | ||
| <active-response> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we better remove the without context below to keep the structure as is, there's a risk 005-active-response.conf will still exist and cause issues for some.
6ebaa9a to
93a1355
Compare
- Add repeated_offenders field to active response settings - Remove 'without context' from ossec.conf include loop to allow variable access in config fragments - Fix opnsense-fw.conf template bug: wazuh_command -> active_response - Bump model version to 1.0.3
93a1355 to
4a606fc
Compare
|
Hope that worked! Summary New feature: repeated_offenders field in Active Response settings - allows comma-separated escalating timeout values (e.g., 60,90,120,180,240) Files Changed WazuhAgent.xml - Added field, bumped version to 1.0.3 Tested On OPNsense 25.7.10 / os-wazuh-agent 1.2_3 / wazuh-agent 4.12.0 |
|
@mbedworth clean and simple, nice, thanks! |
Summary
This PR adds GUI configuration for the Wazuh
repeated_offendersactive response setting and fixes a pre-existing bug in theopnsense-fw.conftemplate.Changes
New Feature: Repeated Offenders Configuration
Adds a text field in Services > Wazuh Agent > Settings > Active Response that allows configuring escalating block timeouts for repeat offenders.
Example value:
30,60,120This setting was previously only configurable by manually editing files in
ossec_config.d/.Bug Fix: opnsense-fw.conf template
Fixed a bug where the template referenced
OPNsense.WazuhAgent.wazuh_command.fw_alias_ignoreinstead of the correct pathOPNsense.WazuhAgent.active_response.fw_alias_ignore. This caused template generation to fail when using the firewall alias ignore feature.Files Changed
models/OPNsense/WazuhAgent/WazuhAgent.xmlrepeated_offendersTextField, bumped version to 1.0.3controllers/OPNsense/WazuhAgent/forms/settings.xmlservice/templates/OPNsense/WazuhAgent/ossec.confservice/templates/OPNsense/WazuhAgent/opnsense-fw.confwazuh_command->active_responsereferenceservice/templates/OPNsense/WazuhAgent/ossec_config.d/005-active-response.confTechnical Notes
The active-response configuration block was moved from
ossec_config.d/005-active-response.confto the mainossec.conftemplate. This is required because config fragments included withwithout contextcannot access template variables directly (onlyhelpers.*functions work). Sincerepeated_offendersneeds variable interpolation, the block must be in the main template.Testing
Tested on:
Verified:
Screenshots
The new field appears in the Active Response section: