-
Notifications
You must be signed in to change notification settings - Fork 385
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] Wazuh Responder Not Working #844
Comments
Could you be more specific with regard to the issues you are having? Also, please ensure you have configured TheHive/Cortex as specified in the requirements: |
Hey Wes, Thanks for getting back to me. I see now that Cortex is responding with "Agent ID is Missing": What is the best way to pass the agent id so that wazuh.py can read it? Looking at the python script I see: self.wazuh_agent_id = self.get_param('data.case.customFields.wazuh_agent_id.string', None, "Agent ID Missing!") Is that an Observable I should also bring in? Im a little lost on how the Wazuh Responder knows what agent id to send the active response to. Thanks! |
From the docs: The following custom fields should be created and populated in related records:
These need to be populated so that the Wazuh manager knows to which agent, alert, and rule this pertains. |
These need to actually be populated in the event/alert/case, so that the responder can pull the value from the field and act upon it. |
Would you mind sharing the source of your Wazuh data so that it may be easier to determine how to format this data/these events accordingly? |
Hey Wes, Here is the json output of an example alert { Would I just add a pipeline parameter that would set wazuh_agent_id:, wazuh_rule_id:, wazuh_alert_id: and pass that to thehive via elastalert? Here is an example elastalert config i have to send alerts to thehive: es_host: 1.1.1.1
hive_alert_config: hive_observable_data_mapping: |
Yes, they will need to be added to the case, and specified as custom fields in TheHive (so that they can handled/interpreted correctly). This responder takes a little prep work up front, but after the initial setup of things, you should be okay. |
I think that is bug with the way the error message is reported -- it's supposed to be telling you about the |
Updated the error message(s) here: #845 |
@camaro23 were you able to test the fix? |
Hello, I found the solution to the bug, however, this led to another issue. First, here is the modified code to fix the bug. I'm new to GitHub, so @weslambert or anyone concerned, I would humbly ask you to review and fix, thank you.
Originally, the data (wazuh_agent_id etc) were being fetch from Here is the complete list of modified codings.
The last 5 parameters we modified. Of course, as admin, I then added the 3 missing Custom Fields just like @camaro23 did. The error messages were cleared. However, I am now receiving another error. A blank error. Could anyone follow up on this? Note: I added random values to the Alert and Rule ID. I haven't tested if that caused the issue. |
Closing per PR #845 |
This issue is still present. I am testing this now in a dev environment. The only thing I can think of is perhaps there is some compatibility issues with the latest versions of Wazuh. |
For reference: Report { |
Added this comment to help users if they face "Agent ID Missing" error: |
Still does not work... Even after running it on an observable IP, I still get the same error as Agent ID missing. When I checked in Cortex, I see the following lines: It seems that the fields in wazuh.py is not matching with the custom fields here. Im wazuh.py it is wazuh_agent_id where as in cortex it is wazuh-agent-id. The custom fields that I have created are: Still not able to figure out the issue. |
Finally managed to get it to a point wherein the login is successful. Using the following code:
The line that is not working is: |
Managed to get it working with the following code:
|
I got this error with above script { |
Hey Team,
I am attempting to implement the Wazuh Responder, but am having some issues and am unable to pinpoint the exact issue. I have configured the correct url and username/password to the wazuh manager API but when attempting to run the responder, it fails.
Anyone have any advice or way I could enable more verbose log output?
Thanks!
The text was updated successfully, but these errors were encountered: