Loading...
Loading...
Compare original and translation side by side
rule-manager.jsrule-manager.jsskills/securitycd skills/security && npm install.envexport ELASTICSEARCH_URL="https://your-cluster.es.cloud.example.com:443"
export ELASTICSEARCH_API_KEY="your-api-key"
export KIBANA_URL="https://your-cluster.kb.cloud.example.com:443"
export KIBANA_API_KEY="your-kibana-api-key"skills/securitycd skills/security && npm install.envexport ELASTICSEARCH_URL="https://your-cluster.es.cloud.example.com:443"
export ELASTICSEARCH_API_KEY="your-api-key"
export KIBANA_URL="https://your-cluster.kb.cloud.example.com:443"
export KIBANA_API_KEY="your-kibana-api-key"| Task | Tools to call (in order) |
|---|---|
| Tune noisy SIEM rule | |
| Add endpoint behavior exception | |
| Create new detection rule | |
| Investigate rule alert volume | |
run_queryfetch_endpoint_ruleshelladd_endpoint_exception| 任务 | 调用工具(按顺序) |
|---|---|
| 调优高噪音SIEM规则 | |
| 添加终端行为例外 | |
| 创建新检测规则 | |
| 调查规则警报量 | |
run_queryfetch_endpoint_ruleshelladd_endpoint_exceptionnoisy-rulesfindnode skills/security/detection-rule-management/scripts/rule-manager.js noisy-rules --days 7 --top 20
node skills/security/detection-rule-management/scripts/rule-manager.js find --filter "alert.attributes.name:*Suspicious*" --brief
node skills/security/detection-rule-management/scripts/rule-manager.js get --id <rule_uuid>
node skills/security/alert-triage/scripts/run-query.js "kibana.alert.rule.name:\"<rule_name>\"" --index ".alerts-security.alerts-*" --days 7 --fullnoisy-rulesfindnode skills/security/detection-rule-management/scripts/rule-manager.js noisy-rules --days 7 --top 20
node skills/security/detection-rule-management/scripts/rule-manager.js find --filter "alert.attributes.name:*Suspicious*" --brief
node skills/security/detection-rule-management/scripts/rule-manager.js get --id <rule_uuid>
node skills/security/alert-triage/scripts/run-query.js "kibana.alert.rule.name:\"<rule_name>\"" --index ".alerts-security.alerts-*" --days 7 --fullmatchesnode skills/security/detection-rule-management/scripts/rule-manager.js add-exception \
--rule-uuid <rule_uuid> \
--entries "process.executable:is:C:\\Program Files\\SCCM\\CcmExec.exe" "process.parent.name:is:CcmExec.exe" \
--name "Exclude SCCM" --comment "FP: SCCM deployment" --tags "tuning:fp" "source:soc" --yesnode skills/security/detection-rule-management/scripts/rule-manager.js patch --id <rule_uuid> --query "process.name:powershell.exe AND NOT process.parent.name:CcmExec.exe" --yes
node skills/security/detection-rule-management/scripts/rule-manager.js patch --id <rule_uuid> --max-signals 50 --yes
node skills/security/detection-rule-management/scripts/rule-manager.js patch --id <rule_uuid> --severity low --risk-score 21 --yes
node skills/security/detection-rule-management/scripts/rule-manager.js disable --id <rule_uuid> --yespatchenabledisabledeleteadd-exceptionbulk-action--yesrule-manager.js get --id <rule_uuid>case-managementmatchesnode skills/security/detection-rule-management/scripts/rule-manager.js add-exception \
--rule-uuid <rule_uuid> \
--entries "process.executable:is:C:\\Program Files\\SCCM\\CcmExec.exe" "process.parent.name:is:CcmExec.exe" \
--name "Exclude SCCM" --comment "FP: SCCM deployment" --tags "tuning:fp" "source:soc" --yesnode skills/security/detection-rule-management/scripts/rule-manager.js patch --id <rule_uuid> --query "process.name:powershell.exe AND NOT process.parent.name:CcmExec.exe" --yes
node skills/security/detection-rule-management/scripts/rule-manager.js patch --id <rule_uuid> --max-signals 50 --yes
node skills/security/detection-rule-management/scripts/rule-manager.js patch --id <rule_uuid> --severity low --risk-score 21 --yes
node skills/security/detection-rule-management/scripts/rule-manager.js disable --id <rule_uuid> --yespatchenabledisabledeleteadd-exceptionbulk-action--yesrule-manager.js get --id <rule_uuid>case-managementlogs-endpoint.events.process-*logs-endpoint.events.network-*.alerts-security.alerts-*logs-windows.*logs-aws.*process.nameprocess.command_lineprocess.parent.namedestination.ipwinlog.event_idevent.actionrun-query.jsnode skills/security/alert-triage/scripts/run-query.js "process.name:certutil.exe" --index "logs-endpoint.events.process-*" --days 30 --size 5logs-endpoint.events.process-*logs-endpoint.events.network-*.alerts-security.alerts-*logs-windows.*logs-aws.*process.nameprocess.command_lineprocess.parent.namedestination.ipwinlog.event_idevent.actionrun-query.jsnode skills/security/alert-triage/scripts/run-query.js "process.name:certutil.exe" --index "logs-endpoint.events.process-*" --days 30 --size 5queryeqlesqlthresholdthreat_matchnew_termsnode skills/security/alert-triage/scripts/run-query.js "process.name:certutil.exe AND process.command_line:(*urlcache* OR *decode*)" \
--index "logs-endpoint.events.process-*" --days 30--query-filevalidate-querynode skills/security/detection-rule-management/scripts/rule-manager.js validate-query \
--query "process.name:taskkill.exe AND process.command_line:(*chrome.exe* OR *msedge.exe*)" --language kuerycreatepatch--skip-validation*/IM chrome.exe**\/IM chrome.exe*()"AND ANDOR ORqueryeqlesqlthresholdthreat_matchnew_termsnode skills/security/alert-triage/scripts/run-query.js "process.name:certutil.exe AND process.command_line:(*urlcache* OR *decode*)" \
--index "logs-endpoint.events.process-*" --days 30--query-filevalidate-querynode skills/security/detection-rule-management/scripts/rule-manager.js validate-query \
--query "process.name:taskkill.exe AND process.command_line:(*chrome.exe* OR *msedge.exe*)" --language kuerycreatepatch--skip-validation*/IM chrome.exe**\/IM chrome.exe*()"AND ANDOR ORnode skills/security/detection-rule-management/scripts/rule-manager.js create \
--name "Certutil URL Download or Decode" \
--description "Detects certutil.exe used to download files or decode Base64 payloads, a common LOLBin technique." \
--type query \
--query "process.name:certutil.exe AND process.command_line:(*urlcache* OR *decode*)" \
--index "logs-endpoint.events.process-*" \
--severity medium --risk-score 47 \
--tags "OS:Windows" "Tactic:Defense Evasion" "Tactic:Command and Control" \
--false-positives "IT administrators using certutil for legitimate certificate operations" \
--references "https://attack.mitre.org/techniques/T1140/" \
--interval 5m --disabledcreate --from-file rule_definition.json--threat-filenode skills/security/detection-rule-management/scripts/rule-manager.js create \
--name "Certutil URL Download or Decode" \
--description "Detects certutil.exe used to download files or decode Base64 payloads, a common LOLBin technique." \
--type query \
--query "process.name:certutil.exe AND process.command_line:(*urlcache* OR *decode*)" \
--index "logs-endpoint.events.process-*" \
--severity medium --risk-score 47 \
--tags "OS:Windows" "Tactic:Defense Evasion" "Tactic:Command and Control" \
--false-positives "IT administrators using certutil for legitimate certificate operations" \
--references "https://attack.mitre.org/techniques/T1140/" \
--interval 5m --disabledcreate --from-file rule_definition.json--threat-filenoisy-rules --days 3 --top 10noisy-rules --days 3 --top 10rule.idrule.namefetch-endpoint-rule-from-github.jsadd-endpoint-exception.jscheck-exclusion-best-practices.jsrule.idrule.namefetch-endpoint-rule-from-github.jsadd-endpoint-exception.jscheck-exclusion-best-practices.js| Command | Description |
|---|---|
| Search/list rules with optional KQL filter |
| Get a rule by |
| Create a rule (inline flags or |
| Patch specific fields on a rule |
| Enable a rule |
| Disable a rule |
| Delete a rule |
| Export rules as NDJSON |
| Bulk enable/disable/delete/duplicate/edit |
| Add an exception item to a rule |
| List items on an exception list |
| Create a shared exception list |
| Find noisiest rules by alert volume |
| Check query syntax before create/patch |
fetch-endpoint-rule-from-github.jsadd-endpoint-exception.jscheck-exclusion-best-practices.js| 命令 | 描述 |
|---|---|
| 使用可选KQL过滤器搜索/列出规则 |
| 通过 |
| 创建规则(通过内联参数或 |
| 修改规则的特定字段 |
| 启用规则 |
| 禁用规则 |
| 删除规则 |
| 将规则导出为NDJSON格式 |
| 批量启用/禁用/删除/复制/编辑规则 |
| 为规则添加例外项 |
| 列出例外列表中的项 |
| 创建共享例外列表 |
| 根据警报量查找高噪音规则 |
| 在创建/修改规则前检查查询语法 |
fetch-endpoint-rule-from-github.jsadd-endpoint-exception.jscheck-exclusion-best-practices.jsfield:operator:valueisis_notis_one_ofis_not_one_ofexistsdoes_not_existmatchesdoes_not_matchprocess.name:is:svchost.exefile.path:matches:C:\\Program Files\\*field:operator:valueisis_notis_one_ofis_not_one_ofexistsdoes_not_existmatchesdoes_not_matchprocess.name:is:svchost.exefile.path:matches:C:\\Program Files\\*alert-triagecase-managementalert-triagecase-managementcreatepatchenabledisabledeleteadd-exceptionbulk-actionadd-endpoint-exception--yes-yrule.idrule.name--dry-runbulk-actioncreatepatchenabledisabledeleteadd-exceptionbulk-actionadd-endpoint-exception--yes-yrule.idrule.namebulk-action--dry-run| Variable | Required | Description |
|---|---|---|
| Yes | Elasticsearch URL (for noisy-rules aggregation) |
| Yes | Elasticsearch API key |
| Yes | Kibana URL (for rules API) |
| Yes | Kibana API key |
| 变量 | 是否必填 | 描述 |
|---|---|---|
| 是 | Elasticsearch URL(用于高噪音规则聚合) |
| 是 | Elasticsearch API密钥 |
| 是 | Kibana URL(用于规则API) |
| 是 | Kibana API密钥 |