Skip to main content
Skip table of contents

Encrypt File with Password Protection

LAST UPDATED: JUN 14, 2024

Applies password protection to files exported from the D3 platform, ensuring the security of sensitive information. This process generates a ZIP file that contains the protected content. Users can decrypt and access the file with standard ZIP software by entering the designated password.

READER NOTE

  • This command is applicable to vSOC version 16.8 and above. If you are using a lower version, you may be unable to access this command. Contact D3 to obtain access.

  • Ensure that appropriate software is installed to decrypt and extract the file.

Implementation

Python

Command Category

System Utility

Tags

FILE ENCRYPTION

Inputs

Parameter Name

Required/Optional

Description

Sample Data

File Id

Required

The unique identifier of the file to be encrypted.

*****

File Source

Required

The origin of the file, which can be a Playbook File, Artifact File, or Incident Attachment File.

Playbook File

Password

Required

The password to be applied for encrypting the file.

*****

Output

Return Data

The returned result of this command. If some required parameters are not defined, this returned data could be empty. The returned result can be passed down directly to a subsequent command in playbooks.

SAMPLE DATA

JSON
{
    "Status": "Successful",
    "Data": {
        "fileId": "*****",
        "fileName": "189_2403251645070000---test-100M (1).zip",
        "md5": "*****",
        "sha1": "*****",
        "sha256": "*****"
    }
}

Remote Command API

The D3 command API allows you to send requests to D3 SOAR to execute this utility command via REST API.

Request

POST

CODE
https://{base_url}/{api_namespace}/api/Command/EncryptFilewithPasswordProtection

Headers

Please refer to the page Webhook Configuration Guide - Authentication Method: API Keys for more details.

Request Body

JSON
{
  "Username": <Username here>,
  "Site": <Site here>,
  "CommandParams": {
    "File Id": <File Id here>,
    "File Source": <File Source here>,
    "Password": <Password here>
  }
}

Body Parameters

Parameter Name

Type

Required/Optional

Description

Username

string

Required

The username of your D3 SOAR account.

Site

string

Required

The D3 SOAR site to run the remote command.

File Id

string

Required

The unique identifier of the file to be encrypted.

File Source

string

Required

The origin of the file, which can be a Playbook File, Artifact File, or Incident Attachment File.

Password

string

Required

The password to be applied for encrypting the file.

Sample Request

SAMPLE DATA

JSON
{
  "Username": "Admin",
  "Site": "Security Operations",
  "CommandParams": {
    "File Id": *****,
    "File Source": "Playbook File",
    "Password": "*****"
  }
}

Response

Response Fields

Field Name

Type

Description

error

string

The error message if the API request has failed.

returnData

string

The return data from the API request.

Sample Response

JSON
{
    "error": "",
    "returnData": {
      "Status": "Successful",
      "Data": {
        "fileId": "*****",
        "fileName": "189_2403251645070000---test-100M (1).zip",
        "md5": "*****",
        "sha1": "*****",
        "sha256": "*****"
      }
  }
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.