Update policy
Update an existing policy. The request contents for update policy are similar to create policy, except you must include the policy_id in the update policy request.
Service endpoint | /policies/v2 |
Optional query string parameters | — |
Example | https://protectapi.cylance.com/policies/v2 |
Method | HTTP/1.1 PUT |
Request headers |
|
Request
{ "user_id":"a2c0ac7a-a63d-4583-b646-ae10db9c9769", "policy":{ "memoryviolation_actions":{ "memory_violations_ext_v2":[ { "violation_type":"syscallprobe", "action":"Alert", "order":"1" }, { "action":"Alert", "order":"2", "violation_type":"directsyscall" }, { "order":"3", "violation_type":"systemdllwrite", "action":"Alert" }, { "order":"4", "action":"Alert", "violation_type":"dangerouscomobject" }, { "order":"5", "violation_type":"doppelganger", "action":"Alert" }, { "violation_type":"dangerousenvvariable", "action":"Alert", "order":"6" }, { "order":"7", "violation_type":"oopprotect", "action":"Alert" }, { "action":"Alert", "order":"8", "violation_type":"childprocessprotect" }, { "order":"9", "action":"Alert", "violation_type":"stolensystemtoken" }, { "order":"10", "violation_type":"maliciouslowintegrity", "action":"Alert" }, { "violation_type":"injectionviaapc", "action":"Alert", "order":"11" }, { "order":"12", "action":"Alert", "violation_type":"runmacroscript" } ], "memory_violations":[ { "violation_type":"lsassread", "action":"Alert" }, { "violation_type":"outofprocessunmapmemory", "action":"Alert" }, { "violation_type":"stackpivot", "action":"Alert" }, { "violation_type":"stackprotect", "action":"Alert" }, { "violation_type":"outofprocessoverwritecode", "action":"Alert" }, { "action":"Alert", "violation_type":"outofprocesscreatethread" }, { "violation_type":"overwritecode", "action":"Alert" }, { "action":"Alert", "violation_type":"outofprocesswritepe" }, { "violation_type":"outofprocessallocation", "action":"Alert" }, { "violation_type":"outofprocessmap", "action":"Alert" }, { "violation_type":"outofprocesswrite", "action":"Alert" }, { "action":"Alert", "violation_type":"outofprocessapc" } ], "memory_violations_ext":[ { "violation_type":"dyldinjection", "action":"Alert" }, { "violation_type":"trackdataread", "action":"Alert" }, { "action":"Alert", "violation_type":"zeroallocate" }, { "action":"Alert", "violation_type":"maliciouspayload" } ], "memory_exclusion_list_v2":[ { "violations":[ ], "path":"\\Application\\TestApp\\MyApp\\program.exe" } ], "memory_exclusion_list":[ "\\Application\\TestApp\\MyApp\\program.exe" ] }, "persona":{ "mitigation_actions":[ { "action":"alertsOnly", "threshold":"70" }, { "threshold":"30", "action":"promptUsernameAndPassword" } ], "admin_whitelist":[ { "username":"admin" } ], "mode":"1" }, "device_control":{ "configurations":[ { "device_class":"AndroidUSB", "control_mode":"FullAccess" }, { "control_mode":"FullAccess", "device_class":"iOS" }, { "control_mode":"FullAccess", "device_class":"StillImage" }, { "device_class":"USBCDDVDRW", "control_mode":"FullAccess" }, { "control_mode":"FullAccess", "device_class":"USBDrive" }, { "device_class":"VMWareMount", "control_mode":"FullAccess" }, { "control_mode":"FullAccess", "device_class":"WPD" } ], "exclusion_list":[ { "vendor_id":"1234", "comment":"Test external device", "serial_number":null, "product_id":"5678", "control_mode":"FullAccess", "date_added":"2022-02-01T23:56:32.479Z" } ] }, "policy":[ { "value":"1", "name":"auto_blocking" }, { "value":"1", "name":"auto_uploading" }, { "value":"500", "name":"threat_report_limit" }, { "name":"full_disc_scan", "value":"2" }, { "value":"1", "name":"watch_for_new_files" }, { "name":"memory_exploit_detection", "value":"1" }, { "value":"0", "name":"trust_files_in_scan_exception_list" }, { "value":"1", "name":"logpolicy" }, { "name":"script_control", "value":"1" }, { "name":"prevent_service_shutdown", "value":"1" }, { "value":"0", "name":"scan_max_archive_size" }, { "name":"sample_copy_path", "value":"\\\\server_name\\shared_folder" }, { "name":"kill_running_threats", "value":"1" }, { "name":"show_notifications", "value":"1" }, { "name":"optics_set_disk_usage_maximum_fixed", "value":"1000" }, { "value":"1", "name":"optics_malware_auto_upload" }, { "name":"optics_memory_defense_auto_upload", "value":"1" }, { "value":"0", "name":"optics_script_control_auto_upload" }, { "value":"0", "name":"optics_application_control_auto_upload" }, { "value":"1", "name":"optics_sensors_dns_visibility" }, { "name":"optics_sensors_private_network_address_visibility", "value":"1" }, { "value":"1", "name":"optics_sensors_windows_event_log_visibility" }, { "name":"optics_sensors_windows_advanced_audit_visibility", "value":"1" }, { "name":"optics_sensors_advanced_powershell_visibility", "value":"1" }, { "name":"optics_sensors_advanced_wmi_visibility", "value":"1" }, { "name":"optics_sensors_advanced_executable_parsing", "value":"1" }, { "name":"optics_sensors_enhanced_process_hooking_visibility", "value":"1" }, { "value":"1", "name":"optics_sensors_enhanced_file_read_visibility" }, { "value":"1", "name":"device_control" }, { "name":"optics", "value":"1" }, { "name":"auto_delete", "value":"1" }, { "name":"days_until_deleted", "value":"14" }, { "name":"pdf_auto_uploading", "value":"0" }, { "name":"ole_auto_uploading", "value":"0" }, { "name":"docx_auto_uploading", "value":"0" }, { "value":"0", "name":"python_auto_uploading" }, { "value":"0", "name":"autoit_auto_uploading" }, { "value":"0", "name":"powershell_auto_uploading" }, { "value":null, "name":"custom_thumbprint" }, { "name":"scan_exception_list", "value":[ "C:\\Test" ] }, { "value":"1", "name":"optics_show_notifications" } ], "script_control":{ "powershell_settings":{ "control_mode":"Alert", "console_mode":"Allow" }, "macro_settings":{ "control_mode":"Alert" }, "global_settings":{ "control_mode":"Alert", "allowed_folders":[ "/users/*/temp/*" ] }, "activescript_settings":{ "control_mode":"Alert" } }, "filetype_actions":{ "suspicious_files":[ { "actions":"3", "file_type":"executable" } ], "threat_files":[ { "actions":"3", "file_type":"executable" } ] }, "logpolicy":{ "retentiondays":"30", "log_upload":{ "compress":"True", "delete":"False" }, "maxlogsize":"100" }, "file_exclusions":[ { "reason":"SHA256 for testing", "category_id":"2", "md5":null, "research_class_id":"0", "file_hash":"443010d98917908efb64a1e8c4a560ec126649bd7e4d0ddd87643356e6f3506f", "cloud_score":null, "av_industry":false, "file_name":"Test file", "file_type":1, "research_subclass_id":"0", "infinity":null } ], "checksum":"", "script_control_v2":{ "python_settings":{ "control_mode":"Alert" }, "dotnet_dlr_settings":{ "control_mode":"Alert" } }, "policy_name":"Example Policy", "policy_id":"52c9f06b-1cef-4837-8001-ca5da50fef32" } }
Response
Please see the Response status codes for more information.
Request JSON schema
Field Name | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
checksum | Checksum is required when you create a policy. Checksum uses an empty value. Example:
| ||||||||||||||||||||||||||||||||||||||||
device_control | Device control allows or blocks access to USB mass storage devices. device_control must be enabled under policy. device_class: All device_class entries must be included in the request.
exclusion_list: Device control exclusion list allows or blocks access to specific USB mass storage devices.
One way to find the vendor ID for a USB mass storage device is to enable device control in a policy, assign that policy to an endpoint, then attach the USB mass storage device to the endpoint. You can view external device logs in the management console, on the protection page or the device details page (external devices tab). For example:
| ||||||||||||||||||||||||||||||||||||||||
file_exclusions | This setting adds file exclusions to the policy safe list, under file actions. Policy safe List are file exclusions specific to the policy, and any endpoints assigned to the policy will allow the excluded files to run.
Example:
| ||||||||||||||||||||||||||||||||||||||||
filetype_actions | This setting is used for the auto-quarantine of unsafe (threat_files) and abnormal (suspicious_files).
Examples of filetype_actions settings and the results in the management console.
| ||||||||||||||||||||||||||||||||||||||||
logpolicy | These are the agent log file settings.
| ||||||||||||||||||||||||||||||||||||||||
memoryviolation _actions | These are the violation types for memory protection. All memory_violations and memory_violations_ext entries must be included in the Request. The following 3 rows explain the possible violation types: | ||||||||||||||||||||||||||||||||||||||||
memory_violations |
| ||||||||||||||||||||||||||||||||||||||||
memory_violations _ext |
| ||||||||||||||||||||||||||||||||||||||||
memory_exclusion _list_v2 | These are the executable files to exclude from Memory Protection. This must be a relative path to the excluded executable file. Example:
| ||||||||||||||||||||||||||||||||||||||||
policy | Various policy settings are contained within this section. All policy settings must be included in the request. For most policy settings, the possible values will be either 0 (disabled) or 1 (enabled). The remaining cells in this table explain policy settings in detail. | ||||||||||||||||||||||||||||||||||||||||
Automatic policy settings |
| ||||||||||||||||||||||||||||||||||||||||
Various policy settings |
| ||||||||||||||||||||||||||||||||||||||||
Various policy settings continued |
| ||||||||||||||||||||||||||||||||||||||||
Optics policy settings |
| ||||||||||||||||||||||||||||||||||||||||
policy_id | This is the unique identifier for the policy. | ||||||||||||||||||||||||||||||||||||||||
policy_name | This is the name of the policy. The name must be unique to your tenant. | ||||||||||||||||||||||||||||||||||||||||
script_control | These are the policy settings for script control. script_control must be enabled (set to "1") under policy.
global_settings
| ||||||||||||||||||||||||||||||||||||||||
macro_settings
powershell_settings
| |||||||||||||||||||||||||||||||||||||||||
script_control continued | 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.
| ||||||||||||||||||||||||||||||||||||||||
user_id | This is the unique ID for the user creating the policy. Only administrators can create policies. To get the user_id, use Get users. |