Skip to content

Commit 95ecc78

Browse files
committed
fix: [stix2 import] Making sure hash types are correctly matched from both observable objects and indicators
1 parent f142b0b commit 95ecc78

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

misp_stix_converter/stix2misp/converters/stix2mapping.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,15 @@ class STIX2Mapping:
315315
__file_hashes = Mapping(
316316
**{
317317
'MD5': __md5_attribute,
318+
'SHA1': __sha1_attribute,
318319
'SHA-1': __sha1_attribute,
320+
'SHA256': __sha256_attribute,
319321
'SHA-256': __sha256_attribute,
322+
'SHA512': __sha512_attribute,
320323
'SHA-512': __sha512_attribute,
324+
'SHA3256': __sha3_256_attribute,
321325
'SHA3-256': __sha3_256_attribute,
326+
'SHA3512': __sha3_512_attribute,
322327
'SHA3-512': __sha3_512_attribute,
323328
'SSDEEP': __ssdeep_attribute,
324329
'ssdeep': __ssdeep_attribute,
@@ -1260,13 +1265,10 @@ class InternalSTIX2Mapping(STIX2Mapping):
12601265
**STIX2Mapping.file_hashes(),
12611266
AUTHENTIHASH=__authentihash_attribute,
12621267
IMPHASH=STIX2Mapping.imphash_attribute(),
1263-
SHA1=STIX2Mapping.sha1_attribute(),
12641268
SHA224=__sha224_attribute,
1265-
SHA256=STIX2Mapping.sha256_attribute(),
12661269
SHA3224=__sha3_224_attribute,
12671270
SHA3384=__sha3_384_attribute,
12681271
SHA384=__sha384_attribute,
1269-
SHA512=STIX2Mapping.sha512_attribute(),
12701272
TELFHASH=__telfhash_attribute,
12711273
VHASH=__vhash_attribute
12721274
)

0 commit comments

Comments
 (0)