Skip to main content

CreateHashIndicatorWrapper

This Script is part of the Malware Core Pack.#

Supported versions

Supported Cortex XSOAR versions: 6.0.0 and later.

This is a wrapper to allow or block hash lists from Cortex XDR, MSDE or CrowdStrike.

Script Data#


NameDescription
Script Typepython3
Tagsbasescript
Cortex XSOAR Version6.0.0

Inputs#


Argument NameDescription
hashArray of SHA256 hashes.
actionThe action to apply to the hash - allow or block.

Outputs#


PathDescriptionType
MicrosoftATP.Indicators.idCreated by the system when the indicator is ingested. Generated GUID/unique identifier.String
MicrosoftATP.Indicators.actionThe action to apply if the indicator is matched within the targetProduct security tool. Possible values: "unknown", "allow", "block", or "alert".String
MicrosoftATP.Indicators.additionalInformationA catchall area where extra data from the indicator not covered by the other indicator properties may be placed. Data placed into additionalInformation is typically not utilized by the targetProduct security tool.String
MicrosoftATP.Indicators.azureTenantIdStamped by the system when the indicator is ingested. The Azure Active Directory submitting client tenant ID.String
MicrosoftATP.Indicators.confidenceAn integer representing confidence the indicator data accurately identifies malicious behavior. Possible values are 0 – 100, with 100 being the highest.Number
MicrosoftATP.Indicators.descriptionBrief description (100 characters or less) of the threat represented by the indicator.String
MicrosoftATP.Indicators.diamondModelThe area of the Diamond Model in which this indicator exists. Possible values: "unknown", "adversary", "capability", "infrastructure", and "victim".String
MicrosoftATP.Indicators.domainNameDomain name associated with this indicator. Should be in the format subdomain.domain.topleveldomain.String
MicrosoftATP.Indicators.expirationDateTimeDateTime string indicating when the indicator expires. To avoid stale indicators persisting in the system, all indicators must have an expiration date. The timestamp type represents date and time information in ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 looks like: '2014-01-01T00:00:00Z'Date
MicrosoftATP.Indicators.externalIdAn identification number that ties the indicator back to the indicator provider’s system (for example, a foreign key).String
MicrosoftATP.Indicators.fileCompileDateTimeDateTime the file was compiled. The timestamp type represents date and time information in ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 looks like: '2014-01-01T00:00:00Z'Date
MicrosoftATP.Indicators.fileCreatedDateTimeDateTime the file was created.The Timestamp type represents date and time information in ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 looks like: '2014-01-01T00:00:00Z'Date
MicrosoftATP.Indicators.fileHashTypeThe type of hash stored in fileHashValue. Possible values: "unknown", "sha1", "sha256", "md5", "authenticodeHash256", "lsHash", and "ctph".String
MicrosoftATP.Indicators.fileHashValueThe file hash value.String
MicrosoftATP.Indicators.fileMutexNameThe Mutex name used in file-based detections.String
MicrosoftATP.Indicators.fileNameThe name of the file if the indicator is file-based. Multiple file names may be delimited by commas.String
MicrosoftATP.Indicators.filePackerThe packer used to build the file in question.String
MicrosoftATP.Indicators.filePathThe path of the file indicating a compromise. Can be a Windows or *nix style path.String
MicrosoftATP.Indicators.fileSizeThe size of the file in bytes.Number
MicrosoftATP.Indicators.fileTypeThe text description of the type of file. For example, “Word Document” or “Binary”.String
MicrosoftATP.Indicators.ingestedDateTimeThe timestamp the indicator was ingested into the system. The Timestamp type represents date and time information in ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 looks like: '2014-01-01T00:00:00Z'Date
MicrosoftATP.Indicators.isActiveUsed to deactivate indicators within the system. By default, any indicator submitted is set as active. However, providers may submit existing indicators with this set to ‘False’ to deactivate indicators in the system.Boolean
MicrosoftATP.Indicators.knownFalsePositivesScenarios in which the indicator may cause false positives. This should be human-readable text.String
MicrosoftATP.Indicators.lastReportedDateTimeThe last time the indicator was seen. The timestamp type represents date and time information in ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 looks like: '2014-01-01T00:00:00Z'Date
MicrosoftATP.Indicators.networkCidrBlockThe CIDR Block notation representation of the network referenced in this indicator. Use only if the source and destination cannot be identified.String
MicrosoftATP.Indicators.networkDestinationAsnThe destination autonomous system identifier of the network referenced in the indicator.Number
MicrosoftATP.Indicators.networkDestinationCidrBlockThe CIDR Block notation representation of the destination network in this indicator.String
MicrosoftATP.Indicators.networkDestinationIPv4The IPv4 IP address destination.String
MicrosoftATP.Indicators.networkDestinationIPv6The IPv6 IP address destination.String
MicrosoftATP.Indicators.networkDestinationPortThe TCP port destination.Number
MicrosoftATP.Indicators.networkIPv4The IPv4 IP address.String
MicrosoftATP.Indicators.networkIPv6The IPv6 IP address.String
MicrosoftATP.Indicators.networkPortThe TCP port.Number
MicrosoftATP.Indicators.networkProtocolThe decimal representation of the protocol field in the IPv4 header.Number
MicrosoftATP.Indicators.networkSourceAsnThe source autonomous system identifier of the network referenced in the indicator.Number
MicrosoftATP.Indicators.networkSourceCidrBlockThe CIDR Block notation representation of the source network in this indicator.String
MicrosoftATP.Indicators.networkSourceIPv4The IPv4 IP address source.String
MicrosoftATP.Indicators.networkSourceIPv6The IPv6 IP address source.String
MicrosoftATP.Indicators.networkSourcePortThe TCP port source.Number
MicrosoftATP.Indicators.passiveOnlyDetermines if the indicator should trigger an event that is visible to an end-user. When set to ‘true,’ security tools do not notify the end user that a ‘hit’ has occurred. This is most often treated as audit or silent mode by security products where they simply log that a match occurred but do not perform the action. Default value is false.Boolean
MicrosoftATP.Indicators.severityAn integer representing the severity of the malicious behavior identified by the data within the indicator. Possible values: "Informational", "Low", "MediumLow", "MediumHigh", and "High", where High is the most severe and Informational is not severe at all.Number
MicrosoftATP.Indicators.targetProductA string representing a single security product to which the indicator should be applied.String
MicrosoftATP.Indicators.threatTypeEach indicator must have a valid Indicator Threat Type. Possible values: "Botnet", "C2", "CryptoMining", "Darknet", "DDoS", "MaliciousUrl", "Malware", "Phishing", "Proxy", "PUA", and "WatchList".String
MicrosoftATP.Indicators.tlpLevelTraffic Light Protocol value for the indicator. Possible values: "unknown", "white", "green", "amber", and "red".String
MicrosoftATP.Indicators.urlUniform Resource Locator. This URL complies with RFC 1738.String
MicrosoftATP.Indicators.userAgentUser-Agent string from a web request that could indicate compromise.String
MicrosoftATP.Indicators.vendorInformationInformation about the vendor.String
File.NameThe full file name (including file extension).String
File.SizeThe size of the file in bytes.Number
File.MD5The MD5 hash of the file.String
File.SHA1The SHA1 hash of the file.String
File.SHA256The SHA256 hash of the file.String
File.SHA512The SHA512 hash of the file.String
File.TypeThe file type, as determined by libmagic (same as displayed in file entries).String
File.PathThe path where the file is located.String
CrowdStrike.IOC.TypeThe type of the IOC.string
CrowdStrike.IOC.ValueThe string representation of the indicator.string
CrowdStrike.IOC.IDThe full ID of the indicator (type:value).string
CrowdStrike.IOC.PolicyThe policy of the indicator.string
CrowdStrike.IOC.SourceThe source of the IOC.string
CrowdStrike.IOC.ShareLevelThe level at which the indicator will be shared.string
CrowdStrike.IOC.ExpirationThe datetime the indicator will expire.string
CrowdStrike.IOC.DescriptionThe description of the IOC.string
CrowdStrike.IOC.CreatedTimeThe datetime the IOC was created.string
CrowdStrike.IOC.CreatedByThe identity of the user/process who created the IOC.string
CrowdStrike.IOC.ModifiedTimeThe date and time the indicator was last modified.string
CrowdStrike.IOC.ModifiedByThe identity of the user/process who last updated the IOC.string

Script Examples#

Example command#

!CreateHashIndicatorWrapper action=block hash=9310daf6d10f4fbfaf390e74bcf1c4d9acc023d7db3e26030f8772528572a22a

Context Example#

{
"PaloAltoNetworksXDR": {
"blackList": {
"fileHash": [
"9310daf6d10f4fbfaf390e74bcf1c4d9acc023d7db3e26030f8772528572a22a"
]
}
},
"CrowdStrike": {
"IOC": [
{
"Description": "Blacklisted based on XSOAR inc ab57e22c-ad03-4aba-8b6c-b42bd895a116",
"ModifiedTime": "2022-03-27T09:58:22.418527196Z",
"Platforms": [
"linux",
"mac",
"windows"
],
"Value": "73c8c51f9084ec745ddb86c9f1a8da3281b6cf5276300e3df0e32ae44b76f63f",
"CreatedTime": "2022-03-09T09:58:04.151795968Z",
"ModifiedBy": "2bf188d347e44e08946f2e61ef590c24",
"CreatedBy": "2bf188d347e44e08946f2e61ef590c24",
"Action": "prevent",
"Type": "sha256",
"ID": "aa6ab986d7a9bf41d96e0140f373e2806d2d2b8a389eeff160d02d88b4229586",
"Severity": "high"
},
{
"Description": "Blacklisted based on XSOAR inc ab57e22c-ad03-4aba-8b6c-b42bd895a116",
"ModifiedTime": "2022-03-27T09:58:22.83074978Z",
"Platforms": [
"linux",
"mac",
"windows"
],
"Value": "006a103a9f4b9b6273d55b16ba01a704ad3e4fad59f198a77e8b64177a1064ef",
"CreatedTime": "2022-03-09T09:58:03.608685951Z",
"ModifiedBy": "2bf188d347e44e08946f2e61ef590c24",
"CreatedBy": "2bf188d347e44e08946f2e61ef590c24",
"Action": "prevent",
"Type": "sha256",
"ID": "5e6bf43f5de8b64e3d6f37177171d7edceed67d6bcac06a953c3d369151f6f39",
"Severity": "high"
},
{
"Description": "Blacklisted based on XSOAR inc ab57e22c-ad03-4aba-8b6c-b42bd895a116",
"ModifiedTime": "2022-03-27T10:00:24.023778625Z",
"Platforms": [
"linux",
"mac",
"windows"
],
"Value": "9310daf6d10f4fbfaf390e74bcf1c4d9acc023d7db3e26030f8772528572a22a",
"CreatedTime": "2022-03-27T10:00:24.023778625Z",
"ModifiedBy": "2bf188d347e44e08946f2e61ef590c24",
"CreatedBy": "2bf188d347e44e08946f2e61ef590c24",
"Action": "prevent",
"Type": "sha256",
"ID": "aaad9ddaf078c49f1d728fb0082a85efa6a9f413106ecca87f5dbdf33626178a",
"Severity": "high"
}
]
},
"DBotScore": [
{
"Vendor": "Microsoft Defender Advanced Threat Protection",
"Indicator": "006a103a9f4b9b6273d55b16ba01a704ad3e4fad59f198a77e8b64177a1064ef",
"Score": 0,
"Type": "file"
},
{
"Vendor": "Microsoft Defender Advanced Threat Protection",
"Indicator": "73c8c51f9084ec745ddb86c9f1a8da3281b6cf5276300e3df0e32ae44b76f63f",
"Score": 0,
"Type": "file"
},
{
"Vendor": "Microsoft Defender Advanced Threat Protection",
"Indicator": "9310daf6d10f4fbfaf390e74bcf1c4d9acc023d7db3e26030f8772528572a22a",
"Score": 0,
"Type": "file"
}
],
"File": [
{
"SHA256": "006a103a9f4b9b6273d55b16ba01a704ad3e4fad59f198a77e8b64177a1064ef"
},
{
"SHA256": "73c8c51f9084ec745ddb86c9f1a8da3281b6cf5276300e3df0e32ae44b76f63f"
},
{
"SHA256": "9310daf6d10f4fbfaf390e74bcf1c4d9acc023d7db3e26030f8772528572a22a"
}
],
"MicrosoftATP": {
"Indicators": [
{
"mitreTechniques": [],
"description": "XSOAR - related incident ab57e22c-ad03-4aba-8b6c-b42bd895a116",
"historicalDetection": false,
"title": "XSOAR - related incident ab57e22c-ad03-4aba-8b6c-b42bd895a116",
"creationTimeDateTimeUtc": "2022-03-27T09:58:21.8200142Z",
"generateAlert": true,
"rbacGroupIds": [],
"@^^^odata.context^^^": "https://api.securitycenter.microsoft.com/api/$metadata#Indicators/$entity",
"createdBySource": "PublicApi",
"rbacGroupNames": [],
"indicatorValue": "006a103a9f4b9b6273d55b16ba01a704ad3e4fad59f198a77e8b64177a1064ef",
"indicatorType": "FileSha256",
"createdBy": "2f48b784-5da5-4e61-9957-012d2630f1e4",
"lastUpdateTime": "2022-03-27T09:58:21.8292459Z",
"action": "BlockAndRemediate",
"expirationTime": "2022-04-10T09:58:21Z",
"id": "5299",
"createdByDisplayName": "MS Graph ATP DEV",
"severity": "Informational"
},
{
"mitreTechniques": [],
"description": "XSOAR - related incident ab57e22c-ad03-4aba-8b6c-b42bd895a116",
"historicalDetection": false,
"title": "XSOAR - related incident ab57e22c-ad03-4aba-8b6c-b42bd895a116",
"creationTimeDateTimeUtc": "2022-03-27T09:58:22.071616Z",
"generateAlert": true,
"rbacGroupIds": [],
"@^^^odata.context^^^": "https://api.securitycenter.microsoft.com/api/$metadata#Indicators/$entity",
"createdBySource": "PublicApi",
"rbacGroupNames": [],
"indicatorValue": "73c8c51f9084ec745ddb86c9f1a8da3281b6cf5276300e3df0e32ae44b76f63f",
"indicatorType": "FileSha256",
"createdBy": "2f48b784-5da5-4e61-9957-012d2630f1e4",
"lastUpdateTime": "2022-03-27T09:58:22.079299Z",
"action": "BlockAndRemediate",
"expirationTime": "2022-04-10T09:58:21Z",
"id": "5300",
"createdByDisplayName": "MS Graph ATP DEV",
"severity": "Informational"
},
{
"mitreTechniques": [],
"description": "XSOAR - related incident ab57e22c-ad03-4aba-8b6c-b42bd895a116",
"historicalDetection": false,
"title": "XSOAR - related incident ab57e22c-ad03-4aba-8b6c-b42bd895a116",
"creationTimeDateTimeUtc": "2022-03-27T10:00:23.6840683Z",
"generateAlert": true,
"rbacGroupIds": [],
"@^^^odata.context^^^": "https://api.securitycenter.microsoft.com/api/$metadata#Indicators/$entity",
"createdBySource": "PublicApi",
"rbacGroupNames": [],
"indicatorValue": "9310daf6d10f4fbfaf390e74bcf1c4d9acc023d7db3e26030f8772528572a22a",
"indicatorType": "FileSha256",
"createdBy": "2f48b784-5da5-4e61-9957-012d2630f1e4",
"lastUpdateTime": "2022-03-27T10:00:23.6924233Z",
"action": "BlockAndRemediate",
"expirationTime": "2022-04-10T10:00:23Z",
"id": "5301",
"createdByDisplayName": "MS Graph ATP DEV",
"severity": "Informational"
}
]
}
}

Human Readable Output#

Results Summary#

InstanceCommandResultComment
Cortex XDR - IR: Cortex XDR - IR_instance_1_copycommand: xdr-blacklist-files
args:
hash_list: 9310daf6d10f4fbfaf390e74bcf1c4d9acc023d7db3e26030f8772528572a22a
Success
Cortex XDR - IR: Cortex XDR - IR_instance_1command: xdr-blacklist-files
args:
hash_list: 9310daf6d10f4fbfaf390e74bcf1c4d9acc023d7db3e26030f8772528572a22a
Success
Microsoft Defender Advanced Threat Protection: Microsoft Defender Advanced Threat Protection_instance_1command: microsoft-atp-sc-indicator-create
args:
indicator_value: 9310daf6d10f4fbfaf390e74bcf1c4d9acc023d7db3e26030f8772528572a22a
indicator_type: FileSha256
action: AlertAndBlock
indicator_description: XSOAR - related incident ab57e22c-ad03-4aba-8b6c-b42bd895a116
indicator_title: XSOAR - related incident ab57e22c-ad03-4aba-8b6c-b42bd895a116
Success
CrowdstrikeFalcon: CrowdstrikeFalcon_instance_1command: cs-falcon-upload-custom-ioc
args:
ioc_type: sha256
platforms: linux,mac,windows
applied_globally: true
value: 9310daf6d10f4fbfaf390e74bcf1c4d9acc023d7db3e26030f8772528572a22a
action: prevent
description: Blacklisted based on XSOAR inc ab57e22c-ad03-4aba-8b6c-b42bd895a116
severity: high
Success

Blacklist Files#

File Hash
9310daf6d10f4fbfaf390e74bcf1c4d9acc023d7db3e26030f8772528572a22a

Indicator 9310daf6d10f4fbfaf390e74bcf1c4d9acc023d7db3e26030f8772528572a22a was updated successfully.#

idactionindicatorValueindicatorTypeseveritytitledescription
5301BlockAndRemediate9310daf6d10f4fbfaf390e74bcf1c4d9acc023d7db3e26030f8772528572a22aFileSha256InformationalXSOAR - related incident ab57e22c-ad03-4aba-8b6c-b42bd895a116XSOAR - related incident ab57e22c-ad03-4aba-8b6c-b42bd895a116

Custom IOC 9310daf6d10f4fbfaf390e74bcf1c4d9acc023d7db3e26030f8772528572a22a was created successfully#

ActionCreatedByCreatedTimeDescriptionIDModifiedByModifiedTimePlatformsSeverityTypeValue
prevent2bf188d347e44e08946f2e61ef590c242022-03-27T10:00:24.023778625ZBlacklisted based on XSOAR inc ab57e22c-ad03-4aba-8b6c-b42bd895a116aaad9ddaf078c49f1d728fb0082a85efa6a9f413106ecca87f5dbdf33626178a2bf188d347e44e08946f2e61ef590c242022-03-27T10:00:24.023778625Zlinux,
mac,
windows
highsha2569310daf6d10f4fbfaf390e74bcf1c4d9acc023d7db3e26030f8772528572a22a