Skip to main content

RemoveFileWrapper

This Script is part of the Malware Core Pack.#

Supported versions

Supported Cortex XSOAR versions: 6.0.0 and later.

This script is a wrapper for Cortex XDR and CrowdStrike to remove files in given path.

Script Data#


NameDescription
Script Typepython3
Tagsbasescript
Cortex XSOAR Version6.0.0

Inputs#


Argument NameDescription
device_idsList of device IDs.
file_pathThe file path of the file.

Outputs#


PathDescriptionType
PaloAltoNetworksXDR.ScriptRun.action_idThe ID of the initiated action.Number
PaloAltoNetworksXDR.ScriptRun.endpoints_countThe number of endpoints the action was initiated on.Number
CrowdStrike.Command.rm.HostIDThe host ID.String
CrowdStrike.Command.rm.ErrorThe error message raised if the command failed.String

Script Examples#

Example command#

!RemoveFileWrapper device_ids=0bde2c4645294245aca522971ccc44c4 file_path=/tmp/a.txt

Context Example#

{
"CrowdStrike": {
"Command": {
"rm": {
"HostID": "0bde2c4645294245aca522971ccc44c4",
"Error": "Success"
}
}
}
}

Human Readable Output#

Results Summary#

InstanceCommandResultComment
CrowdstrikeFalcon: CrowdstrikeFalcon_instance_1command: cs-falcon-rtr-remove-file
args:
host_ids: 0bde2c4645294245aca522971ccc44c4
file_path: /tmp/a.txt
os: Linux
Success
Cortex XDR - IR: Cortex XDR - IR_instance_1command: xdr-run-script-delete-file
args:
endpoint_ids: 0bde2c4645294245aca522971ccc44c4
file_path: /tmp/a.txt
ErrorError in API call [<XX_REPLACED>00] - Internal Server Error
{"reply": {"err_code": <XX_REPLACED>00, "err_msg": "An error occurred while processing XDR public API - No endpoint was found for creating the requested action", "err_extra": "can't create group action id for SCRIPT_EXECUTION"}}
Cortex XDR - IR: Cortex XDR - IR_instance_1_copycommand: xdr-run-script-delete-file
args:
endpoint_ids: 0bde2c4645294245aca522971ccc44c4
file_path: /tmp/a.txt
ErrorError in API call [<XX_REPLACED>00] - Internal Server Error
{"reply": {"err_code": <XX_REPLACED>00, "err_msg": "An error occurred while processing XDR public API - No endpoint was found for creating the requested action", "err_extra": "can't create group action id for SCRIPT_EXECUTION"}}

CrowdStrike Falcon rm over the file: /tmp/a.txt#

HostIDError
0bde2c4645294245aca522971ccc44c4Success