This section describes how to upgrade Kaspersky CyberTrace on Linux.
Upgrading files (RPM/DEB package)
To upgrade Kaspersky CyberTrace automatically to a newer version:
/opt/kaspersky/ktfs/feeds/Black_List.json
file and the /opt/kaspersky/ktfs/feeds/Black_List.json.url.bin
directory to the /tmp/feeds
directory./opt/kaspersky/ktfs/feeds/White_List.json
file and the /opt/kaspersky/ktfs/feeds/White_List.json.url.bin
directory to the /tmp/feeds
directory./opt/kaspersky/ktfs/etc/kl_feed_service.conf
and /opt/kaspersky/ktfs/etc/kl_feed_util.conf
files.run.sh upgrade
Starting from Kaspersky CyberTrace version 3.1.0, the CyberTrace HTTP service always starts when Kaspersky CyberTrace is initialized.
When the installation script finishes the upgrade process, Feed Service will be launched.
/opt/kaspersky/ktfs/etc/init.d/kl_feed_service stop
%service_dir%\bin\kl_feed_util.conf
file:Feed
element of the kl_feed_util.conf
backup copy that is not related to an OSINT or custom feed and whose Name
nested element does not contain Mobile_Botnet_CnC_URL_Data_Feed.json, copy the contents of the Feed
element to the kl_feed_util.conf file to substitute the existing data with the new data.Feed
element of the kl_feed_util.conf backup copy, whose Name
nested element contains Mobile_Botnet_CnC_URL_Data_Feed.json, move the value of its enabled
attribute to the enabled
attribute of the corresponding Feed
element of the kl_feed_service.conf./opt/kaspersky/ktfs/etc/kl_feed_service.conf
file: for each feed, move the Configuration > Feeds> Feed > ActionableFields
section to the new configuration file.Configuration > OutputSettings
section of the /opt/kaspersky/ktfs/etc/kl_feed_service.conf
file with the corresponding section of kl_feed_service.conf backup copy. /tmp/feeds
directory to the /opt/kaspersky/ktfs/feeds
directory./opt/kaspersky/ktfs/etc/init.d/kl_feed_service start
After you perform the steps above, all the settings, user accounts data, available feeds and certificates will be transferred to the new version. If you have a commercial license key, you can add it to Kaspersky CyberTrace by means of the Licensing tab.
Note that automatic upgrade with the RPM/DEB package is available only if you have Kaspersky CyberTrace version 3.0.0 or later on your computer. Also, automatic upgrade functionality is available only if you have accepted the EULA in the installation that is being upgraded.
Upgrading files (TGZ package)
To upgrade Kaspersky CyberTrace:
/opt/kaspersky/ktfs/etc/init.d/kl_feed_service stop
/tmp
directory as follows:cp /opt/kaspersky/ktfs/etc/kl_feed_service.conf /opt/kaspersky/ktfs/etc/kl_feed_util.conf /opt/kaspersky/ktfs/httpsrv/etc/custom_feed_list.conf /opt/kaspersky/ktfs/httpsrv/etc/ktfsaccess /opt/kaspersky/ktfs/httpsrv/etc/ktfsstatistics.kvdb /opt/kaspersky/ktfs/httpsrv/etc/ktfsstorage.kvdb /tmp
Also, copy the PEM-formatted certificates specified in the SSLCertificatePath
and SSLPrivateKeyPath
elements of the kl_feed_service.conf file and the CertFile
element of the kl_feed_util.conf file to the /tmp
directory.
Hereinafter, these files are referred to as the backup copies. Data from these files will be used in the new installation.
/opt/kaspersky/ktfs/feeds/Black_List.json
file and the /opt/kaspersky/ktfs/feeds/Black_List.json.url.bin
directory to the /tmp/feeds
directory./opt/kaspersky/ktfs/feeds/White_List.json
file and the /opt/kaspersky/ktfs/feeds/White_List.json.url.bin
directory to the /tmp/feeds
directory.mv /opt/kaspersky/ktfs /opt/kaspersky/old_ktfs
If you do not want to keep old files, run the following command:
rm -fr /opt/kaspersky/ktfs
/opt/kaspersky/
directory and overwrite existing files:tar zxvf Kaspersky_CyberTrace-Linux-x86_64-X.Y.Z.T-Release_for_SIEM.tar.gz -C /opt/kaspersky
In this command, replace Kaspersky_CyberTrace-Linux-x86_64-X.Y.Z.T-Release_for_SIEM.tar.gz
with the real name of the distribution archive.
mv /opt/kaspersky/Kaspersky_CyberTrace-Linux-x86_64-X.Y.Z.T-Release_for_SIEM /opt/kaspersky/ktfs
ProxySettings
element of the kl_feed_util.conf file from its backup copy.OutputSettings > ConnectionString
element of the kl_feed_service.conf file from its backup copy.InputSettings > ConnectionString
element of the kl_feed_service.conf file from its backup copy.Configuration > InputSettings > RegExps > Source
element of the kl_feed_service.conf file backup, copy the element to the kl_feed_service.conf file (by this you can substitute the existing data with the new data).Configuration > NormalizingRules
element of the backup copy of the kl_feed_service.conf file to every Configuration > InputSettings > RegExps > Source > NormalizingRules
element of the kl_feed_service.conf file whose id
attribute of the Source
element is not http_single_lookup
or http_file_lookup
.If, however, a normalizing rule is used for delimiting events (namely, the output
attribute of the Replace
element has the value "\n"
or " "
), do not copy it to the kl_feed_service.conf file, but create or edit the Configuration > InputSettings > EventDelimiter
element instead with the following contents:<EventDelimiter>%START_EVENT_SYMBOLS%</EventDelimiter>
Here %START_EVENT_SYMBOLS%
is the value of the input
attribute of that Replace
element.
Feeds
element of the kl_feed_service.conf file backup with the kl_feed_service.conf file as follows:Field
element pertaining to custom JSON feeds, change the value of the name
attribute as follows: in the kl_feed_util.conf file backup, in the Parsing
element pertaining to this JSON feed, find an element whose name is the same as the value of the cited name
attribute and replace the value of the name
attribute with the value of the found element.For example:
The contents of the kl_feed_service.conf file backup before editing: <Feed filename="My_custom_feed.json" outdated_alert_period="0" enabled="true"> <Field name="Custom_MD5" matching_type="Exact" input_regexp_to_match="RE_HASH" category=" My_custom_feed_MD5" /> <Field name="Custom_URL" matching_type="Url" input_regexp_to_match="RE_URL" category=" My_custom_feed_URL" /> </Feed>
The contents of the kl_feed_util.conf file backup: <Parsing type="json"> <Custom_URL type="url">URL</Field> <Custom_MD5 type="md5">MD5</Field> </Parsing>
The contents of the kl_feed_service.conf file backup after editing: <Feed filename="My_custom_feed.json" outdated_alert_period="0" enabled="true"> <Field name="MD5" matching_type="Exact" input_regexp_to_match="RE_HASH" category=" My_custom_feed_MD5" /> <Field name="URL" matching_type="Url" input_regexp_to_match="RE_URL" category=" My_custom_feed_URL" /> </Feed> |
A custom JSON feed is not from Kaspersky, nor is it an OSINT feed, but is a feed for which the Path
element of the kl_feed_util.conf file has the .json
extension.
Feed
element of the kl_feed_service.conf file backup that is not related to an OSINT feed and whose filename
attribute is not equal to Mobile_Botnet_CnC_URL_Data_Feed.json
, copy the Feed
element's contents to the kl_feed_service.conf file to substitute the existing data with the new data.Feed
element of the kl_feed_service.conf file backup whose filename
attribute is Mobile_Botnet_CnC_URL_Data_Feed.json
, copy the value of its enabled
attribute to the enabled
attribute of the Feed
element of the kl_feed_service.conf file whose filename
attribute is Mobile_Botnet_CnC_URL_Data_Feed.json
.Feeds
element of the kl_feed_util.conf file backup with kl_feed_util.conf file as follows:RequiredFields
element of every custom JSON feed, find an element, nested in the Parsing
element of this JSON feed, whose name is the same as the field name, and rename the field in the RequiredFields
element to the value of the found element.UrlMatcherField
element (if this element is used) of every custom JSON feed, find an element nested in the Parsing
element of this JSON feed, whose name is the same as the field name. Rename the field in the UrlMatcherField
element to the value of the found element.Parsing
element that pertains to a custom JSON feed, change its name to Field
.For example:
The contents of the kl_feed_util.conf file backup before editing: <Feed enabled="true"> <Name>My_custom_feed</Name> <Path>./custom_example/example_feed.json</Path> <UrlMatcherField>Custom_URL</UrlMatcherField> <Parsing type="json"> <Custom_MD5 type="MD5">MD5</Custom_MD5> <Custom_URL type="URL">URL</Custom_URL> <Some_Trash type="CONTEXT">trash</Some_Trash> </Parsing> <RequiredFields>Custom_MD5;Custom_URL;Some_Trash</RequiredFields> </Feed>
The contents of the kl_feed_util.conf file backup after editing: <Feed enabled="true"> <Name>My_custom_feed</Name> <Path>./custom_example/example_feed.json</Path> <UrlMatcherField>URL</UrlMatcherField> <Parsing type="json"> <Field type="MD5">MD5</Field> <Field type="URL">URL</Field> <Field type="CONTEXT">trash</Field> </Parsing> <RequiredFields>MD5;URL;trash</RequiredFields> </Feed> |
A custom JSON feed is not from Kaspersky, nor is it an OSINT feed, but instead is a feed for which the Path
element of the kl_feed_util.conf has the .json
extension.
Feed
element of the kl_feed_util.conf file backup that is not related to an OSINT feed and whose Name
nested element does not contain Mobile_Botnet_CnC_URL_Data_Feed.json
, copy the Feed
element's contents to the kl_feed_util.conf file to substitute the existing data with the new data.Feed
element of the kl_feed_util.conf file backup, whose Name
nested element contains Mobile_Botnet_CnC_URL_Data_Feed.json
, specify the value of its enabled
attribute in the enabled
attribute of the Feed
element of the kl_feed_service.conf file whose Name
nested element contains Mobile_Botnet_CnC_URL_Data_Feed.json
.crontab -l
in order to determine the update period for the /opt/kaspersky/ktfs/scripts/cron.sh
script.If you specify 0, the automatic update is switched off.
update_frequency
attribute of the Configuration > Feeds
element of the kl_feed_service.conf file.If you specify a value other than the values listed above, an error will occur during the Feed Service start.
/opt/kaspersky/ktfs/scripts/cron.sh
script by running the command crontab -e
and removing the corresponding line.GUISettings
element of the kl_feed_service.conf file from its backup copy (in this way, you can replace existing data with new data).If the value of the enabled
attribute of the GUISettings > HTTPServer
section in the kl_feed_util.conf
backup copy is false
, copy this section to the kl_feed_util.conf
configuration file without the enabled
attribute.
For this, specify feed matching rules for the new feeds (Mobile Botnet СnC URL Data Feed, IoT URL Data Feed, Vulnerability Data Feed) in the Feeds
element of the kl_feed_service.conf configuration file as follows:
Field
elements from the kl_feed_service.conf file./opt/kaspersky/ktfs/httpsrv/etc/kl_feeds_info.conf
file, find the feed being considered, the list of its fields to detect, and the name
, type
, and category
parameters of these fields.Field type |
Type of extracted data |
Matching type |
URL |
URL |
URL |
DOMAIN |
URL |
URL |
IP |
IP |
EXACT |
MD5 |
MD5 |
EXACT |
SHA1 |
SHA1 |
EXACT |
SHA256 |
SHA256 |
EXACT |
MD5 |
HASH |
EXACT |
SHA1 |
HASH |
EXACT |
SHA256 |
HASH |
EXACT |
DOMAIN |
DOMAIN |
URL |
URL |
DOMAIN |
URL |
RegExps
section of the kl_feed_service.conf file, find all regular expressions of the determined type of extracted data.Field
element to the kl_feed_service.conf file with the following data:name
attribute contains the value of the name
parameter of the field to detect, according to the kl_feed_info.conf file.matching_type
attribute contains the matching type from the above table.input_regexp_to_match
attribute contains the regular expression name.category
attribute contains the value of the category
parameter of the field to detect, according to the kl_feed_info.conf file./opt/kaspersky/ktfs/httpsrv/etc/custom_feed_list.conf
/opt/kaspersky/ktfs/httpsrv/etc/ktfsaccess
/opt/kaspersky/ktfs/httpsrv/etc/ktfsstatistics.kvdb
/opt/kaspersky/ktfs/httpsrv/etc/ktfsstorage.kvdb
Settings > ProxySettings
element of the kl_feed_util.conf file from its backup copy./tmp/feeds
directory to the /opt/kaspersky/ktfs/feeds
directory./opt/kaspersky/ktfs/etc/init.d/kl_feed_service start