Create policy

Create a device policy in a tenant.

Endpoint

Parameter Value

Service endpoint

/policies/v2

Optional query string parameters

—

Example

https://protectapi.cylance.com/policies/v2

Method

HTTP/1.1 POST

Request headers

  • Content-Type: application/json
  • Authorization: Bearer jwt_token with the policy:create scope encoded.

Request

This example creates a policy with most features enabled and includes some sample exclusions.

Note:

This example is for API testing only. Do not use this example policy on your devices. Always test a device policy before applying it to devices in your organization.

JSON
{
    "policy_name": "testPolicy",
    "script_control": {
      "activescript_settings": {
        "control_mode": "Alert",
        "control_mode_v2":"BlockAbnormal"
      },
      "global_settings": {
        "allowed_folders": ["/path.py"],
        "allowed_folders_ext": [
          {
            "comment": "any test 200 chars long"
          }
        ],
        "control_mode": "Alert",
        "score_all_scripts": false,
        "upload_script_to_cloud": false,
        "must_obtain_score_from_cloud": false,
        "alert_suspicious_script_exec_only": false
      },
      "macro_settings": {
        "control_mode": "Alert"
      },
      "powershell_settings": {
        "control_mode": "Block",
        "console_mode": "Block",
        "control_mode_v2":"BlockAbnormal"
      }              
}

Response

For more information, see Response status codes.

Request JSON schema

Field Name Description

checksum

Mandatory field with an empty value. For example:

JSON
"checksum": ""

device_control

Allows or blocks access to USB mass storage devices. Must be enabled under policy.

All device_class entries must be included in the request.

  • AndroidUSB: Portable device running Android OS, such as a smartphone or tablet.

    An Android device could connect and be identified as Android, Still Image, or Windows Portable Device. If you want to block Android devices, consider blocking Still Image and Windows Portable Devices as well.

  • iOS: Apple portable device running iOS, such as an iPhone or iPad.

    iOS devices will not charge when Device Control is enabled and set to Block, unless the Apple device is powered off. Apple includes their charging capability within functions of the device that are required for our iOS device blocking capability. Non-Apple devices do not bundle their charging capability in this manner and are not impacted.

  • StillImage: Device class containing scanners, digital cameras, multi-mode video cameras with frame capture, and frame grabbers.
  • USBCDDVDRW: USB optical drive.
  • USBDrive: USB hard drive or USB flash drive.
  • VMWareMount: VMware USB Passthrough, which allows a VMware virtual machine client to access USB devices connected to the host.
  • WPD: Windows Portable Device, which uses the Microsoft Windows Portable Device driver technology, such as cell phones, digital cameras, and portable media players.

Device control exclusion list allows or blocks access to specific USB mass storage devices.

  • comment: Optional field to adds details about the exclusion.
  • control_mode: Allows or blocks the specific USB mass storage device.
    • Block: Prevents the USB mass storage device from connecting to the endpoint.
    • FullAccess: Allows the USB mass storage device to connect to the endpoint.
  • product_id: Product identifier for the USB mass storage device. Optional.
  • serial_number: Serial number for the USB mass storage device. Optional.
  • vendor_id: Vendor identifier for the USB mass storage device. Required.

To find the vendor ID for a USB mass storage device, enable Device Control settings in a device policy, assign that policy to a device, and then attach the USB mass storage device to the device. You can view external device logs in the Aurora Endpoint Security console, on the Protection page or External Devices tab of the Device Details page.

Example:

JSON
"exclusion_list": [
    {
        "vendor_id": "1234",
        "comment": "Test device control exclusion",
        "serial_number": 987654321,
        "product_id": "5678",
        "control_mode": "FullAccess"
    }
]

file_exclusions

Adds file exclusions to the policy safe list, under file actions. Policy safe list exclusions are specific to the policy, and any endpoints assigned to the policy allow the excluded files to run.

  • category_id: List of categories to identify the type of file. Optional.
    • 1 - None
    • 2 - AdminTool
    • 3 - InternalApplication
    • 4 - CommercialSoftware
    • 5 - OperatingSystem
    • 6 - Drivers
    • 7 - SecuritySoftware
  • file_hash: SHA256 hash for the file. Required.
  • file_name: Name of the file being excluded. Optional.
  • md5: MD5 hash for the file. Optional.
  • reason: Reason the file was excluded. Required.

Example:

JSON
"exclusion_list": [
    {
        "reason": "Test Exclusion",
        "category_id": "2",
        "md5": "d41d8cd98f00b204e9800998ecf8427e",
        "file_hash": "bf17366ee3bb8068a9ad70fc9e68
                    496e7e311a055bf4ffeeff53cc5d29ccce52",
        "file_name": "filename"
    }
]

filetype_actions

Controls autoquarantine of unsafe and abnormal files.

  • actions: Sets auto-quarantine and auto-upload behavior.
    • 0: auto-quarantine OFF, auto-upload OFF
    • 1: auto-quarantine ON, auto-upload OFF
    • 2: auto-quarantine OFF, auto-upload OFF

    • Use for suspicious_files when threat_files is set to 3 and Auto-Quarantine for suspicious_files is disabled.
    • 3: auto-quarantine ON, auto-upload ON
  • file_type: The only option is "executable".
  • suspicious_files: Abnormal files
  • threat_files: Unsafe files

logpolicy

Agent log file settings.

  • log_upload: Enables or disables uploading agent log files.
    • null: Disabled
    • 1: Enabled
  • maxlogsize: Maximum file size (in MB) for a single agent log file.
  • retentiondays: Number of days to retain agent log files. Log files older than the set number of days are deleted.

memoryviolation

_actions

Memory protection violation types. These 3 rows explain the possible violation types.

memory_violations

  • lsassread (LSASS read): Memory belonging to the Windows Local Security Authority process has been accessed in a manner that indicates an attempt to obtain users' passwords.
  • outofprocessallocation (remote allocation of memory): A process has allocated memory in another process. Most allocations will only occur within the same process. This generally indicates an attempt to inject code or data into another process, which may be a first step in reinforcing a malicious presence on a system.
  • outofprocessapc (remote APC scheduled): A process has diverted the execution of another process's thread. This is generally used by an attacker to activate a malicious presence that has been injected into another process.
  • outofprocesscreatethread (remote thread creation): A process has created a new thread in another process. A process's threads are usually only created by that same process. This is generally used by an attacker to activate a malicious presence that has been injected into another process.
  • outofprocessmap (remote mapping of memory): A process has introduced code and/or data into another process. This may indicate an attempt to begin executing code in another process and thereby reinforce a malicious presence.
  • outofprocessoverwritecode (remote overwrite code): A process has modified executable memory in another process. Under normal conditions, executable memory will not be modified, especially by another process. This usually indicates an attempt to divert execution in another process.
  • outofprocessunmapmemory (remote unmap of memory): A process has removed a Windows executable from the memory of another process. This may indicate an intent to replace the executable image with a modified copy for the purpose of diverting execution.
  • outofprocesswrite (remote write to memory): A process has modified memory in another process. This is usually an attempt to store code or data in previously allocated memory (see OutOfProcessAllocation), but it is possible that an attacker is trying to overwrite existing memory in order to divert execution for a malicious purpose.
  • outofprocesswritepe (remote write PE to memory): A process has modified memory in another process to contain an executable image. Generally, this indicates that an attacker is attempting to execute code without first writing that code to disk.
  • overwritecode (overwrite code): The code residing in a process's memory has been modified using a technique that may indicate an attempt to bypass Data Execution Prevention (DEP).
  • stackpivot (stack pivot): The stack for a thread has been replaced with a different stack. Generally, the system will only allocate a single stack for a thread. An attacker would use a different stack to control execution in a way that is not blocked by Data Execution Prevention (DEP).
  • stackprotect (stack protect): The memory protection of a thread's stack has been modified to enable execution permission. Stack memory should not be executable, so usually this means that an attacker is preparing to run malicious code stored in stack memory as part of an exploit, an attempt which would otherwise be blocked by Data Execution Prevention (DEP).

memory_violations

_ext

  • dyldinjection (DYLD injections): An environment variable has been set that will cause a shared library to be injected into a launched process. Attacks can modify the plist of applications like Safari or replace applications with bash scripts, causing their modules to be loaded automatically when an application starts.
  • maliciouspayload (malicious payload): A generic shellcode and payload detection associated with exploitation has been detected.
  • trackdataread (RAM scraping): A process is trying to read valid magnetic stripe track data from another process. Typically related to point of sale systems (POS).
  • zeroallocate (zero allocate): A null page has been allocated. The memory region is typically reserved, but in certain circumstances, it can be allocated. Attacks can use this to setup privilege escalation by taking advantage of some known null de-reference exploit, typically in the kernel.

memory_violations

_ext_v2

  • childprocessprotect (Memory Permission Changes in Child Processes) - Windows only: A violating process has spawned a child process and has modified memory access permissions in that child process.
  • dangerouscomobject (Dangerous COM Object) - Windows only: Malicious code that has a reference to a Component Object Model (COM) object has been detected.
  • dangerouseenvvariable (Dangerous Environment Variable) - Windows only: An environment variable that may have malicious code attached has been detected.
  • directsyscall (Direct System Calls) - Windows only: An attempt to silently inject malicious code into other processes has been detected. This violation type cannot be blocked.
  • doppelganger (Doppelganger): A new (malicious) process was started from a file that has not yet been written to the file system. The file writer transaction is usually rolled back after the process start (so the malicious file is never committed to disk), and any attempt to scan the file on disk will only see the unmodified benign file.
  • maliciouslowintegrity (Low Integrity Process Start) - Windows only: A process has been set to run with a low integrity level.
  • oopprotect (Memory Permission Changes in Other Processes) - Windows only: A violating process has modified memory access permissions within another process. This is usually done to inject code into another process to make memory executable by modifying memory access permissions. There are few legitimate uses of this.
  • stolensystemtoken (Stolen System Token) - Windows only: An access token has been modified to allow a user to bypass security access controls.
  • syscallprobe (System Call Monitoring) - Windows only: A system call made to an application or operating system has been detected.
  • systemdllwrite (System DLL Overwrite) - Windows only: An attempt to overwrite a system DLL has been detected.

memory_exclusion

_list_v2

Executable files to exclude from Memory Protection. Must be a relative path to the excluded executable file.

Example:
JSON
"memory_exclusions_list_v2": [
    {
        "violations": [],
        "path": "C:\\temp\\file1.txt"
    },
    {
        "violations": [],
        "path": "C:\\temp\\file2.txt"
    }
]

policy

Various policy settings are contained within this section. Some policy settings are enabled under policy and configured in a different section, like device_control and logpolicy. For most policy settings, the possible values are either 0 (disabled) or 1 (enabled). The remaining cells in this table explain policy settings in detail.

Automatic policy settings

  • auto_blocking: Auto-quarantines unsafe threats when enabled.
  • auto_delete: Automatically deletes quarantined files after a set number of days when enabled. If this feature is enabled, set "days_until_deleted" for the number of days to retain a quarantined file.
  • auto_uploading: Automatically uploads files that Arctic Wolf has not seen before. Arctic Wolf performs an analysis on the file and provides details to assist in manual analysis and triage.
  • pdf_auto_uploading: Automatically uploads PDF files that Arctic Wolf has not seen before.
  • powershell_auto_uploading: Automatically uploads PowerShell files that Arctic Wolf has not seen before.
  • python_auto_uploading: Automatically uploads Python files that Arctic Wolf has not seen before.

Various policy settings

  • days_until_deleted: Number of days to retain a quarantined file. Quarantined files older than the set number of days are automatically deleted. The minimum number of days is 14, the maximum number of days is 365. The "auto-delete" setting must be enabled.
  • device_control: Enables or disables the device control feature.
  • full_disc_scan: Causes Endpoint Defense to analyze all executable files on disk to detect dormant threats. This is the background threat detection setting.
    • 0: Disabled
    • 1: Run Recurring (performs a scan every nine days)
    • 2: Run Once (runs a full disk scan upon installation only)
  • kill_running_threats: Kills processes and child processes regardless of state when a threat is detected (EXE or DLL).
  • logpolicy: This setting is not used.
  • memory_exploit_detection: Enables or disables the memory protection feature. Affects "memory_violation_actions" ("memory_violations" and "memory_violations_ext").
  • sample_copy_path: Copies all file samples to a network share (CIFS/SMB). For example:
    JSON
    {
        "name": "sample_copy_path",
        "value": "\\\\server_name\\shared_folder"
    }
  • scan_exception_list: Excludes specific folders and subfolders from scanning by full_disc_scan and watch_for_new_files. Set the value to the absolute path for the excluded files. For example:

    JSON
    {
        "name": "scan_exception_list",
        "value": [
            "c:\\temp"
        ]
    }
  • scan_max_archive_size: Sets the maximum archive file size (in MB) to scan. The value can be 0 to 150. If set to 0, archive files are not scanned. For example:

    JSON
    {
        "name": "scan_max_archive_size",
        "value": "0"
    }
  • script_control: Enables or disables the script control feature. Also set the script_control settings (see below in this table).

Various policy settings continued

  • show_notifications: Enables or disables desktop notifications on the endpoint for Aurora Protect Desktop events.
  • threat_report_limit: Number of threats to upload to the console.

    Example:

    JSON
    {
        "name": "threat_report_limit",
        "value": "500"
    }
  • trust_files_in_scan_exception_list: Allows execution of files in the excluded folders. Related to the scan_exception_list.
  • watch_for_new_files: Analyzes new or modified executable files for threats.
  • prevent_service_shutdown: Protects the Aurora Endpoint Security service from being shut down, either manually or by another process.
  • sample_copy_path: Copies all file samples to a network share (CIFS/SMB).

    Example:

    JSON
    {
        "name": "sample_copy_path",
        "value": "\\\\server_name\\shared_folder"
    }

Optics policy settings

  • optics: Enables or disables Aurora Focus.
  • optics_application_control_auto_upload: Allows automatic uploading of application control related focus data.
  • optics_malware_auto_upload: Allows automatic uploading of threat related focus data.
  • optics_memory_defense_auto_upload: Allows automatic uploading of memory protection related focus data.
  • optics_script_control_auto_upload: Allows automatic uploading of script control related focus data.
  • optics_sensors_advanced_executable_parsing: Enables recording data fields associated with portable executable (PE) files, such as file version, import functions, and packer types. This is enhanced portable executable parsing in the policy settings.
  • optics_sensors_advanced_powershell_visibility: Enables recording commands, arguments, scripts, and content entered directly into the Powershell Console and the Powershell Integrated Scripting Environment (ISE).
  • optics_sensors_advanced_wmi_visibility: Enables recording additional Windows Management Instrumentation (WMI) attributes and parameters.
  • optics_sensors_dns_visibility: Enables recording commands and arguments of commands issued directly or indirectly to the Windows Management Instrumentation (WMI) interpreter.
  • optics_sensors_enhanced_file_read_visibility: Enables monitoring file reads within an identified set of directories.
  • optics_sensors_enhanced_process_hooking_visibility: Enables recording process information from the Win32 API and Kernel Audit messages to detect forms of process hooking and injection.
  • optics_sensors_private_network_address_visibility: Enables recording network connections within the RFC 1918 and RFC 3419 address spaces.
  • optics_sensors_windows_event_log_visibility: Enables recording Windows Security Events and their associated attributes.
  • optics_set_disk_usage_maximum_fixed: Sets the maximum amount of device storage reserved for use by Aurora Focus, in MB. The minimum value is 500 and the maximum value is 1000.
    Example:
    JSON
    {
        "name": "optics_set_disk_usage_maximum_fixed",
        "value": "1000"
    }
  • optics_show_notifications: Enables or disables desktop notifications on the endpoint for Aurora Focus events.
  • optics_show_notification: Enables or disables Aurora Focus desktop notifications on the device.

Aurora Adaptive Threat Protection policy settings

Note:

This field is only present when the Aurora Adaptive Threat Protection device policy setting is enabled.

Lists the Aurora Adaptive Threat Protection device policy settings. Sub-fields include:

  • full_bypass_enabled: True indicates that full bypass mode is enabled, False indicates that full bypass mode is disabled.
  • ransomware: 1 indicates that Aurora Adaptive Threat Protection is enabled, 0 indicates that Aurora Adaptive Threat Protection is disabled.
  • uninstall_enabled: True indicates that manual uninstallation of the Aurora Endpoint agent is enabled, False indicates that manual uninstallation is disabled.

policy_name

Name of the policy. Must be unique to your tenant.

script_control

Policy settings for script control. script_control must be enabled (set to "1") under policy.

activescript_settings

  • control_mode: Setting for active script.
    • Alert: The script is allowed to run and an alert is sent when an event occurs.
    • Block: The script is blocked and an alert is sent.
  • control_mode_v2:
    • Allow: The script is allowed to run.
    • Alert: The script is allowed to run and an alert is sent when an event occurs.
    • Block: The script is blocked and an alert is sent.
    • Block UNSAFE: The script is scored and blocked if found to be unsafe.
    • Block ABNORMAL and UNSAFE: The script is scored and blocked if found to be abnormal or unsafe.

global_settings

  • allowed_folders: Relative path to scripts that are allowed to run when script control is enabled. Script control folder exclusions apply to all agent versions (agent 1310 or later). For example:

    JSON
    "allowed_folders": [
        "\\temp_scriptcontrol"
    ]
  • control_mode: Enables or disables script control for agent version 1370 or earlier. Works for active scripts and PowerShell, but not macros. To use script control with macros, use agent version 1380 or later.
    • Allow: An alert is sent when an active script or PowerShell event occurs. The script is allowed to run.
    • Block: The active script or PowerShell is blocked and an alert is sent.
  • score_all_scripts: Boolean. Controls whether all scripts are scored, including scripts with the control_mode_v2 setting set to Alert or Block. Scripts with the setting set to Block UNSAFE or Block ABNORMAL and UNSAFE are scored automatically and this setting is ignored.
  • upload_script_to_cloud: Boolean. Controls whether all scripts are uploaded to BlackBerry services when attempting to obtain the score of a script. If set to "false", Infinity is searched to see if it already has the score. If it does not, the script is not uploaded for scanning and is assigned "UNSCORED".
  • must_obtain_score_from_cloud: Boolean. Forces a score to be obtained from Infinity before deciding what to do with a script execution. When a cached result is used, this setting is ignored.
    • True: When a score can't be obtained from Infinity and control_mode_v2 = Block, Block UNSAFE, or Block ABNORMAL and UNSAFE, the state is set to "UNSCORED" and "Block".
    • False: When a score can't be obtained from Infinity, the state is combined with local classifiers and follows the control_mode_v2 setting. If the local classifier is not available, the score is set to "UNSCORED".
  • alert_suspicious_script_exec_only: Boolean. Generates events only for scripts that are suspicious or were not evaluated.
macro_settings
  • control_mode: Setting for Microsoft Office macros.
    • Alert: An alert is sent when an Microsoft Office macro event occurs. The macro is allowed to run.
    • Block: The Microsoft Office macro is blocked and an alert is sent.
    Note: The script control macros feature works with agent version 1578 and earlier. For newer agents, use the Dangerous VBA Macros violation type with memory protection. Any macro exclusions created for script control of newer agents must be added to the memory protection exclusions for the Dangerous VBA Macros violation type.
powershell_settings
  • console_mode: Blocks the PowerShell console to prevent PowerShell command usage, including one-liners. To use this feature, the PowerShell control_mode must be set to Block. Values can be either Allow or Block.
  • control_mode:
    • Alert: The script is allowed to run and an alert is sent when an event occurs.
    • Block: The script is blocked and an alert is sent.
  • control_mode_v2:
    • Allow: The script is allowed to run.
    • Alert: The script is allowed to run and an alert is sent when an event occurs.
    • Block: The script is blocked and an alert is sent.
    • Block UNSAFE: The script is scored and blocked if found to be unsafe.
    • Block ABNORMAL and UNSAFE: The script is scored and blocked if found to be abnormal or unsafe.

script_control continued

About disabling script control

For Agent versions 1430 and later, you can disable script control for active script, PowerShell, or macros. Disabling script control allows the selected script type to run and does not send an alert to the console.

To disable script control for a specific script type, do not include the script type in the create policy API request. For example: script control for macros is disabled.

JSON
"script_control": {
    "global_settings": {
        "allowed_folders": null,
        "control_mode": "Alert",
        "score_all_scripts": false,
        "upload_script_to_cloud":true,
        "must_obtain_score_from_cloud":true,
        "alert_suspicious_script_exec_only": false
    },
    "activescript_settings": {
        "control_mode": "Alert"
        "control_mode_v2":"Block UNSAFE"
    },
    "powershell_settings": {
        "control_mode": "Alert",
        "console_mode": "Allow"
        "control_mode_v2":"Block UNSAFE"
    }              
}

user_id

Unique ID for the user creating the policy. Only administrators can create policies.

To get the user_id, use Get users.

Response JSON schema

Field Name Description

policy_id

Unique identifier for the policy.

policy_utctimestamp

Date and time (in UTC) when the policy was created.

match_rules_exclusions

Note:

This field is only present when the Aurora Adaptive Threat Protection device policy setting is enabled.

Lists exclusions to the Aurora Adaptive Threat Protection device policy settings. Sub-fields include:

  • InitiatorPath: Process path exclusions. Each object contains the excluded filepath.
  • KernelModule: Vulnerable driver path exclusions. Each object contains the SHA256 hash of the excluded file and the excluded filepath.
  • ProcessCommandLine: Command line exclusions. Each object contains the excluded command line string and excluded filepath.
  • ScriptFile: Script exclusions. Each object contains the excluded filepath.

ransomware

Note:

This field is only present when the Aurora Adaptive Threat Protection device policy setting is enabled.

Lists other Aurora Adaptive Threat Protection device policy settings. Sub-fields include:

  • defender_management_enabled: True indicates that the Windows Defender integration is enabled, False indicates that the Windows Defender integration is disabled.
  • enforcement_level: FullEnforcement indicates that full enforcement mode is enabled, VisibilityOnly indicates that visibility only mode is enabled.
  • toast_notification_enabled: True indicates that desktop notifications are enabled for Aurora Adaptive Threat Protection alerts, False indicates that desktop notifications are disabled for Aurora Adaptive Threat Protection alerts.