TMAegis
Más reglas para mongodb

TMA-MONGO-BIND-ALL

Ensure mongod does not listen on all interfaces

AltaNivel 1Automatizadamongodb

Descripción

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ómo se verifica

Método de auditoría: Patrón de archivo

Archivo
/etc/mongod.conf
Patrón
(?m)^[ \t]*(?:bindIp:[^#\n]*0\.0\.0\.0|bindIp:[^#\n]*::(?:[ ,'\x22]|$)|bindIpAll:[ \t]*true)

Cómo se corrige

Método de corrección: Guía o parche de infraestructura

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

Propiedades

Sistemas operativos
Cualquiera
Etiquetas
mongodbdatabasenetwork
Referencia
CIS MongoDB Benchmark - Network Exposure / Bind Address (verify section number for your release)

Verificar este host

Ejecute esto en un equipo que tenga permiso para auditar. El escaneo es de solo lectura.

shell
tmaegis scan --target mongodb