Kaspersky Endpoint Security 12.9 for Windows 引入了使用 卡巴斯基安全管理中心 API 對 EDR 威脅回應操作的支援 (EDR responses)。也就是說,您可以呼叫 OpenAPI 方法使用 Python 自動化 EDR 威脅回應。當與 SIEM 解決方案整合時,您可以呼叫這些方法。卡巴斯基統一監控與分析平台(卡巴斯基 SIEM 解決方案)從 3.4.1 版本開始支援 EDR 威脅回應 OpenAPI。有關範例指令碼,請參閱 KUMA 文件。
若要執行 EDR 威脅回應操作,您需要建立一個請求並使用 KSC Open API (AddIncident)傳送它。處理請求後,將在卡巴斯基安全管理中心主控台中建立特殊工作。
若要在回應 EDR 威脅時建立工作,您必須在管理伺服器和卡巴斯基安全管理中心網頁主控台之間建立背景連線。背景連線服務在卡巴斯基安全管理中心 Windows 14.2 或更高版本以及卡巴斯基安全管理中心 Linux 15.2 中可用。其他主控台(包括 Kaspersky Detection and Response 解決方案的主控台)不受支援。
對於 EDR 威脅回應,您需要以 JSON 格式指定基本請求參數,例如:
task 是工作的類型(見下文)。targetHost 是必須執行指令碼的電腦的 ID。必需參數。指令碼從事件中取得此參數。responseEventIncidentArea 是執行指令碼的應用程式的名稱(例如,KUMA)。此參數會被新增到所建立工作的名稱中。要配置 EDR 威脅回應,您需要以 JSON 格式在 "KLINCDT_BODY": json.dumps(data) 參數中指定工作設定。結果,應用程式在卡巴斯基安全管理中心主控台中建立 [Response][KUMA] <task type> - <Date> <Time> - <ID>。
連線到卡巴斯基安全管理中心 OpenAPI
作為 EDR 威脅回應的一部分,該應用程式可在卡巴斯基安全管理中心主控台中建立特殊工作。建立這些工作需要在電腦和卡巴斯基安全管理中心之間建立連線。為此,必須在請求中指定卡巴斯基安全管理中心連線參數。
卡巴斯基安全管理中心連線參數
參數 |
類型 |
描述 |
|---|---|---|
|
|
卡巴斯基安全管理中心管理伺服器位址。必須參數。 |
|
|
管理員伺服器連線連接埠。必須參數。 |
|
|
用於連線到卡巴斯基安全管理中心管理伺服器的憑證檔案的路徑。預設情況下,參數被設為 |
|
|
使用者帳戶名稱。必須參數。 |
|
|
使用者帳戶密碼。必須參數。 |
範例
# KSC connection info
# reads Environment variables by default, change with corresponding values
# KSC host, string, required
kscHost = "kscHost"
# KSC port, required, default is "13299"
kscPort = "13299"
# KSC certificate file path, default is False
kscCert = False
# KSC user, string, required
kscUser = "kscUser"
# KSC password, string, required
kscPassword = "kscPassword"
server_url = 'https://' + kscHost + ':' + str(kscPort)
server = KlAkAdmServer.Create(
server_url, kscUser, kscPassword, verify=kscCert)
params = validate(args)
data = {"targetHost": <MyHost>,
"task": task,
"params": params,
"responseEventIncident": True,
"responseEventIncidentArea":"Kuma"}
oHostGroup = KlAkHostGroup(server)
incdnt = oHostGroup.AddIncident({"KLINCDT_SEVERITY": 2,
"KLINCDT_ADDED": paramDateTime(datetime.datetime.now()),
"KLINCDT_BODY": json.dumps(data),
"KLHST_WKS_HOSTNAME": args.targetHost}).RetVal()
oHostGroup.UpdateIncident(incdnt, {"KLINCDT_IS_HANDLED": False,
"KLHST_WKS_HOSTNAME": args.targetHost})
使用者帳戶資料不受保護,因此您需要指定一個單獨的使用者來執行這些操作。
獲取檔案 – getFile
獲取檔案工作設定
參數 |
類型 |
描述 |
|---|---|---|
|
|
您想要取得的檔案的 MD5 雜湊值。 |
|
|
您想要取得的檔案的 SHA256 雜湊值。 |
|
|
您想要取得的檔案的路徑。 |
範例
type getFile = {
task: 'getFile';
targetHost: string;
params: {
// an empty string or a valid md5 hash of the file
md5hash: string;
// an empty string or a valid sha256 hash of the file
sha256hash: string;
// the path to the file
path: string;
};
responseEventIncidentArea: string;
};
刪除檔案 – deleteFile
刪除檔案工作設定
參數 |
類型 |
描述 |
|---|---|---|
|
|
您要刪除的檔案的 MD5 雜湊值。 |
|
|
您要刪除的檔案的 SHA256 雜湊值。 |
|
|
您要刪除的檔案的路徑。 |
|
|
在子資料夾中搜尋要刪除的檔案。 |
範例
type deleteFile = {
task: 'deleteFile';
targetHost: string;
params: {
// an empty string or a valid md5 hash of the file
md5hash: string;
// an empty string or a valid sha256 hash of the file
sha256hash: string;
// the path to the file
path: string;
// recursive search for a file (subfolder), optional
searchInSubfolders?: boolean;
};
responseEventIncidentArea: string;
};
移動檔案到隔離區 – quarantineFile
移動檔案到隔離區工作設定
參數 |
類型 |
描述 |
|---|---|---|
|
|
您要隔離的檔案的 MD5 雜湊值。 |
|
|
您要隔離的檔案的 SHA256 雜湊值。 |
|
|
您想要隔離的檔案的路徑。 |
範例
type quarantineFile = {
task: 'quarantineFile';
targetHost: string;
params: {
// an empty string or a valid md5 hash of the file
md5hash: string;
// an empty string or a valid sha256 hash of the file
sha256hash: string;
// the path to the file
path: string;
};
responseEventIncidentArea: string;
};
IOC 掃描 – iocScan
IOC 掃描工作設定
參數 |
類型 |
描述 |
|---|---|---|
|
|
您想要用於掃描的包含 IOC 檔案的 ZIP 壓縮檔案路徑。 |
|
|
當偵測到入侵指標時將電腦與網路隔離,以防止威脅蔓延。 |
|
|
當偵測到入侵指標時執行 關鍵區域掃描工作。 |
|
|
當偵測到入侵指標時刪除惡意物件。在刪除物件之前,Kaspersky Endpoint Security 會建立備份副本以防物件以後需要還原。Kaspersky Endpoint Security 會將備份副本移動到隔離。 |
範例
type iocScan = {
task: 'iocScan';
targetHost: string;
params: {
// the path to the zip archive with ioc files in base64 encoding
ioc: string;
// isolation of the computer from the network
isolateHost: boolean;
// critical areas scan
scanCriticalAreas: boolean;
// quarantine the file
quarantineObject: boolean;
};
responseEventIncidentArea: string;
};
啟動處理程序 – startProcess
啟動處理程序工作設定
參數 |
類型 |
描述 |
|---|---|---|
|
|
用於啟動處理程序的可執行檔的路徑。 |
|
|
用於啟動處理程序的附加命令列參數。 |
|
|
處理程序工作資料夾的路徑。 |
範例
type startProcess = {
task: 'startProcess';
targetHost: string;
params: {
// the path to the file
executablePath: string;
// command line arguments, optional
arguments?: string;
// a working folder, optional
workingFolder?: string;
};
responseEventIncidentArea: string;
};
停止處理程序 – terminateProcess
停止處理程序工作設定
參數 |
類型 |
描述 |
|---|---|---|
|
|
您想要終止其處理程序的檔案的 MD5 雜湊值。 |
|
|
您想要終止其處理程序的檔案的 SHA256 雜湊值。 |
|
|
您要刪除的檔案的路徑。 |
|
|
搜尋文件時區分大小寫。 |
範例
type terminateProcess = {
task: 'terminateProcess';
targetHost: string;
params: {
// an empty string or a valid md5 hash of the file
md5hash: string;
// an empty string or a valid sha256 hash of the file
sha256hash: string;
// the path to the file
path: string;
// case sensitive of the file name
caseSensitive: boolean;
};
responseEventIncidentArea: string;
};
電腦網路隔離 – isolateHost
電腦網路隔離設定
參數 |
類型 |
描述 |
|---|---|---|
|
|
您想要取得的檔案的 MD5 雜湊值。 |
範例
type isolateHost = {
task: 'isolateHost';
targetHost: string;
params: {
// 0 - turning off network isolation, 1 - turning on network isolation
action: number;
};
responseEventIncidentArea: string;
};
執行防護 – – preventExecution
執行防護設定
參數 |
類型 |
描述 |
|---|---|---|
|
|
您想要阻止執行的檔案的 MD5 雜湊值。 |
|
|
您想要阻止執行的檔案的路徑。 |
|
|
搜尋文件時區分大小寫。 |
範例
type preventExecution = {
task: 'preventExecution';
targetHost: string;
params: {
// a valid md5 hash of the file
hash: string;
// the path to the file
path: string;
// case sensitive of the file name
caseSensitive: boolean;
};
responseEventIncidentArea: string;
};
惡意軟體掃描 – onDemandScan
惡意軟體掃描工作設定
參數 |
類型 |
描述 |
|---|---|---|
|
|
自訂掃描的檔案和資料夾的空格分隔清單。 |
|
|
遞歸掃描模式。 |
|
|
掃描範圍。 |
ScanObjectType = Enum("ScanObjectType", [ ("SystemMemory", 14), ("StartupObjectsAndRunningProcesses", 15), ("DiskBootSectors", 16), ("SystemBackupStorage", 17), ("Email", 18), ("Folder", 22), ("AllRemovableDrives", 23), ("AllNetworkDrives", 24), ("AllFixedDrives", 25)]) |
||
範例
type onDemandScan = {
task: 'onDemandScan';
targetHost: string;
// please note, this is an array
// array of scan object
params: [{
// enabling the scan object
enabled: boolean;
// an empty string or the path to the folder to scan
path: string;
// recursive scan mode
recursive: boolean;
// ID scan object
type: number;
}];
responseEventIncidentArea: string;
};
頁面頂部