Closed 0xFustang closed 1 year ago
hi @AlphaCorvus
I tried to reproduce the error with your code, but on my side both the creation of a new file as updating a file works fine.
However I am able to reproduce the error when consciously introducing a semantic error in the YAML. So I would advise you to check the exusting test.yaml file for errors. Especially checking if all techniques does have a detection object and that all detection objects do have one or more applicable_to objects. You can also use DeTT&CT to check the health of a YAML file:
$ python dettect.py d -ft test.yaml --health
It will then give you an overview of existing errors in the YAML file.
Please let me know if this will tackles your problem.
Hi @rubinatorz,
Thanks for reviewing this issue. Actually, I am generating the techniques administration file out of the command from DeTTECT ds -fd /opt/DeTTECT/input/datasources_file.yaml --yaml --yaml-all-techniques
. It appears that the YAML could be different than one YAML created from dettectinator. By any chance, do you observe the same?
As a workaround, I am considering to create my techniques admin file from dettectinator, than update the visibility using the datasources file.
Quick update @rubinatorz,
Unfortunately, it didn't do the trick. I am unable to update a file created from DeTT&CK (--yaml --yaml-all-techniques
) using dettectinator (admin file). I checked for semantic errors and health of the YAML is fine.
My workaround can be applied, some visibility are missing where no detection is available for a given techniques.
Hi @AlphaCorvus
I just found the error and I'm trying to fix it. Within the next hour I expect a fix to be pushed. I'll let you know.
Cheers
hi @AlphaCorvus
The thing was that DeTT&CT supports a detection object in the YAML file being a list or a dict (just one entry). Dettectinator only supported detection objects being a list. I fixed it on both sides. So in DeTT&CT by default detection objects are now lists. So when pulling the latest changes from DeTT&CT repo and then generating your YAML file again will give you a proper YAML file having detection objects that are lists. I also fixed it in dettectinator. Dettectinator now converts single entry detection objects (dict) to a list. So you can also pull the latest version from dettectinator repo.
Good luck!
Thank you so much @rubinatorz! - It runs smoothly, nice work! 👍
Hi,
I am experiencing an issue when I am trying to update an existing technique administration file using the plugin
TechniqueSigmaRules
. However, it works fine when I am generating a new administration file (dettect = DettectTechniquesAdministration()
). The technique administration file is standard and was generated using DeTTECT.Do you happen to have the same issue?
Code:
Content of
techniques
:Error: