TMAegisBeta
Thêm quy tắc cho redis

Redis

TMA-REDIS-RENAME-CONFIG

Ensure the CONFIG command is renamed or blocked

CaoCấp 1Tự độngredis

Mô tả

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

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]?config['\x22]?[ \t]+\S+|user[ \t]+default[ \t][^\n]*(?:-@dangerous|-@admin|-config)\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 CONFIG ""' (or a secret name) to redis.conf, or restrict the default ACL user with -@dangerous, then 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