You can import asset information from MaxPatrol network device scan reports into XDR. Imported assets are displayed in the Assets group. If necessary, you can edit the settings of assets.
You can import asset information either from a MaxPatrol report or from MaxPatrol VM.
Importing asset information from a MaxPatrol report
The import is performed through the API by using the maxpatrol-tool. The tool is located in the /opt/kaspersky/kuma/utils directory.
Imports from MaxPatrol 8 are supported.
To import asset information from a MaxPatrol report:
Data cannot be imported from reports in SIEM integration file format. The XML file format must be selected.
Requirements imposed on accounts for which the API token is generated:
To import assets from MaxPatrol, it is recommended to create a separate user with the minimum necessary set of rights to use API requests.
chmod +x <path to the maxpatrol-tool file on the server hosting the KUMA Core>
./maxpatrol-tool --kuma-rest <KUMA REST API server address and port> --token <path and name of API token file> --tenant <name of tenant where assets will reside> <path and name of MaxPatrol report file> --cert <path to the KUMA Core certificate file>
Example: ./maxpatrol-tool --kuma-rest example.kuma.com:7223 --token token.txt --tenant Main example.xml --cert /opt/kaspersky/kuma/core/certificates/ca.cert
You can use additional flags and commands for import operations. For example, the command --verbose, -v
will display a full report on the received assets. A detailed description of the available flags and commands is provided in the table titled Flags and commands of maxpatrol-tool. You can also use the --help
command to view information on the available flags and commands.
The asset information will be imported from the MaxPatrol report to KUMA. The console displays information on the number of new and updated assets.
Example: inserted 2 assets; updated 1 asset; errors occurred: [] |
The tool works as follows when importing assets:
--verbose
flag.When uploading assets from MaxPatrol, assets that have equivalent IP addresses and fully qualified domain names (FQDN) that were previously imported from Kaspersky Security Center are overwritten.
To avoid this problem, you must configure range-based asset filtering by running the following command:
--ignore <IP address ranges> or -i <IP address ranges>
Assets that satisfy the filtering criteria are not uploaded. For a description of this command, please refer to the table titled Flags and commands of maxpatrol-tool.
Flags and commands of maxpatrol-tool
Flags and commands |
Description |
---|---|
|
Address (with the port) of KUMA Core server where assets will be imported. For example, Port 7223 is used for API requests by default. You can change the port if necessary. |
|
Path and name of the file containing the token used to access the REST API. This file must contain only the token. The Administrator or Analyst role must be assigned to the user account for which the API token is being generated. |
|
Name of the KUMA tenant in which the assets from the MaxPatrol report will be imported. |
|
This command uses DNS to enrich IP addresses with FQDNs from the specified ranges if the FQDNs for these addresses were not already specified. Example: |
|
Address of the DNS server that the tool must contact to receive FQDN information. Example: |
|
Address ranges of assets that should be skipped during import. Example: |
|
Output of the complete report on received assets and any errors that occurred during the import process. |
|
Get reference information on the tool or a command. Examples:
|
|
Get information about the version of the maxpatrol-tool. |
|
Creation of an autocompletion script for the specified shell. |
|
Path to the KUMA Core certificate. By default, the certificate is located in the folder with the application installed: /opt/kaspersky/kuma/core/certificates/ca.cert. |
Examples:
./maxpatrol-tool --kuma-rest example.kuma.com:7223 --token token.txt --tenant Main example.xml --cert /example-directory/ca.cert
– import assets to KUMA from MaxPatrol report example.xml../maxpatrol-tool help
—get reference information on the tool.Possible errors
Error message |
Description |
---|---|
must provide path to xml file to import assets |
The path to the MaxPatrol report file was not specified. |
incorrect IP address format |
Invalid IP address format. This error may arise when incorrect IP ranges are indicated. |
no tenants match specified name |
No suitable tenants were found for the specified tenant name using the REST API. |
unexpected number of tenants (%v) match specified name. Tenants are: %v |
KUMA returned more than one tenant for the specified tenant name. |
could not parse file due to error: %w |
Error reading the XML file containing the MaxPatrol report. |
error decoding token: %w |
Error reading the API token file. |
error when importing files to KUMA: %w |
Error transferring asset information to KUMA. |
skipped asset with no FQDN and IP address |
One of the assets in the report did not have an FQDN or IP address. Information about this asset was not sent to KUMA. |
skipped asset with invalid FQDN: %v |
One of the assets in the report had an incorrect FQDN. Information about this asset was not sent to KUMA. |
skipped asset with invalid IP address: %v |
One of the assets in the report had an incorrect IP address. Information about this asset was not sent to KUMA. |
KUMA response: %v |
An error occurred with the specified report when importing asset information. |
unexpected status code %v |
An unexpected HTTP code was received when importing asset information from KUMA. |
Importing asset information from MaxPatrol VM
The OSMP distribution kit includes the kuma-ptvm utility, which consists of an executable file and a configuration file. The utility is supported on Windows and Linux operating systems. The utility allows you to connect to the MaxPatrol VM API to get data about devices and their attributes, including vulnerabilities, and also lets you edit asset data and import data using the XDR API. Importing data is supported for MaxPatrol VM 1.1.
Configuring the import of asset information from MaxPatrol VM to KUMA Core involves the following steps:
You must create user accounts and an XDR token for API operations.
If necessary, you can edit the received files.
When re-importing existing assets, assets that already exist in KUMA Core are overwritten. In this way, fixed vulnerabilities are removed.
Known limitations:
Preparatory actions:
Requirements imposed on accounts for which the API token is generated:
To create the configuration file:
cd /opt/kaspersky/kuma/utils/
cp kuma-ptvm-config-template.yaml kuma-ptvm-config.yaml
The configuration file will be created.
To import asset information:
kuma-ptvm --config <path to the kuma-ptvm-config.yaml file> --download --upload
kuma-ptvm --config <path to the kuma-ptvm-config.yaml file> --download
For each tenant specified in the configuration file, a separate file is created with a name of the form <tenant ID>.JSON. Also, during export, a 'tenants' file is created, containing a list of JSON files to be uploaded to KUMA Core. All files are saved in the utility's directory.
kuma-ptvm --config <path to the kuma-ptvm-config.yaml file> --upload
To view information about the available commands of the utility, run the --help command.
The asset information is imported from MaxPatrol VM to KUMA Core. The console displays information on the number of new and updated assets.
Possible errors:
When running the kuma-ptvm utility, the tls: failed to verify certificate: x509: certificate is valid for localhost
error may be returned.
To resolve the issue:
To disable certificate validation, add the following line to the configuration file in the 'MaxPatrol settings' section:
ignore_server_cert: true
As a result, the utility is started without errors.
Page top