Set Reputation

Endpoint URL: https://<your server>/rest/classification/update
Endpoint URI: classification/update

Action: POST

Sets a custom, organization-specific reputation (whitelist or blacklist) for a file, IP address, or domain name.

Note

Ensure that you have logged into the Cybereason platform. For details, see Log in with the API.

Request Headers

You must add an Content-Type:application/json header with the request.

Note

If you are using cURL, add the authorization cookie details or the path to the file with cookie details with every request.


Request Body

Input: JSON

Depending on your browser settings, this linked file may open in a separate tab instead of downloading directly to your machine. If this happens, use the Save As option in your browser to save the file locally.

            [
                {
                    "keys": [
                        "<item key>"
                    ],
                    "reputationType":"<item type>",
                    "maliciousType": "<classification>",
                    "prevent": "<boolean>",
                    "remove": "<boolean>",
                    "comment":"<comment",
                    "expiration":1643608800000,
                }
            ]

Request Parameters

URL/URI parameters: none

Request Body Parameters: Use the following parameters. Required parameters are noted in bold.

Parameter

Type

Description

keys

String

The file hash value (either MD5 or SHA1), IP address, or domain name for which to set a custom reputation.

reputationType

Enum

The type of item for which you are setting a reputation. Possible values include:

  • FILE

  • DOMAIN

  • IP

This field is supported in versions 21.2.101 and later.

maliciousType

Enum

The reputation to set. Possible values include:

  • whitelist

  • blacklist

prevent

Boolean

Indicates whether to prevent the file’s execution with Application Control. Note this option is applicable for the File type.

If your request includes IP addresses or domain names to update, you must set this parameter to false.

remove

Boolean

Instructs Cybereason to add or remove a reputation. Set the value to true to remove the current reputation or false to add a reputation.

comment

String

A comment to add with a custom reputation.

This field is supported in versions 21.2.101 and later.

expiration

Long

The expiration date for the custom reputation.

This field is supported in versions 21.2.101 and later.


Response Status Codes

This request can return the following status codes:

  • 200: OK with an accompanying success or failure message.


Response Success Schema

The response includes the following fields:

  • outcome: A string value. The status of the reputation update. If the update was successful, the status is success.

  • data: String value. Indicates whether the data set was correct.


Response Failure Schema

The response includes these possible fields:

Parameter

Type

Description

outcome

Enum

An object containing the status of the response. Possible values include:

  • failed

  • Could not update classification

  • Invalid key. A key must be either an IP address, File hash, or Domain

  • Preventing execution is only allowed for blacklisted file hash

  • Preventing execution can only be applied to a file hash

  • There was an error updating classification

data

Boolean

Describes whether the data was updated successfully. If the update was successful this value is true. If the update failed, this value is null.


Important Response Fields

Important information is found in these fields:

  • outcome parameter: The update status for the reputation. Ensure that it reports success to see if your reputation update succeeded.


Example: Set the reputation for a specific file

Request

curl --request POST \
        --url http://12.34.56.78/rest/classification/update \
        --header 'Content-Type:application/json' \
        --data '{
                    [
                        {
                            "keys": [
                                        "0aae5873aa0e9f80d3fa41524bef6825723b9e87"
                                    ],
                            "maliciousType": "whitelist",
                            "prevent": "true",
                            "remove": "false"
                        }
                    ]
                }'

Response

{
    "outcome":"success",
    "data":true
}

Example: Set the reputation for a specific IP address

Request

curl --request POST \
        --url http://12.34.56.78/rest/classification/update \
        --header 'Content-Type:application/json' \
        --data '{
                    [
                        {
                            "keys": [
                                "11.11.11.11"
                            ],
                            "maliciousType": "whitelist",
                            "prevent": "false",
                            "remove": "false"
                        }
                    ]
                }'

Response

{
    "outcome":"success",
    "data":true
}

Example: Set the reputation for a specific domain

Request

curl --request POST \
        --url http://12.34.56.78/rest/classification/update \
        --header 'Content-Type:application/json' \
        --data '{
                    [
                        {
                            "keys": [
                                        "mydomain.com"
                                    ],
                            "maliciousType": "whitelist",
                            "prevent": "false",
                            "remove": "false"
                        }
                    ]
                }'

Response

{
    "outcome":"success",
    "data":true
}

Example: Set the reputation for a multiple items

Request

curl --request POST \
        --url http://12.34.56.78/rest/classification/update \
        --header 'Content-Type:application/json' \
        --data '{
                    [
                        {
                            "keys": [
                                        "0aae5873aa0e9f80d3fa41524bef6825723b9e87",
                                        "11.11.11.11",
                                        "mydomain.com"
                                    ],
                            "maliciousType": "whitelist",
                            "prevent": "false",
                            "remove": "false"
                        }
                    ]
                }'

Response

{
    "outcome":"success",
    "data":true
}

Example: Update failure for a reputation update due to incorrect values

Request

curl --request POST \
        --url http://12.34.56.78/rest/classification/update \
        --header 'Content-Type:application/json' \
        --data '{
                    [
                        {
                            "keys": [
                                "0aae5873aa0e9f80d3fa41524bef6825723b9e87"
                            ],
                            "maliciousType": "malware",
                            "prevent": "true",
                            "remove": "false"
                        }
                    ]
                }'

Response

{
    "outcome": "failed",
    "data": {
        "1562689458066": "invalidFileEntry_badReputation"
    }
}

Example: Update failure for a reputation update due to incorrect values for prevention

Request

curl --request POST \
        --url http://12.34.56.78/rest/classification/update \
        --header 'Content-Type:application/json' \
        --data '{
                    [
                        {
                            "keys": [
                                        "0aae5873aa0e9f80d3fa41524bef6825723b9e87",
                                        "11.11.11.11",
                                        "mydomain.com"
                                    ],
                            "maliciousType": "whitelist",
                            "prevent": "false",
                            "remove": "false"
                        }
                    ]
                }'

Response

{
    "outcome": "failed",
    "data": {
        "1562692248058": "invalidFileEntry_failedToPreventWithWhitelist"
    }
}

Example: Set the reputation for a specific domain (versions 21.2.103 and later)

Request

curl --request POST \
        --url http://12.34.56.78/rest/classification/update \
        --header 'Content-Type:application/json' \
        --data '{
                    [
                        {
                            "keys":["mytestdomain.com"],
                            "reputationType":"DOMAIN",
                            "maliciousType":"blacklist",
                            "prevent":false
                            "remove":false,
                            "comment":"Sample domain",
                            "expiration":1643608800000
                        }
                    ]
                }'

Response

{
    "outcome":"success",
    "data":true
}