ListDetectionRules - 获取自定义规则列表

获取检测规则列表。

接口说明

发送通知有频率和时间的限定。 每天每个用户在 08:00-20:00 点最多收到两次通知,其余时间不会发送。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用前面加 * 表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
yundun-sas:ListDetectionRuleslist
*DetectionRule
acs:yundun-sas::{#accountId}:detection/*

请求参数

名称类型必填描述示例值
RegionIdstring

威胁分析的数据管理中心所在地。您需要根据资产所在地域,选择管理中心所在地。取值:

  • cn-hangzhou:资产属于中国内地。
  • ap-southeast-1:资产属于海外地域。
cn-hangzhou
Langstring

返回消息的语言类型。取值:

  • zh(默认):中文。
  • en:英文。
zh
DetectionRuleNamestring

检测规则名称。

Detect Discovery Behavior for Local Systems Groups
DetectionRuleIdstring

检测规则 ID。

dr-ppa85gfw69tgwkys****
DetectionRuleIdsarray

检测规则 ID 列表。

string

检测规则 ID。

dr-ppa85gfw69tgwkys****
DetectionRuleTypestring

检测规则类型。

  • preset:预置检测规则。
  • custom:自定义检测规则。
  • custom_template:规则模版。
preset
DetectionRuleStatusstring

检测规则状态。

enabled
AlertTypestring

告警类型。

siem_rule_type_alert_storm
AlertLevelstring

告警威胁等级。 取值:

  • 5:严重。
  • 4:高危。
  • 3:中危。
  • 2:低危。
  • 1:信息。
1
AlertTacticIdstring

告警战术阶段。

TA0042
AlertAttCkstring

告警 Att&Ck。

Discovery
IncidentAggregationTypestring

事件聚合类型。取值:

  • none:不生成事件。
  • graph_compute:图计算(预定义规则支持)。
  • expert:专家规则。
  • passthrough:告警透出(1 对 1)。
  • window:同类聚合(窗口)。
graph_compute
LogCategoryIdstring

日志规范化类别 ID。

NETWORK_CATEGORY
LogSchemaIdstring

日志规范化方案 ID。

API_RISK_ACTIVITY
DetectionExpressionTypestring

检测规则表达式内容。

playbook
OrderFieldNamestring

排序字段。取值:

  • GmtCreate:创建时间 。
  • GmtModified:更新时间。
GmtModified
OrderDirectionstring

排序方向,取值为:

  • asc:正序,为默认值。
  • desc:倒序。
asc
PageNumberinteger

分页参数:当前页码。

1
PageSizeinteger

分页参数:每页显示条数。

100
RoleForlong

管理员切换成其他成员视角的用户 ID。

113091674488****
MaxResultsinteger

本次读取的最大数据量。

50
NextTokenstring

下一个查询开始 Token。

AAAAAUqcj6VO4E3ECWIrFczs****

返回参数

名称类型描述示例值
object

返回体。

RequestIdstring

请求消息 ID。

508DCFFD-4508-54BF-A8A0-E97A0FA6****
DetectionRulesarray<object>

检测规则列表。

dataobject

检测规则。

CreateTimelong

创建时间。

2023-03-21 13:47:01
UpdateTimelong

更新时间。

2023-04-16 10:51:00
DetectionRuleIdstring

检测规则 ID。

jndi-attack-success_http_netstat
DetectionRuleNamestring

检测规则名称。

Detect Discovery Behavior for Local Systems Groups
DetectionRuleDescriptionstring

检测规则描述。

Check the enumeration behavior of local system groups. An attacker may attempt to find the Local Systems group and its permission settings.
DetectionRuleTypestring

检测规则类型。取值:

  • preset:预置检测规则。
  • custom:自定义检测规则。
  • custom_template:规则模版。
custom
DetectionRuleStatusstring

检测规则状态。取值:

  • enabled:启用。
  • disabled:禁用。
  • testing:测试。
enabled
DetectionExpressionTypestring

检测规则表达式内容。

playbook
DetectionExpressionContentstring

检测规则表达式内容。

*|set session mode=scan;SELECT * FROM log WHERE schema = 'PROCESS_START_ACTIVITY' AND ( proc_path LIKE '%/groups' OR ( ( proc_path LIKE '%/cat' OR proc_path LIKE '%/head' OR proc_path LIKE '%/tail' OR proc_path LIKE '%/more' ) AND cmdline LIKE '%/etc/group%' ) )
LogCategoryIdstring

日志规范化类别 ID。

NETWORK_CATEGORY
LogSchemaIdstring

日志规范化方案 ID。

API_RISK_ACTIVITY
AlertSchemaIdstring

检测规则告警模版 ID。取值:

  • ALERT_ACTIVITY:其他告警。
  • EDR_ALERT_ACTIVITY:端点检测响应与告警。
  • FIREWALL_ALERT_ACTIVITY:防火墙告警。
  • WAF_ALERT_ACTIVITY:web 应用防火墙告警。
ALERT_ACTIVITY
ScheduleTypestring

调度类型。取值:

  • fixed_rate:固定间隔
  • cron:cron 表达式
fixed_rate
ScheduleExpressionstring

调度 Cron 表达式,ScheduleType 取值为 cron 时需填写。

5m
ScheduleMaxRetriesinteger

超时最大重试次数,取值 1~100。

1
ScheduleBeginTimelong

调度开始时间(13 位时间戳)。

1733269771123
ScheduleWindowstring

调度窗口长度。

5m
ScheduleMaxTimeoutinteger

超时最长时间,单位秒,取值 60~1800。

60
AlertTypestring

告警类型。

WebShell
AlertLevelstring

告警威胁等级。 取值:

  • 5:严重。
  • 4:高危。
  • 3:中危。
  • 2:低危。
  • 1:信息。
1
AlertTacticIdstring

告警战术阶段。

TA0042
AlertAttCkstring

告警 Att&Ck。

Discovery
AlertThresholdPeriodstring

告警阈值周期长度。

5m
AlertThresholdCountinteger

告警阈值次数。

10
AlertThresholdGroupstring

告警阈值字段列表,以英文逗号分隔。

alert_type,ip
IncidentAggregationTypestring

事件聚合类型。取值:

  • none:不生成事件。
  • graph_compute:图计算(预定义规则支持)。
  • expert:专家规则。
  • passthrough:告警透出(1 对 1)。
  • window:同类聚合(窗口)。
passthrough
IncidentAggregationExpressionstring

事件聚合周期配置。

5m
PlaybookUuidstring

剧本 UUID。

dde983ed-eb56-45ea-ac2e-3b12b2a9****
PlaybookParametersstring

剧本用户自定义参数。

{ "ip": { "ip": "124.23.*.*" } }
Playbookobject

剧本的 XML 配置。

Flowstring

剧本流程配置。

[ { "id": "EndEvent_1fqpq4h", "zIndex": 1, "data": { "nodeType": "endEvent", "appType": "basic", "valueData": { }, "icon": "icon-radio-off-full" }, "position": { "x": 1369, "y": 174 } } ]
Configstring

调用剧本入参配置。

[ { "name": "expireDay", "dataType": "Integer", "required": true, "isArray": false, "example": "7", "description": "desc", "typeName": "Integer", "dataClass": "normal", "stanchDefaultValue": "7" } ]
EntityMappingsarray<object>

实体映射配置。

entityMappingsobject

实体映射配置。

NormalizationSchemaIdstring

实体类型 ID。

ip
NormalizationFieldMappingsarray<object>

实体映射配置。

normalizationFieldMappingsobject

实体映射配置。

NormalizationFieldNamestring

实体标准字段。

src_ip
MappingFieldNamestring

映射字段。

ip
NormalizationFieldTypestring

实体标准字段数据类型。

vachar
PageNumberinteger

分页参数:当前页码。

2
PageSizeinteger

分页参数:每页显示条数。

10
TotalCountinteger

记录总数。

6
MaxResultsinteger

本次读取的最大数据量。

50
NextTokenstring

下一个查询开始 Token。

AAAAAUqcj6VO4E3ECWIrFczs****

示例

正常返回示例

JSON格式

{
  "RequestId": "508DCFFD-4508-54BF-A8A0-E97A0FA6****",
  "DetectionRules": [
    {
      "CreateTime": 0,
      "UpdateTime": 0,
      "DetectionRuleId": "jndi-attack-success_http_netstat",
      "DetectionRuleName": "Detect Discovery Behavior for Local Systems Groups\n",
      "DetectionRuleDescription": "Check the enumeration behavior of local system groups. An attacker may attempt to find the Local Systems group and its permission settings.",
      "DetectionRuleType": "custom",
      "DetectionRuleStatus": "enabled",
      "DetectionExpressionType": "playbook",
      "DetectionExpressionContent": "*|set session mode=scan;SELECT * FROM log\nWHERE schema = 'PROCESS_START_ACTIVITY'\nAND (\n    proc_path LIKE '%/groups'\n    OR (\n        (\n            proc_path LIKE '%/cat'\n            OR proc_path LIKE '%/head'\n            OR proc_path LIKE '%/tail'\n            OR proc_path LIKE '%/more'\n        )\n        AND cmdline LIKE '%/etc/group%'\n    )\n)",
      "LogCategoryId": "NETWORK_CATEGORY",
      "LogSchemaId": "API_RISK_ACTIVITY",
      "AlertSchemaId": "ALERT_ACTIVITY",
      "ScheduleType": "fixed_rate",
      "ScheduleExpression": "5m",
      "ScheduleMaxRetries": 1,
      "ScheduleBeginTime": 1733269771123,
      "ScheduleWindow": "5m",
      "ScheduleMaxTimeout": 60,
      "AlertType": "WebShell",
      "AlertLevel": 1,
      "AlertTacticId": "TA0042",
      "AlertAttCk": "Discovery",
      "AlertThresholdPeriod": "5m",
      "AlertThresholdCount": 10,
      "AlertThresholdGroup": "alert_type,ip",
      "IncidentAggregationType": "passthrough",
      "IncidentAggregationExpression": "5m",
      "PlaybookUuid": "dde983ed-eb56-45ea-ac2e-3b12b2a9****",
      "PlaybookParameters": {
        "ip": {
          "ip": "124.23.*.*"
        }
      },
      "Playbook": {
        "Flow": [
          {
            "id": "EndEvent_1fqpq4h",
            "zIndex": 1,
            "data": {
              "nodeType": "endEvent",
              "appType": "basic",
              "valueData": {},
              "icon": "icon-radio-off-full"
            },
            "position": {
              "x": 1369,
              "y": 174
            }
          }
        ],
        "Config": [
          {
            "name": "expireDay",
            "dataType": "Integer",
            "required": true,
            "isArray": false,
            "example": 7,
            "description": "desc",
            "typeName": "Integer",
            "dataClass": "normal",
            "stanchDefaultValue": 7
          }
        ]
      },
      "EntityMappings": [
        {
          "NormalizationSchemaId": "ip",
          "NormalizationFieldMappings": [
            {
              "NormalizationFieldName": "src_ip",
              "MappingFieldName": "ip",
              "NormalizationFieldType": "vachar"
            }
          ]
        }
      ]
    }
  ],
  "PageNumber": 2,
  "PageSize": 10,
  "TotalCount": 6,
  "MaxResults": 50,
  "NextToken": "AAAAAUqcj6VO4E3ECWIrFczs****"
}

错误码

HTTP status code错误码错误信息
400IdempotentParameterMismatchThe request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.

访问错误中心查看更多错误码。