Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
[reversinglabs] Fix MD5 STIX patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelHassine committed Aug 3, 2024
1 parent 5d92e63 commit afca13b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions internal-enrichment/reversinglabs-malware-presence/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,9 +701,14 @@ def _check_file_reputation(

if results["score"] > 50:
# Generate indicator from observable with relationships
indicator_pattern = (
f"[file:hashes. '{self.hash_type}' = '{self.hash}']"
)
if self.hash_type == "MD5":
indicator_pattern = (
f"[file:hashes.{self.hash_type} = '{self.hash}']"
)
else:
indicator_pattern = (
f"[file:hashes.'{self.hash_type}' = '{self.hash}']"
)
main_observable_type = "File"
indicator_name = self.hash
self._generate_stix_indicator(
Expand Down

0 comments on commit afca13b

Please sign in to comment.