Redis
TMA-REDIS-RENAME-FLUSH
Ensure FLUSHALL and FLUSHDB are renamed or blocked
中等級 2自動化redis
說明
FLUSHALL/FLUSHDB destroy all data in one command. Compliant when rename-command FLUSHALL is set or the default ACL user has -@dangerous / -flushall. 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]?flushall['\x22]?[ \t]+\S+|user[ \t]+default[ \t][^\n]*(?:-@dangerous|-flushall)\b)
修補方式
修補方法: 操作指南或基礎設施修補檔
Add 'rename-command FLUSHALL ""' and 'rename-command FLUSHDB ""' to redis.conf (or use ACLs -@dangerous) and restart Redis
屬性
- 作業系統
- 不限
- 標籤
- redisdatabasesurface-reduction
- 參考資料
- CIS Redis Benchmark - Command Hardening / Dangerous Commands (verify section number for your release)
檢查此主機
請在您有權稽核的機器上執行此指令。掃描為唯讀操作。
shell
tmaegis scan --target redis --level 2