-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4852392
commit 48625fc
Showing
21 changed files
with
3,268 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ xmltodict>=0.11.0 | |
requests_toolbelt==0.9.1 | ||
pandas>=0.25.0 | ||
ibmcloudsql>=0.3.6 | ||
# git+git://github.com/oasis-open/[email protected]#egg=stix2-matcher #uncomment when running locally | ||
adal>=1.2.2 | ||
#git+git://github.com/oasis-open/[email protected]#egg=stix2-matcher #uncomment when running locally |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
455 changes: 455 additions & 0 deletions
455
stix_shifter/stix_translation/src/modules/msatp/README.md
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
10 changes: 10 additions & 0 deletions
10
stix_shifter/stix_translation/src/modules/msatp/data_mapping.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from os import path | ||
from stix_shifter.stix_translation.src.modules.base.base_data_mapper import BaseDataMapper | ||
|
||
|
||
class DataMapper(BaseDataMapper): | ||
|
||
def __init__(self, options): | ||
mapping_json = options['mapping'] if 'mapping' in options else {} | ||
basepath = path.dirname(__file__) | ||
self.map_data = mapping_json or self.fetch_mapping(basepath) |
195 changes: 195 additions & 0 deletions
195
stix_shifter/stix_translation/src/modules/msatp/json/from_stix_map.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,195 @@ | ||
{ | ||
"ipv4-addr": { | ||
"fields": { | ||
"value": ["NetworkCommunicationEvents.LocalIP", "NetworkCommunicationEvents.RemoteIP"] | ||
} | ||
}, | ||
"ipv6-addr": { | ||
"fields": { | ||
"value": ["NetworkCommunicationEvents.LocalIP", "NetworkCommunicationEvents.RemoteIP"] | ||
} | ||
}, | ||
"network-traffic": { | ||
"fields": { | ||
"src_port": ["NetworkCommunicationEvents.LocalPort"], | ||
"dst_port": ["NetworkCommunicationEvents.RemotePort"], | ||
"protocols[*]": ["NetworkCommunicationEvents.Protocol"], | ||
"src_ref.value": ["NetworkCommunicationEvents.LocalIP","MachineNetworkInfo.MacAddress"], | ||
"dst_ref.value": ["NetworkCommunicationEvents.RemoteIP"] | ||
} | ||
}, | ||
"url": { | ||
"fields": { | ||
"value": ["NetworkCommunicationEvents.RemoteUrl"] | ||
} | ||
}, | ||
"file": { | ||
"fields": { | ||
"name": [ | ||
"FileCreationEvents.FileName", | ||
"FileCreationEvents.InitiatingProcessFileName", | ||
"FileCreationEvents.InitiatingProcessParentFileName", | ||
"ProcessCreationEvents.FileName", | ||
"ProcessCreationEvents.InitiatingProcessFileName", | ||
"ProcessCreationEvents.InitiatingProcessParentFileName", | ||
"NetworkCommunicationEvents.InitiatingProcessFileName", | ||
"NetworkCommunicationEvents.InitiatingProcessParentFileName", | ||
"RegistryEvents.InitiatingProcessFileName", | ||
"RegistryEvents.InitiatingProcessParentFileName" | ||
], | ||
"hashes.SHA-1": [ | ||
"FileCreationEvents.SHA1", | ||
"FileCreationEvents.InitiatingProcessSHA1", | ||
"ProcessCreationEvents.SHA1", | ||
"ProcessCreationEvents.InitiatingProcessSHA1", | ||
"NetworkCommunicationEvents.InitiatingProcessSHA1", | ||
"RegistryEvents.InitiatingProcessSHA1" | ||
], | ||
"hashes.SHA-256": [ | ||
"FileCreationEvents.SHA256", | ||
"ProcessCreationEvents.SHA256", | ||
"ProcessCreationEvents.InitiatingProcessSHA256" | ||
], | ||
"hashes.MD5": [ | ||
"FileCreationEvents.MD5", | ||
"FileCreationEvents.InitiatingProcessMD5", | ||
"ProcessCreationEvents.MD5", | ||
"ProcessCreationEvents.InitiatingProcessMD5", | ||
"NetworkCommunicationEvents.InitiatingProcessMD5", | ||
"RegistryEvents.InitiatingProcessMD5" | ||
], | ||
"parent_directory_ref.path": [ | ||
"FileCreationEvents.FolderPath", | ||
"FileCreationEvents.InitiatingProcessFolderPath", | ||
"ProcessCreationEvents.FolderPath", | ||
"ProcessCreationEvents.InitiatingProcessFolderPath", | ||
"NetworkCommunicationEvents.InitiatingProcessFolderPath", | ||
"RegistryEvents.InitiatingProcessFolderPath"] | ||
} | ||
}, | ||
"process" : { | ||
"fields": { | ||
"name": [ | ||
"ProcessCreationEvents.FileName", | ||
"NetworkCommunicationEvents.InitiatingProcessFileName", | ||
"NetworkCommunicationEvents.InitiatingProcessParentFileName", | ||
"RegistryEvents.InitiatingProcessFileName", | ||
"RegistryEvents.InitiatingProcessParentFileName" | ||
], | ||
"parent_ref.name": [ | ||
"ProcessCreationEvents.InitiatingProcessFileName", | ||
"NetworkCommunicationEvents.InitiatingProcessParentFileName", | ||
"RegistryEvents.InitiatingProcessParentFileName" | ||
], | ||
"parent_ref.parent_ref.name": ["ProcessCreationEvents.InitiatingProcessParentFileName"], | ||
"command_line": [ | ||
"ProcessCreationEvents.ProcessCommandLine", | ||
"NetworkCommunicationEvents.InitiatingProcessCommandLine", | ||
"RegistryEvents.InitiatingProcessCommandLine" | ||
], | ||
"parent_ref.command_line": ["ProcessCreationEvents.InitiatingProcessCommandLine"], | ||
"pid": [ | ||
"ProcessCreationEvents.ProcessId", | ||
"NetworkCommunicationEvents.InitiatingProcessId", | ||
"NetworkCommunicationEvents.InitiatingProcessParentId", | ||
"RegistryEvents.InitiatingProcessId", | ||
"RegistryEvents.InitiatingProcessParentId" | ||
], | ||
"parent_ref.pid": [ | ||
"ProcessCreationEvents.InitiatingProcessId", | ||
"NetworkCommunicationEvents.InitiatingProcessParentId", | ||
"RegistryEvents.InitiatingProcessParentId" | ||
], | ||
"parent_ref.parent_ref.pid": ["ProcessCreationEvents.InitiatingProcessParentId"], | ||
"creator_user_ref.user_id": ["ProcessCreationEvents.AccountSid"], | ||
"creator_user_ref.account_login": ["ProcessCreationEvents.AccountName"], | ||
"parent_ref.creator_user_ref.user_id": ["ProcessCreationEvents.InitiatingProcessAccountSid"], | ||
"parent_ref.creator_user_ref.account_login": ["ProcessCreationEvents.InitiatingProcessAccountName"], | ||
"binary_ref.hashes.SHA-1": [ | ||
"ProcessCreationEvents.SHA1", | ||
"NetworkCommunicationEvents.InitiatingProcessSHA1", | ||
"RegistryEvents.InitiatingProcessSHA1" | ||
], | ||
"binary_ref.hashes.SHA-256": ["ProcessCreationEvents.SHA256"], | ||
"binary_ref.hashes.MD5": [ | ||
"ProcessCreationEvents.MD5", | ||
"NetworkCommunicationEvents.InitiatingProcessMD5", | ||
"RegistryEvents.InitiatingProcessMD5" | ||
], | ||
"parent_ref.binary_ref.hashes.SHA-1": ["ProcessCreationEvents.InitiatingProcessSHA1"], | ||
"parent_ref.binary_ref.hashes.SHA-256": ["ProcessCreationEvents.InitiatingProcessSHA256"], | ||
"parent_ref.binary_ref.hashes.MD5": ["ProcessCreationEvents.InitiatingProcessMD5"], | ||
"created": [ | ||
"ProcessCreationEvents.ProcessCreationTime", | ||
"NetworkCommunicationEvents.InitiatingProcessCreationTime", | ||
"NetworkCommunicationEvents.InitiatingProcessParentCreationTime", | ||
"RegistryEvents.InitiatingProcessCreationTime", | ||
"RegistryEvents.InitiatingProcessParentCreationTime" | ||
], | ||
"parent_ref.created": [ | ||
"ProcessCreationEvents.InitiatingProcessCreationTime", | ||
"NetworkCommunicationEvents.InitiatingProcessParentCreationTime", | ||
"RegistryEvents.InitiatingProcessParentCreationTime" | ||
], | ||
"parent_ref.parent_ref.created": ["ProcessCreationEvents.InitiatingProcessParentCreationTime"], | ||
"binary_ref.parent_directory_ref.path": [ | ||
"ProcessCreationEvents.FolderPath", | ||
"NetworkCommunicationEvents.InitiatingProcessFolderPath", | ||
"RegistryEvents.InitiatingProcessFolderPath"], | ||
"parent_ref.binary_ref.parent_directory_ref.path": ["ProcessCreationEvents.InitiatingProcessFolderPath"] | ||
} | ||
}, | ||
"user-account": { | ||
"fields": { | ||
"user_id": [ | ||
"ProcessCreationEvents.AccountSid", | ||
"NetworkCommunicationEvents.InitiatingProcessAccountSid", | ||
"RegistryEvents.InitiatingProcessAccountSid" | ||
], | ||
"account_login": [ | ||
"ProcessCreationEvents.AccountName", | ||
"NetworkCommunicationEvents.InitiatingProcessAccountName", | ||
"RegistryEvents.InitiatingProcessAccountName" | ||
] | ||
} | ||
}, | ||
"windows-registry-key": { | ||
"fields": { | ||
"key": ["RegistryEvents.RegistryKey"], | ||
"values[*]": ["RegistryEvents.RegistryValueName"] | ||
} | ||
}, | ||
"mac-addr": { | ||
"fields": { | ||
"value": ["MachineNetworkInfo.MacAddress"] | ||
} | ||
}, | ||
"x-com-msatp": { | ||
"fields": { | ||
"computer_name": [ | ||
"FileCreationEvents.ComputerName", | ||
"ProcessCreationEvents.ComputerName", | ||
"NetworkCommunicationEvents.ComputerName", | ||
"RegistryEvents.ComputerName" | ||
], | ||
"machine_id": [ | ||
"FileCreationEvents.MachineId", | ||
"ProcessCreationEvents.MachineId", | ||
"NetworkCommunicationEvents.MachineId", | ||
"RegistryEvents.MachineId" | ||
] | ||
} | ||
}, | ||
"directory": { | ||
"fields": { | ||
"path": [ | ||
"FileCreationEvents.FolderPath", | ||
"FileCreationEvents.InitiatingProcessFolderPath", | ||
"ProcessCreationEvents.FolderPath", | ||
"ProcessCreationEvents.InitiatingProcessFolderPath", | ||
"NetworkCommunicationEvents.InitiatingProcessFolderPath", | ||
"RegistryEvents.InitiatingProcessFolderPath" | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.