26 abr 2012

Integrigy y el puerto 1521, de demonio en demonio y tiro porque me toca

Buenas a todos, nombrar el puerto 1521 ya causa a muchos administradores sudores y sufrimiento, es uno de esos puertos fatídicos que se suelen quedar ahí, por defecto, sin bastionar el servicio que hay detrás, esperando a que llegue alguien para encontrar un regalo.

Para los que no estén familiarizados con este puerto, se trata del lugar donde opera el receptor de escucha de base de datos de Oracle. No es ni más ni menos que un demonio que se encuentra esperando solicitudes de conexión de clientes remotos. Y ya os imagináis lo que podría ocurrir si se viese comprometido ¿verdad? He de decir que normalmente las instalaciones de Oracle vienen configuradas para que solo se pueda acceder a estos demonios desde la red interna, evitando así posibles ataques desde el exterior, pero aún así sigue quedando un amplio nido de ratones esperando su porción de queso.

Con el objetivo de solucionar estos problemas y evaluar la seguridad de este demonio nació la herramienta de Ingregy AppSentry Listener Security Check Tool, hace ya algunos años. La importancia de esta vulnerabilidad/mala configuración y herramienta es tal que OWASP definió en su dia el control CM-002 donde se analiza en profundidad:

https://www.owasp.org/index.php/Testing_for_DB_Listener_%28OWASP-CM-002%29

El funcionamiento de la herramienta de Integrigy es bastante sencillo, simplemente deberemos indicar la IP o el host en el que se encuentra la instalación de Oracle, el puerto por defecto, 1521, y se pulsa sobre el botón "play":

Una vez finalizado nos mostrará un reporte con la información que se encuentre mal configurada de cara a evaluar la seguridad de la instalación (listado de usuarios, contraseñas, versión de instalación, autenticación integrada con el sistema, etc.)

Con la herramienta lsnrctl de Oracle podremos verificar después la configuración:

Os listo a continuación los comandos que podréis ejecutar con lsnrctl:

  • start– Starts the listener with the name specified, otherwise LISTENER will be used.  For Windows systems, the listener can also be started and stopped from the Control Panel.
  • stop – Stops the listener.  For Windows systems, the listener can also be started and stopped from the Control Panel.
  • status – Provides status information about the listener, including start date, uptime, and trace level.
  • services – Displays each service available, along with the connection history.
  • version – Displays the version information of the listener.
  • reload – Forces a read of the configuration file in order for new settings to take effect without stopping and starting the listener.
  • save_config – Creates a backup of the existing listener.ora file and saves changes to the current version.
  • trace – Sets the trace level to one of the following – OFF, USER, ADMIN, or SUPPORT.
  • spawn – Spawns a program that runs with an alias in the listener.ora file.
  • dbsnmp_start – Starts the DBSNMP subagent.
  • dbsnmp_stop – Stops the DBSNMP subagent.
  • dbsnmp_status – Displays the status of the DBSNMP subagent.
  • change_password – Sets a new password for the listener.
  • quit and exit – Exits the utility.
  • set – Changes the value of any parameter.  Everything that can be shown can be set.
  • show – Displays current parameter settings.
Cuidado con vuestros Oracles ;)Saludos!

1 comentario:

  1. [...] Fuente: Flu-Project More Sharing ServicesCompartirShare on liveShare on googleShare on facebook Publicado por www.segu-info.com.ar a las 16:33:00-Permanente - Enlaces entrantes 0 comentarios Etiquetas: base de datos, herramientas [...]

    ResponderEliminar