TMAegis
Thêm quy tắc cho mongodb

MongoDB

TMA-MONGO-BIND-ALL

Ensure mongod does not listen on all interfaces

CaoCấp 1Tự độngmongodb

Mô tả

bindIp 0.0.0.0 or bindIpAll exposes the database on every network interface; bind only to localhost and required private addresses. Checks the YAML config file /etc/mongod.conf (SKIP when it does not exist).

Cách kiểm tra

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

Tệp
/etc/mongod.conf
Mẫu khớp
(?m)^[ \t]*(?:bindIp:[^#\n]*0\.0\.0\.0|bindIp:[^#\n]*::(?:[ ,'\x22]|$)|bindIpAll:[ \t]*true)

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

Set net.bindIp to 127.0.0.1 plus the specific private addresses required (remove bindIpAll), then restart mongod

Thuộc tính

Hệ điều hành
Bất kỳ
Thẻ
mongodbdatabasenetwork
Tham chiếu
CIS MongoDB Benchmark - Network Exposure / Bind Address (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 mongodb