TMAegis
Thêm quy tắc cho redis

TMA-REDIS-RENAME-FLUSH

Ensure FLUSHALL and FLUSHDB are renamed or blocked

Trung bìnhCấp 2Tự độngredis

Mô tả

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).

Cách kiểm tra

Phương pháp kiểm tra: Mẫu tệp

Tệp
/etc/redis/redis.conf
Mẫu khớp
(?mi)^[ \t]*(?:rename-command[ \t]+['\x22]?flushall['\x22]?[ \t]+\S+|user[ \t]+default[ \t][^\n]*(?:-@dangerous|-flushall)\b)

Cách khắc phục

Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng

Add 'rename-command FLUSHALL ""' and 'rename-command FLUSHDB ""' to redis.conf (or use ACLs -@dangerous) and restart Redis

Thuộc tính

Hệ điều hành
Bất kỳ
Thẻ
redisdatabasesurface-reduction
Tham chiếu
CIS Redis Benchmark - Command Hardening / Dangerous Commands (verify section number for your release)

Kiểm tra máy này

Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.

shell
tmaegis scan --target redis --level 2