With KAV SDK you can enable your application with on-demand and on-access protection from phishing web sites.
Phishing protection component helps to prevent fraudulent attempts of an attacker to collect sensitive information about the private data of your clients. The component scans web addresses for common attributes of phishing sites, which may include attentive and pressing wordage and falsified web addresses. When phishing is detected, Phishing protection component raises an event with a result, or returns a scanning result that indicate a detected phishing on a scanned web site.
To increase detection rate for phishing addresses, please consider using on-demand scanning and configure your application to malware definition database every 2 (two) hours. Make sure the Phishing protection component is included to the update sequence.
Phishing protection can be used in:
kaveCheckUrl functionAllows users of you application to scan specific web addresses on demand.
Enables constant on-access protection from phishing. If you initialize Web Monitor component with support for phishing protection, your application is enabled with phishing protection upon the initialization of Web Monitor settings.
Availability
Phishing protection is platform dependent. Web Monitor component is supported only on Windows platform,Following table outlines
Platform dependency for Phishing protection
|
Web Monitor |
kaveCheckUrl |
|---|---|---|
Windows |
Supported |
Supported |
Linux |
Not supported |
Supported |
Enabling phishing protection in KAV SDK
Before Phishing protection technology can be used in Web Monitor (Windows platform only) or with kaveCheckUrl function (cross-platform compatibility), its component must be loaded into KAV SDK. This is done at initialization of KAV SDK.
To enable KAV SDK with support for phishing protection:
If you enable phishing protection without having a proper license, the library returns KAV_E_LICENSE_LIMITED at the time of initialization.
KAV_SHT_ENGINE_APUF flag in the host type mask configured in dwScannerHostType parameter of kaveInitilizeEx.kaveInitilizeEx.When kaveInitialize returns a success code, phishing protection can be used through kaveCheckUrl or with Web Monitor.
Enabling phishing protection in kaveCheckUrl
To implement on-demand scanning of URL addresses with kaveCheckUrl, the Phishing protection component is available straight away after KAV SDK is initialized with KAV_SHT_ENGINE_APUF bit flag.
To enable phishing protection with kaveCheckUrl:
KAV_SHT_ENGINE_APUF bit flag; check arguments of kaveInitalizeEx/kaveInitialize.phishing.html template to default template location (\bin\loc\common\); SDK seeks for templates in this folder at initialization.If there is no template at the specified path, KAV SDK returns KAV_E_MOD_NOT_FOUND.
Phishing protection for kaveCheckUrl does not support heuristics. If you need heuristic analysis to run during scanning for phishing, use Web Monitor.
Enabling phishing protection in Web Monitor
If KAV SDK is initialized with support for phishing protection, you may configure Web Monitor component to run with phishing protection. Phishing protection allows Web Monitor to verify web addresses by the phishing database.
Specifying KAV_SHT_ENGINE_APUF flag at initialization is a requirement for phishing functionality to work in Web Monitor when configured. If the flag was not specified at initialization, initializing an instance of KAV_WEB_MONITOR_SETTINGS3 data structure with KAV_O_M_PHISHING added does not enable protection from phishing for Web Monitor.
Web Monitor is enabled with heuristics which is used by default during the scan process, including scanning for phishing. Parameters of heuristic scanning cannot be altered in your application.
To enable phishing protection in Web Monitor:
KAV_SHT_ENGINE_APUF bit flag; check arguments of kaveInitalizeEx/kaveInitialize.KAV_O_M_PHISHING flag to the bit mask in dwScanningMode member of KAV_WEB_MONITOR_SETTINGS3 data structure.If KAV_SHT_ENGINE_APUF is not specified, E_UNEXPECTED returned.
phishing.html template to the template location.Location is specified in the pTemplateFolder parameter of an KAV_WEB_MONITOR_SETTINGS3 instance.
KAV SDK seeks template at the default location.
KAV SDK seeks template at the specified path.
If there is no template at the specified path, KAV SDK returns KAV_E_MOD_NOT_FOUND.
Handling scanning results for phishing analysis in kaveCheckUrl
If kaveCheckUrl runs synchronously with the caller, results of scanning web addresses by phishing database are available in its pResult parameter. The following state diagram outlines scanning for phishing by using kaveCheckUrl.

Phishing protection for On-demand scan with kaveCheckUrl
For asynchronous scanning mode, results of scanning are returned in dwParam1 parameter of your callback handler when KAV SDK raises EVENT_RESULT mode, see "Handling scanning results for phishing analysis in Web Monitor".
Handling scanning results for phishing analysis in Web Monitor
When Web Monitor detects a scanned web URL as a phishing address, it raises an event code. Depending on a situation, specific codes are returned to the callback handler specified in your application, see "Identifying phishing status" table later.
Web Monitor uses specified HTML template file to substitute for a malicious web page when phishing is detected. The substitution page phishing.html may contain alert notifications for the end users attempting to access a phishing address. You may extend the content of the template using the following placeholders:
%VIRUSNAME%%URLTOREPORT%%URLTOREPORTDIGEST%$MessageGeneratedTimestampThe placeholders are described in section "Web Monitor settings".
Using the following tables you can identify phishing status for the scanned web address based on the values of your callback handler. These values are set by KAV SDK when a specific event is raised.
Events are raised in a sequence according to the state diagram for asynchronous scanning in Web Monitor. The event sequence depends on internal detection status assigned by Web Monitor to the scanned URL address.
Phishing protection may assign following statuses for a scanned URL:
CleanSafe address: no phishing detected in the scanned web address.
DangerPhishing address: Phishing protection component detected phishing in the scanned web address. This status is indicated by KDT_PHISHING_URL event code.
Delayed dangerPhishing address: Phishing protection component detected phishing in the scanned web address after the web page is opened. This status is only supported for Phishing protection in Web Monitor. This status is indicated by KDT_PHISHING_DELAYED_URL event code.
The statuses can be identified based on the values in dwEvent and dwParam1 populated in your callback handler by SDK when Web Monitor raises an event. Following are event sequences expected for safe and phishing addresses.
Note that in case of KDT_PHISHING_DELAYED_URL event code KAV SDK does not use replacement template pages. If you want the phishing page to be substituted when Phishing protection detects phishing after phishing page is loaded, replacement actions must be implemented in your application. The SDK does not handle such a replacement.
Event sequence raised by Web Monitor for a safe address
Web Monitor does not raise events for phishing-safe web addresses. However, Web Monitor also runs standard malware scanning. The state machine with the sequence of events raised by Web Monitor during such scanning runs is available here (the diagram for handling packed object is listed here). The final event code for a safe web page is:
EVENT_OKWeb Monitor raises this event at the end of scanning procedure. The event indicates that KAV SDK did not find a threat in a scanned object while scanning it for phishing, and the address is also safe from malware.
Event sequence raised by Web Monitor for an unsafe address
Whenever a non-safe phishing URL address detected by Phishing protection component whilst scanned by Web Monitor, the monitor raises the following sequence of events.
EVENT_PREDETECTA decision making event. This event notifies you that Phishing protection component detected a threat in the URL and it allows you to decide if you want Web Monitor to continue scanning the URL, or scanning must be skipped.
For this event you can opt from:
Return CLBK_OK. Phishing protection continues to scan the URL for phishing; next event: EVENT_SUSPECTED.
Return CLBK_CANCEL or CLBK_CANCEL_ALL codes.
Choices are cached. Web Monitor does not raise EVENT_PREDETECT or EVENT_OK when rechecking the same web address within a certain period (time to live, TTL), and the cached URL is handled as it was handled the last time. The TTL period depends on the number of cached addresses and is selected by internal logic in KAV SDK.
For example, if Web Monitor finds an URL that was scanned within a certain cache time frame, this URL is proceeded as chosen in the previous run. If you chose not to scan the URL previously, the Web Monitor skips the URL. Or, if previously you confirmed scanning of the URL, and your choice is cached, the Web Monitor re-scans the URL.
EVENT_SUSPECTEDA conclusion drawing event.
This event notifies the last part of scanning procedure for a certain URL. In dwParam1 parameter you may obtain a type of the detected threat, and dwParam2 of your callback handler will contain threat severity.
This event code cannot be suppressed. If you have confirmed scanning when handling EVENT_PREDETECT, scanned address will receive the phishing-positive status (Danger or Delayed danger).
EVENT_OKThis event code indicates one of the following:
Web Monitor raises this event after EVENT_PREDETECT when scanning was suppressed in your application by returning a cancelation code. By suppressing scanning in your application you make Phishing protection to consider the scanned address safe.
KAV SDK calls your callback with its dwEvent is set to EVENT_OK and dwParam1 initialized to KDT_SAFE_URL. The type code for the safe object is the URL address, its type code is KDT_SAFE_URL, see "Detection types and severity" for details.
EVENT_RESULTFinal status for the scanned URL. Depending on the preceding sequence, this event raises with different values in dwParam1.
KAV_S_R_SUSPICIOUSWeb Monitor detected phishing detected in the scanned URL. Scanning finished.
KAV_S_S_CANCELEDWeb Monitor stopped scanning the URL.
The following state diagram outlines scanning for phishing by using Web Monitor.

Phishing protection for On-access scan with Web Monitor
You can identify threat type and severity based on the following table.
Identifying threat type and severity
Phishing status |
dwEvent |
dwParam1 |
dwParam2 |
|---|---|---|---|
|
|
|
|
or
|
|
|
|
|
|
*N/A indicates that Web Monitor did not use Phishing protection component because WMUF component returned the Clean status for the scanned address.
The type value and threat severity depend on the KAV SDK component that detected the threat. Depending on whether Phishing protection is used alone or the URL was also scanned by WMUF Filtering, scanning types and severity returned by Web Monitor for the same URL may differ.
Phishing protection and WMUF Filtering component use own rating systems to classify found threats. Statuses given by WMUF Filtering component have higher priority to that of statuses returned by Phishing protection component; they win over the statuses produced by Phishing protection.
If a threat is found as a result of scanning by WMUF Filtering, Danger status is given by the component, this threat is given the highest severity code—KDD_HIGH. The code is found in the dwParam2 of your callback when it is called by Web Monitor with EVENT_SUSPECTED. With this status obtained after scanning the object using WMUF Filtering Web Monitor does not re-scan the threat with Phishing protection. Positive scanning result obtained from WMUF Filtering has higher priority over the statuses given by Phishing protection and the scanned web address is considered a malicious URL with the highest severity assigned by Web Monitor.
Following table lists component priority that is used to define the final threat type and severity depending on the internal scanning status returned by WMUF Filtering or Phishing protection components.
Identifying phishing status
WMUF status |
Phishing status |
Aggregated status |
dwParam1 |
dwParam2 |
|---|---|---|---|---|
|
No status |
N/A |
N/A |
N/A |
|
No status |
|
|
N/A |
or
|
|
|
or
|
|
or
|
|
|
or
|
|
|
or
|
|
|
|
|
or
|
|
|
|
* Disabled indicates that specific component was not initialized (no component mode flag specified in the initialization function).
Scanning statuses are returned when Web Monitor calls your callback function with EVENT_RESULT code and depend on the aggregated status.
Identifying threat type and severity
Phishing status |
dwEvent |
dwParam1 |
|---|---|---|
|
|
|
|
|
|
|
|