在封閉軟體環境模式下在 ALT SP 上執行應用程式

本節介紹如何在封閉的軟體環境模式下在 ALT SP 作業系統中啟動應用程式。

要在 ALT SP 作業系統上執行應用程式:

  1. 如果已啟用封閉軟體環境模式,請執行下列命令將其停用:

    integrity-remover

  2. 執行下列命令建立 kesl 群組,以便對 IMA 政策進行進一步變更:

    groupadd kesl

  3. 執行下列命令尋找已建立群組的唯一識別碼 (GUID):

    cat /etc/group | grep kesl

  4. 編輯 IMA 政策以排除 kesl 群組。具體操作如下:
    1. 執行以下命令複製 /usr/share/integrity/policy 檔案:

      cp /usr/share/integrity/policy /etc/integrity/policy

    2. 執行以下命令,使用文字編輯器(例如 vim)編輯 /etc/integrity/policy 檔案:

      vim /etc/integrity/policy

    3. 在行dont_measure fsmagic=0xf97cff8c(通常這是dont_measure部分中的最後一行)之後,新增行dont_measure fgroup=<GUID>, 其中<GUID>是在這些指示的步驟 2 中建立的群組的唯一識別碼。
    4. 在行dont_appraise fsmagic=0x27e0eb(通常這是dont_appraise 部分中的最後一行)之後,新增行dont_appraise fgroup=<GUID>, 其中<GUID>是在這些指示的步驟 2 中建立的群組的唯一識別碼。
    5. 儲存您的變更。
  5. 在 /usr/sbin/integrity-sign 檔案中,編輯 list_all_files 函數,將 Kaspersky Endpoint Security 應用程式包括在被允許在封閉環境模式下執行的應用程式允許清單中。具體操作如下:
    1. 執行以下命令,使用文字編輯器(例如 vim)編輯 /usr/sbin/integrity-sign 檔案:

      vim /usr/sbin/integrity-sign

    2. 找到 list_all_files 函數,在函數本文中,在以find -P開頭的行中,將 Kaspersky Endpoint Security 應用程式在 /var/opt 和 /opt 目錄下的目錄新增至每個目錄枚舉的結尾。
    3. 儲存您的變更。
  6. 安裝 Kaspersky Endpoint Security 應用程式。為確保安裝後應用程式資料庫更新能正常運作,在初始配置階段,拒絕啟動應用程式資料庫更新(為此,請在應用程式資料庫更新步驟中輸入“no”)。
  7. 執行下列指令,為 Kaspersky Endpoint Security 應用程式的可更新元件指派 kesl 群組和目錄權限的繼承:

    cd /var/opt/kaspersky/kesl/<內建版本號_*>/var/opt/kaspersky/kesl/private

    chown -R root:kesl updates/

    find updates -type d -exec chmod g+s {} \;

    cd /opt/kaspersky/kesl/lib64

    chown -R root:kesl updatable_modules/

    find updatable_modules -type d -exec chmod g+s {} \;

    cd /var/opt/kaspersky/kesl/common/

    chown -R root:kesl temp/

    find temp -type d -exec chmod g+s {} \;

  8. 執行下列命令,為 Network Agent 的可更新元件指派 kesl 群組和目錄權限的繼承:

    cd /var/opt/kaspersky/

    chown -R root:kesl klnagent/

    find klnagent/ -type d -exec chmod g+s {} \;

    cd /opt/kaspersky/

    chown -R root:kesl klnagent64/

    find klnagent64/ -type d -exec chmod g+s {} \;

  9. 使用下列指令啟動系統簽名,啟用封閉軟體環境模式:

    integrity-applier -i -A

  10. 執行下列指令,確保 IMA 子系統已啟動:

    cat /proc/cmdline

    指令輸出應包含行lsm=integrity ima_hash=sha512 ima_appraise=enforce。

  11. 執行以下命令啟動資料庫更新工作:

    kesl-control --start 6 -W

    如果輸出包含EventType=BasesApplied事件,則表示資料庫更新已正確執行。

    如果應用程式以Light Agent 模式用於防護虛擬環境,請等待應用程式資料庫自動更新。您可以使用`kesl-control --app-info`命令檢視資料庫更新資訊。輸出包含應用程式資料庫是否已載入以及應用程式資料庫上次發佈時間等資訊。

  12. 執行以下指令重新啟動應用程式:

    systemctl restart kesl

頁頂