Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions external-import/malcore/src/config.yml

This file was deleted.

17 changes: 17 additions & 0 deletions external-import/malcore/src/config.yml.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
opencti:
url: 'http://localhost:8080'
token: 'ChangeMe' # OpenCTI API Key

connector:
id: 'ChangeMe' # Valid UUIDv4
type: 'EXTERNAL_IMPORT'
name: 'Malcore'
scope: 'malcore' # MIME type or SCO
log_level: 'info'

malcore:
api_url: 'https://api.malcore.io/api/feed'
api_key: 'ChangeMe'
score: 100
limit: 10000
interval: 12 # In hours, must be strictly greater than 1
3 changes: 2 additions & 1 deletion external-import/malcore/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
try:
connector = Malcore()
connector.run()
except:
except Exception as e:
print(e)
time.sleep(10)
exit(0)
5 changes: 4 additions & 1 deletion external-import/malcore/src/malcore/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ def run_feed_ioc(self, timestamp):
file_size = item_data["file_sizes"]["raw_byte_size"]
hashmd5 = hashes["md5"]

custom_properties = {
"created_by_ref": malcore_org_id,
}
stix_file = stix2.File(
name=upload_time + file_extension,
hashes={
Expand All @@ -128,7 +131,7 @@ def run_feed_ioc(self, timestamp):
},
size=file_size,
mime_type=mime_type,
created_by_ref=malcore_org_id,
custom_properties=custom_properties,
)
file_objects.append(stix_file)

Expand Down