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