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

Script does not work #19

Open
irfaan0999 opened this issue May 31, 2023 · 4 comments
Open

Script does not work #19

irfaan0999 opened this issue May 31, 2023 · 4 comments

Comments

@irfaan0999
Copy link

Hello bro,

The script sigma_to_wazuh.py does not work. I tried using different machines and python versions. Here is the error:

[root@localhost sigma_to_wazuh]# python3 sigma_to_wazuh.py
[!] ERROR loading rule id tracking file: ./rule_ids.json
Traceback (most recent call last):
File "sigma_to_wazuh.py", line 961, in
main()
File "sigma_to_wazuh.py", line 935, in main
conditions = convert.fixup_condition(sigma_rule['detection']['condition'])
TypeError: string indices must be integers

Possible to fix the script plz?

Regards,

@theflakes
Copy link
Owner

I won't be getting back to this for a while most likely. That file its complaining about is a file used for tracking rules from one run of the script to another. You can try deleting it, no idea if that will fix it though.

@irfaan0999
Copy link
Author

irfaan0999 commented Jun 7, 2023

Hello bro,

I deleted it but it is not working :(

What should the file contain? Do you have a copy?

@theflakes
Copy link
Owner

theflakes commented Jun 7, 2023

Took a quick look, found an unfinished sigma rule from their repo was breaking things. Added a catch to ignore broken rules.

Please note though that this script may never be able to convert all the logic in all sigma rules correctly. In other words, a rule may convert without error but the logic could be wrong in the Wazuh rule(s). The conversion can be very complex for some Wazuh rules and I'm not sure I can or have the time to figure it out 100%.

@irfaan0999
Copy link
Author

The script is working fine now. Thank you bro, Great job.

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