更新时间:2024-07-04 GMT+08:00
分享

查入侵事件列表

功能介绍

查入侵事件列表

调用方法

请参见如何调用API

URI

GET /v5/{project_id}/event/events

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目ID

最小长度:20

最大长度:64

表2 Query参数

参数

是否必选

参数类型

描述

category

String

事件类别,包含如下:

  • host : 主机安全事件

  • container : 容器安全事件

最小长度:0

最大长度:32

enterprise_project_id

String

企业项目ID,查询所有企业项目时填写:all_granted_eps

最小长度:0

最大长度:64

last_days

Integer

查询时间范围天数,与自定义查询时间begin_time,end_time互斥

最小值:1

最大值:30

host_name

String

服务器名称

最小长度:1

最大长度:64

host_id

String

主机ID

最小长度:0

最大长度:64

private_ip

String

服务器私有IP

最小长度:1

最大长度:256

public_ip

String

服务器公网IP

最小长度:1

最大长度:256

container_name

String

容器实例名称

offset

Integer

偏移量:指定返回记录的开始位置

最小值:0

最大值:2000000

缺省值:0

limit

Integer

每页显示个数

最小值:10

最大值:1000

缺省值:10

event_types

Array

事件类型,包含如下:

  • 1001 : 通用恶意软件

  • 1002 : 病毒

  • 1003 : 蠕虫

  • 1004 : 木马

  • 1005 : 僵尸网络

  • 1006 : 后门

  • 1010 : Rootkit

  • 1011 : 勒索软件

  • 1012 :黑客工具

  • 1015 : Webshell

  • 1016 : 挖矿

  • 1017 : 反弹Shell

  • 2001 : 一般漏洞利用

  • 2012 : 远程代码执行

  • 2047 : Redis漏洞利用

  • 2048 : Hadoop漏洞利用

  • 2049 : MySQL漏洞利用

  • 3002 : 文件提权

  • 3003 : 进程提权

  • 3004 : 关键文件变更

  • 3005 : 文件/目录变更

  • 3007 : 进程异常行为

  • 3015 : 高危命令执行

  • 3018 : 异常Shell

  • 3026 : crontab提权

  • 3027 : Crontab可疑任务

  • 3029 :系统安全防护被禁用

  • 3030 :备份删除

  • 3031 :异常注册表操作

  • 3036 : 容器镜像阻断

  • 4002 : 暴力破解

  • 4004 : 异常登录

  • 4006 : 非法系统账号

  • 4014 : 用户账号添加

  • 4020 : 用户密码窃取

  • 6002 : 端口扫描

  • 6003 : 主机扫描

  • 13001 : Kubernetes事件删除

  • 13002 : Pod异常行为

  • 13003 : 枚举用户信息

  • 13004 : 绑定集群用户角色

最小值:1000

最大值:30000

数组长度:1 - 500

handle_status

String

处置状态,包含如下:

  • unhandled :未处理

  • handled : 已处理

最小长度:1

最大长度:32

severity

String

威胁等级,包含如下:

  • Security :安全

  • Low : 低危

  • Medium : 中危

  • High : 高危

  • Critical : 危急

最小长度:1

最大长度:32

begin_time

String

自定义查询时间,与查询时间范围天数互斥,查询时间段的起始时间,毫秒级时间戳,end_time减去begin_time小于等于2天,与查询时间范围天数互斥

最小长度:13

最大长度:13

end_time

String

自定义时间,查询时间段的终止时间,毫秒级时间戳,end_time减去begin_time小于等于2天,与查询时间范围天数互斥

最小长度:13

最大长度:13

event_class_ids

Array

事件标识,包含如下:

  • container_1001 : 容器命名空间

  • container_1002 : 容器开放端口

  • container_1003 : 容器安全选项

  • container_1004 : 容器挂载目录

  • containerescape_0001 : 容器高危系统调用

  • containerescape_0002 : Shocker攻击

  • containerescape_0003 : DirtCow攻击

  • containerescape_0004 : 容器文件逃逸攻击

  • dockerfile_001 : 用户自定义容器保护文件被修改

  • dockerfile_002 : 容器文件系统可执行文件被修改

  • dockerproc_001 : 容器进程异常事件上报

  • fileprotect_0001 : 文件提权

  • fileprotect_0002 : 关键文件变更

  • fileprotect_0003 : 关键文件路径变更

  • fileprotect_0004 : 文件/目录变更

  • av_1002 : 病毒

  • av_1003 : 蠕虫

  • av_1004 : 木马

  • av_1005 : 僵尸网络

  • av_1006 : 后门

  • av_1007 : 间谍软件

  • av_1008 : 恶意广告软件

  • av_1009 : 钓鱼

  • av_1010 : Rootkit

  • av_1011 : 勒索软件

  • av_1012 : 黑客工具

  • av_1013 : 灰色软件

  • av_1015 : Webshell

  • av_1016 : 挖矿软件

  • login_0001 : 尝试暴力破解

  • login_0002 : 爆破成功

  • login_1001 : 登录成功

  • login_1002 : 异地登录

  • login_1003 : 弱口令

  • malware_0001 : shell变更事件上报

  • malware_0002 : 反弹shell事件上报

  • malware_1001 : 恶意程序

  • procdet_0001 : 进程异常行为检测

  • procdet_0002 : 进程提权

  • crontab_0001 : crontab脚本提权

  • crontab_0002 : 恶意路径提权

  • procreport_0001 : 危险命令

  • user_1001 : 账号变更

  • user_1002 : 风险账号

  • vmescape_0001 : 虚拟机敏感命令执行

  • vmescape_0002 : 虚拟化进程访问敏感文件

  • vmescape_0003 : 虚拟机异常端口访问

  • webshell_0001 : 网站后门

  • network_1001 : 恶意挖矿

  • network_1002 : 对外DDoS攻击

  • network_1003 : 恶意扫描

  • network_1004 : 敏感区域攻击

  • ransomware_0001 : 勒索攻击

  • ransomware_0002 : 勒索攻击

  • ransomware_0003 : 勒索攻击

  • fileless_0001 : 进程注入

  • fileless_0002 : 动态库注入进程

  • fileless_0003 : 关键配置变更

  • fileless_0004 : 环境变量变更

  • fileless_0005 : 内存文件进程

  • fileless_0006 : vdso劫持

  • crontab_1001 : Crontab可疑任务

  • vul_exploit_0001 : Redis漏洞利用攻击

  • vul_exploit_0002 : Hadoop漏洞利用攻击

  • vul_exploit_0003 : MySQL漏洞利用攻击

  • rootkit_0001 : 可疑rootkit文件

  • rootkit_0002 : 可疑内核模块

  • RASP_0004 : 上传Webshell

  • RASP_0018 : 无文件Webshell

  • blockexec_001 : 已知勒索攻击

  • hips_0001 : Windows Defender防护被禁用

  • hips_0002 : 可疑的黑客工具

  • hips_0003 : 可疑的勒索加密行为

  • hips_0004 : 隐藏账号创建

  • hips_0005 : 读取用户密码凭据

  • hips_0006 : 可疑的SAM文件导出

  • hips_0007 : 可疑shadow copy删除操作

  • hips_0008 : 备份文件删除

  • hips_0009 : 可疑勒索病毒操作注册表

  • hips_0010 : 可疑的异常进程行为

  • hips_0011 : 可疑的扫描探测

  • hips_0012 : 可疑的勒索病毒脚本运行

  • hips_0013 : 可疑的挖矿命令执行

  • hips_0014 : 可疑的禁用windows安全中心

  • hips_0015 : 可疑的停止防火墙服务行为

  • hips_0016 : 可疑的系统自动恢复禁用

  • hips_0017 : Offies 创建可执行文件

  • hips_0018 : 带宏Offies文件异常创建

  • hips_0019 : 可疑的注册表操作

  • hips_0020 : Confluence远程代码执行

  • hips_0021 : MSDT远程代码执行

  • portscan_0001 : 通用端口扫描

  • portscan_0002 : 秘密端口扫描

  • k8s_1001 : Kubernetes事件删除

  • k8s_1002 : 创建特权Pod

  • k8s_1003 : Pod中使用交互式shell

  • k8s_1004 : 创建敏感目录Pod

  • k8s_1005 : 创建主机网络的Pod

  • k8s_1006 : 创建主机Pid空间的Pod

  • k8s_1007 : 普通pod访问APIserver认证失败

  • k8s_1008 : 普通Pod通过Curl访问APIServer

  • k8s_1009 : 系统管理空间执行exec

  • k8s_1010 : 系统管理空间创建Pod

  • k8s_1011 : 创建静态Pod

  • k8s_1012 : 创建DaemonSet

  • k8s_1013 : 创建集群计划任务

  • k8s_1014 : Secrets操作

  • k8s_1015 : 枚举用户可执行的操作

  • k8s_1016 : 高权限RoleBinding或ClusterRoleBinding

  • k8s_1017 : ServiceAccount创建

  • k8s_1018 : 创建Cronjob

  • k8s_1019 : Pod中exec使用交互式shell

  • k8s_1020 : 无权限访问Apiserver

  • k8s_1021 : 使用curl访问APIServer

  • k8s_1022 : Ingress漏洞

  • k8s_1023 : 中间人攻击

  • k8s_1024 : 蠕虫挖矿木马

  • k8s_1025 : K8s事件删除

  • k8s_1026 : SelfSubjectRulesReview场景

  • imgblock_0001 : 镜像白名单阻断

  • imgblock_0002 : 镜像黑名单阻断

  • imgblock_0003 : 镜像标签白名单阻断

  • imgblock_0004 : 镜像标签黑名单阻断

  • imgblock_0005 : 创建容器白名单阻断

  • imgblock_0006 : 创建容器黑名单阻断

  • imgblock_0007 : 容器mount proc阻断

  • imgblock_0008 : 容器seccomp unconfined阻断

  • imgblock_0009 : 容器特权阻断

  • imgblock_0010 : 容器capabilities阻断

数组长度:1 - 200

severity_list

Array

威胁等级,包含如下:

  • Security :安全

  • Low : 低危

  • Medium : 中危

  • High : 高危

  • Critical : 危急

最小长度:0

最大长度:32

数组长度:0 - 5

attack_tag

String

攻击标识,包含如下:

  • attack_success : 攻击成功

  • attack_attempt : 攻击尝试

  • attack_blocked : 攻击被阻断

  • abnormal_behavior : 异常行为

  • collapsible_host : 主机失陷

  • system_vulnerability : 系统脆弱性

最小长度:0

最大长度:32

asset_value

String

资产重要性,包含如下3种

  • important :重要资产

  • common :一般资产

  • test :测试资产

最小长度:0

最大长度:128

tag_list

Array

事件标签列表,例如:["热点事件"]

最小长度:0

最大长度:10

数组长度:0 - 20

att_ck

String

ATT&CK攻击阶,包含如下:

  • Reconnaissance : 侦察

  • Initial Access : 初始访问

  • Execution : 执行

  • Persistence : 持久化

  • Privilege Escalation : 权限提升

  • Defense Evasion : 防御绕过

  • Credential Access : 凭据访问

  • Command and Control : 命令与控制

  • Impact : 影响破坏

最小长度:0

最大长度:32

event_name

String

告警名称

最小长度:1

最大长度:128

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)

最小长度:1

最大长度:32768

region

String

Region ID

最小长度:0

最大长度:128

响应参数

状态码: 200

表4 响应Body参数

参数

参数类型

描述

total_num

Integer

告警事件总数

最小值:0

最大值:2147483647

data_list

Array of EventManagementResponseInfo objects

事件列表详情

数组长度:0 - 1000

表5 EventManagementResponseInfo

参数

参数类型

描述

event_id

String

事件编号

event_class_id

String

事件分类,包含如下:

  • container_1001 : 容器命名空间

  • container_1002 : 容器开放端口

  • container_1003 : 容器安全选项

  • container_1004 : 容器挂载目录

  • containerescape_0001 : 容器高危系统调用

  • containerescape_0002 : Shocker攻击

  • containerescape_0003 : DirtCow攻击

  • containerescape_0004 : 容器文件逃逸攻击

  • dockerfile_001 : 用户自定义容器保护文件被修改

  • dockerfile_002 : 容器文件系统可执行文件被修改

  • dockerproc_001 : 容器进程异常事件上报

  • fileprotect_0001 : 文件提权

  • fileprotect_0002 : 关键文件变更

  • fileprotect_0003 : 关键文件路径变更

  • fileprotect_0004 : 文件/目录变更

  • av_1002 : 病毒

  • av_1003 : 蠕虫

  • av_1004 : 木马

  • av_1005 : 僵尸网络

  • av_1006 : 后门

  • av_1007 : 间谍软件

  • av_1008 : 恶意广告软件

  • av_1009 : 钓鱼

  • av_1010 : Rootkit

  • av_1011 : 勒索软件

  • av_1012 : 黑客工具

  • av_1013 : 灰色软件

  • av_1015 : Webshell

  • av_1016 : 挖矿软件

  • login_0001 : 尝试暴力破解

  • login_0002 : 爆破成功

  • login_1001 : 登录成功

  • login_1002 : 异地登录

  • login_1003 : 弱口令

  • malware_0001 : shell变更事件上报

  • malware_0002 : 反弹shell事件上报

  • malware_1001 : 恶意程序

  • procdet_0001 : 进程异常行为检测

  • procdet_0002 : 进程提权

  • procreport_0001 : 危险命令

  • user_1001 : 账号变更

  • user_1002 : 风险账号

  • vmescape_0001 : 虚拟机敏感命令执行

  • vmescape_0002 : 虚拟化进程访问敏感文件

  • vmescape_0003 : 虚拟机异常端口访问

  • webshell_0001 : 网站后门

  • network_1001 : 恶意挖矿

  • network_1002 : 对外DDoS攻击

  • network_1003 : 恶意扫描

  • network_1004 : 敏感区域攻击

  • ransomware_0001 : 勒索攻击

  • ransomware_0002 : 勒索攻击

  • ransomware_0003 : 勒索攻击

  • fileless_0001 : 进程注入

  • fileless_0002 : 动态库注入进程

  • fileless_0003 : 关键配置变更

  • fileless_0004 : 环境变量变更

  • fileless_0005 : 内存文件进程

  • fileless_0006 : vdso劫持

  • crontab_1001 : Crontab可疑任务

  • vul_exploit_0001 : Redis漏洞利用攻击

  • vul_exploit_0002 : Hadoop漏洞利用攻击

  • vul_exploit_0003 : MySQL漏洞利用攻击

  • rootkit_0001 : 可疑rootkit文件

  • rootkit_0002 : 可疑内核模块

  • RASP_0004 : 上传Webshell

  • RASP_0018 : 无文件Webshell

  • blockexec_001 : 已知勒索攻击

  • hips_0001 : Windows Defender防护被禁用

  • hips_0002 : 可疑的黑客工具

  • hips_0003 : 可疑的勒索加密行为

  • hips_0004 : 隐藏账号创建

  • hips_0005 : 读取用户密码凭据

  • hips_0006 : 可疑的SAM文件导出

  • hips_0007 : 可疑shadow copy删除操作

  • hips_0008 : 备份文件删除

  • hips_0009 : 可疑勒索病毒操作注册表

  • hips_0010 : 可疑的异常进程行为

  • hips_0011 : 可疑的扫描探测

  • hips_0012 : 可疑的勒索病毒脚本运行

  • hips_0013 : 可疑的挖矿命令执行

  • hips_0014 : 可疑的禁用windows安全中心

  • hips_0015 : 可疑的停止防火墙服务行为

  • hips_0016 : 可疑的系统自动恢复禁用

  • hips_0017 : Offies 创建可执行文件

  • hips_0018 : 带宏Offies文件异常创建

  • hips_0019 : 可疑的注册表操作

  • hips_0020 : Confluence远程代码执行

  • hips_0021 : MSDT远程代码执行

  • portscan_0001 : 通用端口扫描

  • portscan_0002 : 秘密端口扫描

  • k8s_1001 : Kubernetes事件删除

  • k8s_1002 : 创建特权Pod

  • k8s_1003 : Pod中使用交互式shell

  • k8s_1004 : 创建敏感目录Pod

  • k8s_1005 : 创建主机网络的Pod

  • k8s_1006 : 创建主机Pid空间的Pod

  • k8s_1007 : 普通pod访问APIserver认证失败

  • k8s_1008 : 普通Pod通过Curl访问APIServer

  • k8s_1009 : 系统管理空间执行exec

  • k8s_1010 : 系统管理空间创建Pod

  • k8s_1011 : 创建静态Pod

  • k8s_1012 : 创建DaemonSet

  • k8s_1013 : 创建集群计划任务

  • k8s_1014 : Secrets操作

  • k8s_1015 : 枚举用户可执行的操作

  • k8s_1016 : 高权限RoleBinding或ClusterRoleBinding

  • k8s_1017 : ServiceAccount创建

  • k8s_1018 : 创建Cronjob

  • k8s_1019 : Pod中exec使用交互式shell

  • k8s_1020 : 无权限访问Apiserver

  • k8s_1021 : 使用curl访问APIServer

  • k8s_1022 : Ingress漏洞

  • k8s_1023 : 中间人攻击

  • k8s_1024 : 蠕虫挖矿木马

  • k8s_1025 : K8s事件删除

  • k8s_1026 : SelfSubjectRulesReview场景

  • imgblock_0001 : 镜像白名单阻断

  • imgblock_0002 : 镜像黑名单阻断

  • imgblock_0003 : 镜像标签白名单阻断

  • imgblock_0004 : 镜像标签黑名单阻断

  • imgblock_0005 : 创建容器白名单阻断

  • imgblock_0006 : 创建容器黑名单阻断

  • imgblock_0007 : 容器mount proc阻断

  • imgblock_0008 : 容器seccomp unconfined阻断

  • imgblock_0009 : 容器特权阻断

  • imgblock_0010 : 容器capabilities阻断

event_type

Integer

事件类型,包含如下:

  • 1001 : 通用恶意软件

  • 1002 : 病毒

  • 1003 : 蠕虫

  • 1004 : 木马

  • 1005 : 僵尸网络

  • 1006 : 后门

  • 1010 : Rootkit

  • 1011 : 勒索软件

  • 1012 :黑客工具

  • 1015 : Webshell

  • 1016 : 挖矿

  • 1017 : 反弹Shell

  • 2001 : 一般漏洞利用

  • 2012 : 远程代码执行

  • 2047 : Redis漏洞利用

  • 2048 : Hadoop漏洞利用

  • 2049 : MySQL漏洞利用

  • 3002 : 文件提权

  • 3003 : 进程提权

  • 3004 : 关键文件变更

  • 3005 : 文件/目录变更

  • 3007 : 进程异常行为

  • 3015 : 高危命令执行

  • 3018 : 异常Shell

  • 3027 : Crontab可疑任务

  • 3029 :系统安全防护被禁用

  • 3030 :备份删除

  • 3031 :异常注册表操作

  • 3036 : 容器镜像阻断

  • 4002 : 暴力破解

  • 4004 : 异常登录

  • 4006 : 非法系统账号

  • 4014 : 用户账号添加

  • 4020 : 用户密码窃取

  • 6002 : 端口扫描

  • 6003 : 主机扫描

  • 13001 : Kubernetes事件删除

  • 13002 : Pod异常行为

  • 13003 : 枚举用户信息

  • 13004 : 绑定集群用户角色

event_name

String

事件名称

severity

String

威胁等级,包含如下:

  • Security : 安全

  • Low : 低危

  • Medium : 中危

  • High : 高危

  • Critical : 危急

container_name

String

容器实例名称,只有容器类型的告警有

image_name

String

镜像名称,只有容器类型的告警有

host_name

String

服务器名称

host_id

String

主机ID

private_ip

String

服务器私有IP

public_ip

String

弹性公网IP地址

os_type

String

操作系统类型,包含如下2种。

  • Linux :Linux。

  • Windows :Windows。

host_status

String

服务器状态,包含如下4种。

  • ACTIVE :运行中。

  • SHUTOFF :关机。

  • BUILDING :创建中。

  • ERROR :故障。

最小长度:1

最大长度:32

agent_status

String

Agent状态,包含如下5种。

  • installed :已安装。

  • not_installed :未安装。

  • online :在线。

  • offline :离线。

  • install_failed :安装失败。

  • installing :安装中。

最小长度:1

最大长度:32

protect_status

String

防护状态,包含如下2种。

  • closed :未防护。

  • opened :防护中。

最小长度:1

最大长度:32

asset_value

String

资产重要性,包含如下4种

  • important :重要资产

  • common :一般资产

  • test :测试资产

最小长度:0

最大长度:128

attack_phase

String

攻击阶段,包含如下:

  • reconnaissance : 侦查跟踪

  • weaponization : 武器构建

  • delivery : 载荷投递

  • exploit : 漏洞利用

  • installation : 安装植入

  • command_and_control : 命令与控制

  • actions : 目标达成

attack_tag

String

攻击标识,包含如下:

  • attack_success : 攻击成功

  • attack_attempt : 攻击尝试

  • attack_blocked : 攻击被阻断

  • abnormal_behavior : 异常行为

  • collapsible_host : 主机失陷

  • system_vulnerability : 系统脆弱性

occur_time

Integer

发生时间,毫秒

handle_time

Integer

处理时间,毫秒,已处理的告警才有

handle_status

String

处理状态,包含如下:

  • unhandled :未处理

  • handled : 已处理

handle_method

String

处理方式,已处理的告警才有,包含如下:

  • mark_as_handled : 手动处理

  • ignore : 忽略

  • add_to_alarm_whitelist : 加入告警白名单

  • add_to_login_whitelist : 加入登录白名单

  • isolate_and_kill : 隔离查杀

handler

String

备注信息,已处理的告警才有

operate_accept_list

Array of strings

支持的处理操作

operate_detail_list

Array of EventDetailResponseInfo objects

操作详情信息列表(页面不展示)

数组长度:0 - 100

forensic_info

Object

取证信息,json格式

resource_info

EventResourceResponseInfo object

资源信息

geo_info

Object

地理位置信息,json格式

malware_info

Object

恶意软件信息,json格式

network_info

Object

网络信息,json格式

app_info

Object

应用信息,json格式

system_info

Object

系统信息,json格式

extend_info

Object

事件扩展信息,json格式

recommendation

String

处置建议

description

String

告警说明

最小长度:0

最大长度:1024

event_abstract

String

告警摘要

最小长度:0

最大长度:512

process_info_list

Array of EventProcessResponseInfo objects

进程信息列表

数组长度:0 - 100

user_info_list

Array of EventUserResponseInfo objects

用户信息列表

数组长度:0 - 100

file_info_list

Array of EventFileResponseInfo objects

文件信息列表

数组长度:0 - 100

event_details

String

事件信息的简述

最小长度:0

最大长度:204800

tag_list

Array of strings

标签列表

最小长度:0

最大长度:10

数组长度:0 - 20

event_count

Integer

事件发生次数

最小值:0

最大值:2147483647

表6 EventDetailResponseInfo

参数

参数类型

描述

agent_id

String

Agent ID

process_pid

Integer

进程id

is_parent

Boolean

是否是父进程

file_hash

String

文件哈希

file_path

String

文件路径

file_attr

String

文件属性

private_ip

String

服务器私有IP

login_ip

String

登录源IP

login_user_name

String

登录用户名

keyword

String

告警事件关键字,仅用于告警白名单

hash

String

告警事件hash,仅用于告警白名单

表7 EventResourceResponseInfo

参数

参数类型

描述

domain_id

String

租户账号ID

project_id

String

项目ID

enterprise_project_id

String

企业项目ID

region_name

String

Region名称

vpc_id

String

VPC ID

cloud_id

String

云主机ID

vm_name

String

虚拟机名称

vm_uuid

String

虚拟机UUID,即主机ID

container_id

String

容器ID

container_status

String

容器状态

pod_uid

String

pod uid

pod_name

String

pod name

namespace

String

namespace

cluster_id

String

集群id

cluster_name

String

集群名称

image_id

String

镜像ID

image_name

String

镜像名称

host_attr

String

主机属性

service

String

业务服务

micro_service

String

微服务

sys_arch

String

系统CPU架构

os_bit

String

操作系统位数

os_type

String

操作系统类型

os_name

String

操作系统名称

os_version

String

操作系统版本

表8 EventProcessResponseInfo

参数

参数类型

描述

process_name

String

进程名称

process_path

String

进程文件路径

process_pid

Integer

进程id

最小值:0

最大值:2147483647

process_uid

Integer

进程用户id

最小值:0

最大值:2147483647

process_username

String

运行进程的用户名

process_cmdline

String

进程文件命令行

process_filename

String

进程文件名

process_start_time

Long

进程启动时间

最小值:0

最大值:9223372036854775807

process_gid

Integer

进程组ID

最小值:0

最大值:2147483647

process_egid

Integer

进程有效组ID

最小值:0

最大值:2147483647

process_euid

Integer

进程有效用户ID

最小值:0

最大值:2147483647

ancestor_process_path

String

祖父进程文件路径

ancestor_process_pid

Integer

祖父进程id

最小值:0

最大值:2147483647

ancestor_process_cmdline

String

祖父进程文件命令行

parent_process_name

String

父进程名称

parent_process_path

String

父进程文件路径

parent_process_pid

Integer

父进程id

最小值:0

最大值:2147483647

parent_process_uid

Integer

父进程用户id

最小值:0

最大值:2147483647

parent_process_cmdline

String

父进程文件命令行

parent_process_filename

String

父进程文件名

parent_process_start_time

Long

父进程启动时间

最小值:0

最大值:9223372036854775807

parent_process_gid

Integer

父进程组ID

最小值:0

最大值:2147483647

parent_process_egid

Integer

父进程有效组ID

最小值:0

最大值:2147483647

parent_process_euid

Integer

父进程有效用户ID

最小值:0

最大值:2147483647

child_process_name

String

子进程名称

child_process_path

String

子进程文件路径

child_process_pid

Integer

子进程id

最小值:0

最大值:2147483647

child_process_uid

Integer

子进程用户id

最小值:0

最大值:2147483647

child_process_cmdline

String

子进程文件命令行

child_process_filename

String

子进程文件名

child_process_start_time

Long

子进程启动时间

最小值:0

最大值:9223372036854775807

child_process_gid

Integer

子进程组ID

最小值:0

最大值:2147483647

child_process_egid

Integer

子进程有效组ID

最小值:0

最大值:2147483647

child_process_euid

Integer

子进程有效用户ID

最小值:0

最大值:2147483647

virt_cmd

String

虚拟化命令

virt_process_name

String

虚拟化进程名称

escape_mode

String

逃逸方式

escape_cmd

String

逃逸后后执行的命令

process_hash

String

进程启动文件hash

process_file_hash

String

进程文件hash

parent_process_file_hash

String

父进程文件hash

block

Integer

是否阻断成功,1阻断成功 0阻断失败

最小值:0

最大值:1

表9 EventUserResponseInfo

参数

参数类型

描述

user_id

Integer

用户uid

最小值:0

最大值:2147483647

user_gid

Integer

用户gid

最小值:0

最大值:2147483647

user_name

String

用户名称

user_group_name

String

用户组名称

user_home_dir

String

用户home目录

login_ip

String

用户登录ip

service_type

String

服务类型,包含如下:

  • system

  • mysql

  • redis

service_port

Integer

登录服务端口

最小值:0

最大值:2147483647

login_mode

Integer

登录方式

最小值:0

最大值:2147483647

login_last_time

Long

用户最后一次登录时间

最小值:0

最大值:9223372036854775807

login_fail_count

Integer

用户登录失败次数

最小值:0

最大值:2147483647

pwd_hash

String

口令hash

pwd_with_fuzzing

String

匿名化处理后的口令

pwd_used_days

Integer

密码使用的天数

最小值:0

最大值:2147483647

pwd_min_days

Integer

口令的最短有效期限

最小值:0

最大值:2147483647

pwd_max_days

Integer

口令的最长有效期限

最小值:0

最大值:2147483647

pwd_warn_left_days

Integer

口令无效时提前告警天数

最小值:0

最大值:2147483647

表10 EventFileResponseInfo

参数

参数类型

描述

file_path

String

文件路径

file_alias

String

文件别名

file_size

Integer

文件大小

最小值:0

最大值:2147483647

file_mtime

Long

文件最后一次修改时间

最小值:0

最大值:9223372036854775807

file_atime

Long

文件最后一次访问时间

最小值:0

最大值:9223372036854775807

file_ctime

Long

文件最后一次状态改变时间

最小值:0

最大值:9223372036854775807

file_hash

String

文件hash,当前为sha256

file_md5

String

文件md5

file_sha256

String

文件sha256

file_type

String

文件类型

file_content

String

文件内容

file_attr

String

文件属性

file_operation

Integer

文件操作类型

最小值:0

最大值:2147483647

file_action

String

文件动作

file_change_attr

String

变更前后的属性

file_new_path

String

新文件路径

file_desc

String

文件描述

file_key_word

String

文件关键字

is_dir

Boolean

是否目录

fd_info

String

文件句柄信息

fd_count

Integer

文件句柄数量

最小值:0

最大值:2147483647

请求示例

查询前50条企业项目为xxx下未处理的主机事件信息

GET https://{endpoint}/v5/{project_id}/event/events?offset=0&limit=50&handle_status=unhandled&category=host&enterprise_project_id=xxx

响应示例

状态码: 200

入侵事件列表

{
  "total_num" : 1,
  "data_list" : [ {
    "attack_phase" : "exploit",
    "attack_tag" : "abnormal_behavior",
    "event_class_id" : "lgin_1002",
    "event_id" : "d8a12cf7-6a43-4cd6-92b4-aabf1e917",
    "event_name" : "different locations",
    "event_type" : 4004,
    "forensic_info" : {
      "country" : "中国",
      "city" : "兰州市",
      "ip" : "127.0.0.1",
      "user" : "zhangsan",
      "sub_division" : "甘肃省",
      "city_id" : 3110
    },
    "handle_status" : "unhandled",
    "host_name" : "xxx",
    "occur_time" : 1661593036627,
    "operate_accept_list" : [ "ignore" ],
    "operate_detail_list" : [ {
      "agent_id" : "c9bed5397db449ebdfba15e85fcfc36accee125c68954daf5cab0528bab59bd8",
      "file_hash" : "e8b50f0b91e3dce0885ccc5902846b139d28108a0a7976c9b8d43154c5dbc44d",
      "file_path" : "/usr/test",
      "process_pid" : 3123,
      "file_attr" : 33261,
      "keyword" : "file_path=/usr/test",
      "hash" : "e8b50f0b91e3dce0885ccc5902846b139d28108a0a7976c9b8d43154c5dbc44d",
      "login_ip" : "127.0.0.1",
      "private_ip" : "127.0.0.2",
      "login_user_name" : "root",
      "is_parent" : false
    } ],
    "private_ip" : "127.0.0.1",
    "resource_info" : {
      "region_name" : "",
      "project_id" : "",
      "enterprise_project_id" : "0",
      "os_type" : "Linux",
      "os_version" : "2.5",
      "vm_name" : "",
      "vm_uuid" : "71a15ecc",
      "cloud_id" : "",
      "container_id" : "",
      "container_status" : "running / terminated",
      "image_id" : "",
      "pod_uid" : "",
      "pod_name" : "",
      "namespace" : "",
      "cluster_id" : "",
      "cluster_name" : ""
    },
    "severity" : "Medium",
    "extend_info" : "",
    "os_type" : "Linux",
    "agent_status" : "online",
    "asset_value" : "common",
    "protect_status" : "opened",
    "host_status" : "ACTIVE",
    "event_details" : "file_path:/root/test",
    "user_info_list" : [ {
      "login_ip" : "",
      "service_port" : 22,
      "service_type" : "ssh",
      "user_name" : "zhangsan",
      "login_mode" : 0,
      "login_last_time" : 1661593024,
      "login_fail_count" : 0
    } ],
    "process_info_list" : [ {
      "process_path" : "/root/test",
      "process_name" : "test",
      "process_cmdline" : "/bin/bash",
      "process_hash" : "e8b50f0b91e3dce0885ccc5902846b139d28108a0a7976c9b8d43154c5dbc44d",
      "process_filename" : "test",
      "process_file_hash" : "e8b50f0b91e3dce0885ccc5902846b139d28108a0a7976c9b8d43154c5dbc44d",
      "process_username" : "root",
      "process_pid" : 372612,
      "process_uid" : 10000,
      "process_gid" : 10000,
      "process_egid" : 10000,
      "process_euid" : 10000,
      "process_start_time" : 1661593024,
      "block" : 0,
      "parent_process_path" : "/usr/bin/bash",
      "parent_process_name" : "test",
      "parent_process_cmdline" : "/bin/bash",
      "parent_process_filename" : "test",
      "parent_process_file_hash" : "e8b50f0b91e3dce0885ccc5902846b139d28108a0a7976c9b8d43154c5dbc44d",
      "parent_process_pid" : 372612,
      "parent_process_uid" : 10000,
      "parent_process_gid" : 10000,
      "parent_process_egid" : 10000,
      "parent_process_euid" : 10000,
      "parent_process_start_time" : 1661593024,
      "child_process_path" : "/usr/bin/bash",
      "child_process_name" : "test",
      "child_process_cmdline" : "/bin/bash",
      "child_process_filename" : "test",
      "child_process_pid" : 372612,
      "child_process_uid" : 10000,
      "child_process_gid" : 10000,
      "child_process_egid" : 10000,
      "child_process_euid" : 10000,
      "child_process_start_time" : 1661593024,
      "virt_process_name" : "test",
      "virt_cmd" : "/bin/bash",
      "escape_cmd" : "/bin/bash",
      "escape_mode" : "0",
      "ancestor_process_pid" : 372612,
      "ancestor_process_cmdline" : "/bin/bash",
      "ancestor_process_path" : "/usr/bin/bash"
    } ],
    "description" : "",
    "event_abstract" : "",
    "tag_list" : [ "热点事件" ]
  } ]
}

SDK代码示例

SDK代码示例如下。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package com.huaweicloud.sdk.test;

import com.huaweicloud.sdk.core.auth.ICredential;
import com.huaweicloud.sdk.core.auth.BasicCredentials;
import com.huaweicloud.sdk.core.exception.ConnectionException;
import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
import com.huaweicloud.sdk.core.exception.ServiceResponseException;
import com.huaweicloud.sdk.hss.v5.region.HssRegion;
import com.huaweicloud.sdk.hss.v5.*;
import com.huaweicloud.sdk.hss.v5.model.*;

import java.util.List;
import java.util.ArrayList;

public class ListSecurityEventsSolution {

    public static void main(String[] args) {
        // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
        // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
        String ak = System.getenv("CLOUD_SDK_AK");
        String sk = System.getenv("CLOUD_SDK_SK");

        ICredential auth = new BasicCredentials()
                .withAk(ak)
                .withSk(sk);

        HssClient client = HssClient.newBuilder()
                .withCredential(auth)
                .withRegion(HssRegion.valueOf("<YOUR REGION>"))
                .build();
        ListSecurityEventsRequest request = new ListSecurityEventsRequest();
        request.withCategory("<category>");
        request.withEnterpriseProjectId("<enterprise_project_id>");
        request.withLastDays(<last_days>);
        request.withHostName("<host_name>");
        request.withHostId("<host_id>");
        request.withPrivateIp("<private_ip>");
        request.withPublicIp("<public_ip>");
        request.withContainerName("<container_name>");
        request.withOffset(<offset>);
        request.withLimit(<limit>);
        request.withEventTypes();
        request.withHandleStatus("<handle_status>");
        request.withSeverity("<severity>");
        request.withBeginTime("<begin_time>");
        request.withEndTime("<end_time>");
        request.withEventClassIds();
        request.withSeverityList();
        request.withAttackTag("<attack_tag>");
        request.withAssetValue("<asset_value>");
        request.withTagList();
        request.withAttCk("<att_ck>");
        request.withEventName("<event_name>");
        try {
            ListSecurityEventsResponse response = client.listSecurityEvents(request);
            System.out.println(response.toString());
        } catch (ConnectionException e) {
            e.printStackTrace();
        } catch (RequestTimeoutException e) {
            e.printStackTrace();
        } catch (ServiceResponseException e) {
            e.printStackTrace();
            System.out.println(e.getHttpStatusCode());
            System.out.println(e.getRequestId());
            System.out.println(e.getErrorCode());
            System.out.println(e.getErrorMsg());
        }
    }
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# coding: utf-8

import os
from huaweicloudsdkcore.auth.credentials import BasicCredentials
from huaweicloudsdkhss.v5.region.hss_region import HssRegion
from huaweicloudsdkcore.exceptions import exceptions
from huaweicloudsdkhss.v5 import *

if __name__ == "__main__":
    # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
    # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
    ak = os.environ["CLOUD_SDK_AK"]
    sk = os.environ["CLOUD_SDK_SK"]

    credentials = BasicCredentials(ak, sk)

    client = HssClient.new_builder() \
        .with_credentials(credentials) \
        .with_region(HssRegion.value_of("<YOUR REGION>")) \
        .build()

    try:
        request = ListSecurityEventsRequest()
        request.category = "<category>"
        request.enterprise_project_id = "<enterprise_project_id>"
        request.last_days = <last_days>
        request.host_name = "<host_name>"
        request.host_id = "<host_id>"
        request.private_ip = "<private_ip>"
        request.public_ip = "<public_ip>"
        request.container_name = "<container_name>"
        request.offset = <offset>
        request.limit = <limit>
        request.event_types = 
        request.handle_status = "<handle_status>"
        request.severity = "<severity>"
        request.begin_time = "<begin_time>"
        request.end_time = "<end_time>"
        request.event_class_ids = 
        request.severity_list = 
        request.attack_tag = "<attack_tag>"
        request.asset_value = "<asset_value>"
        request.tag_list = 
        request.att_ck = "<att_ck>"
        request.event_name = "<event_name>"
        response = client.list_security_events(request)
        print(response)
    except exceptions.ClientRequestException as e:
        print(e.status_code)
        print(e.request_id)
        print(e.error_code)
        print(e.error_msg)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package main

import (
	"fmt"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
    hss "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/hss/v5"
	"github.com/huaweicloud/huaweicloud-sdk-go-v3/services/hss/v5/model"
    region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/hss/v5/region"
)

func main() {
    // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
    // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
    ak := os.Getenv("CLOUD_SDK_AK")
    sk := os.Getenv("CLOUD_SDK_SK")

    auth := basic.NewCredentialsBuilder().
        WithAk(ak).
        WithSk(sk).
        Build()

    client := hss.NewHssClient(
        hss.HssClientBuilder().
            WithRegion(region.ValueOf("<YOUR REGION>")).
            WithCredential(auth).
            Build())

    request := &model.ListSecurityEventsRequest{}
	request.Category = "<category>"
	enterpriseProjectIdRequest:= "<enterprise_project_id>"
	request.EnterpriseProjectId = &enterpriseProjectIdRequest
	lastDaysRequest:= int32(<last_days>)
	request.LastDays = &lastDaysRequest
	hostNameRequest:= "<host_name>"
	request.HostName = &hostNameRequest
	hostIdRequest:= "<host_id>"
	request.HostId = &hostIdRequest
	privateIpRequest:= "<private_ip>"
	request.PrivateIp = &privateIpRequest
	publicIpRequest:= "<public_ip>"
	request.PublicIp = &publicIpRequest
	containerNameRequest:= "<container_name>"
	request.ContainerName = &containerNameRequest
	offsetRequest:= int32(<offset>)
	request.Offset = &offsetRequest
	limitRequest:= int32(<limit>)
	request.Limit = &limitRequest
	handleStatusRequest:= "<handle_status>"
	request.HandleStatus = &handleStatusRequest
	severityRequest:= "<severity>"
	request.Severity = &severityRequest
	beginTimeRequest:= "<begin_time>"
	request.BeginTime = &beginTimeRequest
	endTimeRequest:= "<end_time>"
	request.EndTime = &endTimeRequest
	attackTagRequest:= "<attack_tag>"
	request.AttackTag = &attackTagRequest
	assetValueRequest:= "<asset_value>"
	request.AssetValue = &assetValueRequest
	attCkRequest:= "<att_ck>"
	request.AttCk = &attCkRequest
	eventNameRequest:= "<event_name>"
	request.EventName = &eventNameRequest
	response, err := client.ListSecurityEvents(request)
	if err == nil {
        fmt.Printf("%+v\n", response)
    } else {
        fmt.Println(err)
    }
}

更多编程语言的SDK代码示例,请参见API Explorer的代码示例页签,可生成自动对应的SDK代码示例。

状态码

状态码

描述

200

入侵事件列表

错误码

请参见错误码

相关文档