TMA-REDIS-RENAME-CONFIG
Ensure the CONFIG command is renamed or blocked
高级别 1自动化redis
说明
CONFIG lets a client rewrite dir/dbfilename and write arbitrary files (a classic Redis-to-RCE path). Compliant when rename-command CONFIG is set or the default ACL user has -@dangerous / -@admin / -config. Checks /etc/redis/redis.conf (SKIP when it does not exist; RHEL uses /etc/redis.conf).
检查方式
审计方法: 文件正则匹配
- 文件
/etc/redis/redis.conf- 匹配模式
(?mi)^[ \t]*(?:rename-command[ \t]+['\x22]?config['\x22]?[ \t]+\S+|user[ \t]+default[ \t][^\n]*(?:-@dangerous|-@admin|-config)\b)
修复方式
修复方法: 操作指南或基础设施补丁
Add 'rename-command CONFIG ""' (or a secret name) to redis.conf, or restrict the default ACL user with -@dangerous, then restart Redis
属性
- 操作系统
- 任意
- 标签
- redisdatabasesurface-reduction
- 参考
- CIS Redis Benchmark - Command Hardening / Dangerous Commands (verify section number for your release)
检查本机
请在您有权审计的机器上运行此命令。扫描为只读操作。
shell
tmaegis scan --target redis