Proactive Defense events

When the Proactive Defense Monitor (PDM) is on, it reacts to suspicious behavior of the processes running on the computer being monitored. Such events are described in the table below. When one of the events arises, the callback function is invoked by the KAV SDK with the corresponding event passed as the first argument.

There are no PDM events in the current KAV SDK version for Linux-based solutions.

Recent versions of KAV SDK (starting from builds 8.3.x.x) include redesigned Proactive Defense Monitor component. This revamped component includes re-imagined notification approach where number of dedicated events has been significantly decreased.

This improvement aims at making proactive detection of malicious actions performed by PDM less prone to false positive scanning results, increase scanning performance and system responsiveness. Indeed, the new PDM subscribes to a much lesser number of system events thus off-loading KAV Engine from triggering on these events as they happen.

The Proactive Defense Monitor does only at the time a user or an external process is trying to execute a monitored application and does not scan application files before they are executed. To scan files prior to executing them, please use on-access scanning via File Monitor.

The PDM event notification codes declared in the PDM_EVENTS list in kave8_def.h have been deprecated and are not supported.

The following events are supported by Proactive Defense Monitor:

Proactive Defense events

Event

Event description

EVENT_PDM_SURE

A monitored application is known to Kaspersky Lab as malicious.

Receiving this event in the callback function signifies that Proactive Defense Monitor has detected a malicious application or file when a user or an external process attempted to start this application or execute the file.

This event may occur even if no information about this malicious application is present in the malware definition database used by on-access component such as File Monitor.

EVENT_PDM_HEURISTIC

A monitored application has been considered malicious based on heuristic analysis.

Receiving this event in the callback function indicates that there are no known information about this application or file but heuristic analysis performed by PDM at the time of execution has shown that the application attempted to perform an action or a set of actions that is typically used by malicious applications.

For example, this event may be raised when some process attempts to modify DNS cache.

When you receive this event, please consider that heuristic analysis, due to its nature, has a higher rate of false positive, and does only indicate that it is highly possible that detected application may be malicious.

EVENT_PDM_BLOCKING

A monitored application has performed an action that has been blocked.

An action performed by a monitored application has been considered as non-legitimate and has been blocked from being executed.

Blocking rules are retrieved from behavior signature list used by PDM and contained within anti-malware database used by KAV SDK.

For example, this event may occur when some process attempts to inject its code such as add-on libraries into another process.

To guarantee your Proactive Defense Monitor is providing maximum protection, make sure to update KAV SDK malware definition database to retrieve recent version of behavior signature list. This list is used by proactive PDM during behavioral analysis to keep track of malicious actions performed by processes or components running on user computer.

Consider using specialized stand-alone Updater SDK to perform updates of PDM and other protection databases included in the malware definition database used by KAV SDK. Consult with your Kaspersky Technology Account Manager (TAM) for more details on Kaspersky Updater SDK.

Handling Proactive Defense Events

Please consider the following recommendations on how to handle PDM events upon receiving them in your application.

It is recommended implementing two different modes of handling PDM events in your application:

The following scenarios are suggested for your consideration on handling PDM events in each recommended mode.

Automatic mode

When working in this mode, all actions are pefromed automatically based on the following sequence:

  1. Your application retrieves a callback and determines that callback handler has been called by the PDM.
  2. On this step your application needs to determine the event notification code and threat severity type based on the value of the dwEvent parameter and dwParam2 of your callback function returned with last call from PDM, correspondingly.
  3. Your application displays an alert message that is properly colored and describes performed actions to the end-user:
    1. Based on the values of the dwEvent parameter, your application choses the proper logic for chosing the coloring scheme for the alert message shown to the end-user, and the default action peformed by KAV Engine.

      The alert message should be uniquely identified by the end-user by the chosen alert color scheme should not contain any options for the end-user to modify handing of intercepted application’s start or its actions.

      Make sure to inform your user about the severity type of the found malware by coloring your alert message using the recommended color scheme.

    2. Based on the value of the dwParam2 parameter, your application displays a notification to the end-user showing an alert message that can be uniquely identified by the user based on alert color scheme.

      The color scheme and actions are chosen based on the recommendations provided in the Recommendations for automatic mode table. Consider selecting a relevant action based on the recommendations listed in the following table; return to the KAV Engine the callback return value which is specified in the table with recommendations for automatic mode.

      For example, if you have determined that the dwEvent parameter of your callback function contains EVENT_PDM_SURE value, and you have received the KDD_HIGH value in the dwParam2 parameter of the callback function, the CLBK_DELETE_OBJECT value is automatically returned from your application to the callback function, and the KAV Engine deletes the object created by malicious application.

      For more information about callback return values recognized by KAV Engine, see section "Callback function return values".

      The Proactive Defense Monitor keeps you informed of severity of found malicious action or application by sending you severity level type in the dwParam2 parameter of the callback function with the supported PDM notification events. For more information about supported severity level types, see the "Severity level types" table in section "Detection types and severity".

  4. Depending on the settings specified for the rollback operation that is performed by KAV Engine to eliminate traces of malicious actions performed by detected malware, one of the following is done:
    1. If the dwParam1 callback function parmeter is initialized by your application with the PDM_ACTION_ROLLBACK value, rollback of malicious actions is automatically performed, no matter what of the events listed in the following table has been received in the dwEvent parameter.
    2. If the dwParam1 callback function parmeter is initialized by your application with the PDM_ACTION_ROLLBACK value, your application shows a confirmation message to end-user requesting to confirm the rollback of malicious actions is performed, no matter what of the events listed in the following table has been received in the dwEvent parameter.
    3. No rollback action is peformed.

    Recommendations for automatic mode

    Event

    Color scheme

    Callback return value

    EVENT_PDM_HEURISTIC

    Yellow

    Threat severity: Any

    CLBK_TERMINATE

    Block intercepted action and terminates application that attempted to perform this action.

    EVENT_PDM_SURE

    Depending on the threat severity level type.

    • Red

      Threat severity: High

      Severity level in dwParam2 parameter of callback function is set by KAV Engine to KDD_HIGH.

    • Yellow

      Threat severity: Any other

      Any other severity level is received in the dwParam2 parameter of callback function.

    Depending on the threat severity level type.

    • CLBK_DELETE_OBJECT

      Delete the object created by malicious application.

      Threat severity: High

      Severity level in dwParam2 parameter of callback function is set by KAV Engine to KDD_HIGH.

    • CLBK_OK

      Threat severity: Any other

      Allow intercepted action and let the intercepted application to start, if any other severity level is received in the dwParam2 parameter of your callback function.

    EVENT_PDM_BLOCKING

    Red

    Threat severity: Any

    This color sheme is always used, no matter what is the severity type of the detected threat.

    CLBK_DENY

    Prohibit intercepted action.

    This callback return value is always returned, no matter what is the severity type of the detected threat.

Interactive mode

  1. Determine severity based on the received PDM event notification code.
  2. Display a notification to the end-user showing an alert message that can be uniquely identified by the user based on alert color scheme.

    Choose the color scheme based on the determined event notification code. Consider selecting the color scheme based on the recommendations listed in the following table.

  3. Prompt a user to choose an action.

    Consider providing the end-user with a set of actions based on the recommendations listed in the following table. Provide the end-user with an option to return to KAV Engine listed callback codes. Returning a callback return value via your callback function to the KAV Engine triggers the engine to perform an action corresponding to the specific callback return value. For more information about callback return values recognized by KAV Engine, see section "Callback function return values".

    Recommendations for interactive mode

    Event

    Color scheme

    Callback return value

    EVENT_PDM_HEURISTIC

    Yellow

    Threat severity: Medium

    • CLBK_OK

      Allow intercepted action and let the intercepted application to start.

    • CLBK_TERMINATE

      Block intercepted action and terminate application that attempted to perform this action.

    • CLBK_DELETE_OBJECT

      Remove files created by intercepted application.

    EVENT_PDM_SURE

    Red

    Threat severity: High

    • CLBK_OK

      Allow intercepted action and let the intercepted application to start.

    • CLBK_TERMINATE

      Block intercepted action and terminate application that attempted to perform this action.

    • CLBK_DELETE_OBJECT

      Remove files created by intercepted application.

    EVENT_PDM_BLOCKING

    Red

    Threat severity: High

    • CLBK_OK

      Allow intercepted action and let the intercepted application to start.

    • CLBK_DENY

      Prohibit intercepted action.

Please refer to Proactive Defense implementation guidelines for further detail on implementing automatic and interactive modes when integrating Proactive Defense functionality in your application.

Proactive Defense implementation guidelines

When implementing functionality provided by Proactive Defense Monitor (PDM) in your application, please do keep in mind the specific nature of malware detection peculiar to PDM. The behavioral analysis run by PDM for started processes does not do static judgments specific to signature analysis, basing on malware definition database. Rather than relating on samples, allowing you to identify a threat in a process, running or not, the PDM monitors process activity and analyzes whether a tracked down action is suspicious or not based on application activity heuristic modeling. This analysis is based on behavior patterns and may result in false positives.

To indicate such a specifics of behavioral analysis, the PDM returns the EVENT_SUSPECT event when it detects a suspicious action performed by some running process (as compared to the event sequence of EVENT_PREDETECT followed by EVENT_DETECT returned by signature analysis). The EVENT_PREDETECT event signals about a detect performed by KAV Engine using malware definitions provided in the ant-virus database.

Clean distinction between handling the EVENT_PREDETECT and EVENT_SUSPECT events lies in how you can respond to each of these events should they be raised by monitors. While with EVENT_PREDETECT event you can respond to callback function with CLBK_CANCEL_OBJECT (to stop processing the current object) or CLBK_CANCEL_ALL (to stop processing a queue, a parent for an archive), you cannot do so for EVENT_SUSPECT. The EVENT_SUSPECT is a final detection result and cannot be rejected. Any attempt to cancel processing with a CLBK_CANCEL_* event is handled according to the specified default action, see the "Handling Proactive Defense Events" subsection. In this sense the EVENT_SUSPECT serves more like a notification rather than a request waiting for your response. This implies that you will also receive other PDM-specific events listed in the "Proactive Defense events" table if they are raised by KAV Engine. Because you cannot simply cancel the task, the KAV Engine automatically selects the default assigned action for the detected type of threat.

Here are a couple of typical scenarios for working with PDM in your application.

First scenario

Available: a server furnished with a limited set of applications and enabled with anti-virus protection.

Criteria: installed applications do not do any suspicious activity and do not cause false positive results in PDM.

General recommendation: consider prohibiting all suspicious activity and rollback activity that cannot be restricted. Such security policy will provide for enhanced security.

Second scenario

Available: a desktop PC.

Criteria: N/A

General recommendation: consider requesting user confirmation for every suspicious action.

To avoid inadvertently prohibiting a user application activity, consider requesting confirmation from a user.

As it has been stated before, behavioral analysis has its drawback. It may cause false-positive results where a legitimate action of a user application is considered as suspicious. To reduce the false positive rate, the Proactive Defense Monitor uses internally created white lists.

It is recommended implementing automated and interactive modes in your application. When in automatic mode, consider reducing user interaction. Provide the user with an option to choose what suspicious activity he wants to control. Implement this option based on the event list that requires user interaction. Prompt for user action only when the PDM raised an event that is present in the PDM interaction list. Handle all other PDM events automatically. It is recommended that you trace and skip events that have not been selected by the user or not present in the PDM interaction list. Skip all other event codes and do not require for user interaction when the PDM raises any of the events not included in the list above.

In interactive mode it is recommended that you require user interaction for any of the event codes present in the PDM interaction list, except for those which have been specifically marked by the user as not to be shown to him. Consider requiring user interaction for all the other events which may be raised by PDM but not present in the PDM interaction list. This mode implies that all suspicious actions tracked down by the Proactive Defense Monitor are first validated by the PC user and require his interaction. The user is thus responsible for allowing the application to do the trapped action.

Page top