IBM Db2
TMA-DB2-DISCOVER
Ensure DISCOVER is set to DISABLE
低级别 2自动化db2
说明
DISCOVER=SEARCH lets the instance answer network discovery requests, advertising instances and databases to anyone on the network. Run as the instance owner (or with sqllib/db2profile sourced) so 'db2 get dbm cfg' reads the instance configuration.
检查方式
审计方法: Shell 命令
shell
out=$(db2 get dbm cfg 2>/dev/null) || exit 1; printf '%s\n' "$out" | awk -F= '/\(DISCOVER\)/ {v=$2; gsub(/[ \t]/, "", v); f=1} END {if (f && (v == "DISABLE")) print "compliant"; else print "noncompliant: " v}'- 预期输出
compliant
修复方式
修复方法: 操作指南或基础设施补丁
db2 update dbm cfg using DISCOVER DISABLE; then db2stop && db2start
属性
- 操作系统
- 任意
- 标签
- db2databasenetwork
- 参考
- CIS IBM Db2 Benchmark - Instance Configuration / Discovery (verify section number for your release)
检查本机
请在您有权审计的机器上运行此命令。扫描为只读操作。
shell
tmaegis scan --target db2 --level 2