Skip to main content

Posts

Showing posts from June, 2019

How to disable weak SSH cipher and MAC algoritms in Ubuntu 14.04 (or any other GNU/Linux distro)

If you still have an Ubuntu 14.04 LTS (or any other old distro) in a production environment, most likely the SSH service is accepting weak cipher and MAC algorithms. At present, the cipher algorithms considered to be weak are: CBC (3des-cbc, aes128-cbc, aes192-cbc, aes256-cbc, blowfish-cbc, cast128-cbc, and rijndael-cbc@lysator.liu.se) [1]   [2] and RC4 (arcfour, arcfour128, and arcfour256) [3] . While the MAC algorithms in this condition are: MD5 (hmac-md5, hmac-md5-96, hmac-md5-96-etm@openssh.com, and hmac-md5-etm@openssh.com) and 96-bit algorithms (hmac-sha1-96 and hmac-sha1-96-etm@openssh.com). Now, how is it possible to know if these algorithms are being used by the SSH service in any given GNU/Linux system? Simply by executing the following command within the system we want to verify (assuming the SSH service is listening on port TCP/22): # ssh -vvv localhost -p 22 The previous command should show an output similar to this one: Here, all the algorithms supported by t

Deshabilitar algoritmos MAC y de cifrado vulnerables utilizados por SSH en Ubuntu 14.04 (o cualquier otra distro GNU/Linux)

Si todavía tienes alguna versión de Ubuntu 14.04 LTS (u otra distro vieja) en producción, lo más probable es que el servicio de SSH esté aceptando algoritmos MAC y/o de cifrado vulnerables. Actualmente, los algoritmos de cifrado considerados vulnerables son: CBC (3des-cbc, aes128-cbc, aes192-cbc, aes256-cbc, blowfish-cbc, cast128-cbc y rijndael-cbc@lysator.liu.se) [1]   [2] y RC4 (arcfour, arcfour128 y arcfour256) [3] . Mientras que los algoritmos MAC en esta condición son: MD5 (hmac-md5, hmac-md5-96, hmac-md5-96-etm@openssh.com y hmac-md5-etm@openssh.com) y algoritmos de 96-bit (hmac-sha1-96 y hmac-sha1-96-etm@openssh.com). Ahora bien, cómo saber si estos algoritmos están siendo utilizados por el servicio de SSH de un sistema GNU/Linux en particular? Simplemente ejecutando el siguiente comando dentro del mismo sistema que queremos verificar (y suponiendo que el servicio SSH está escuchando en el puerto TCP/22): # ssh -vvv localhost -p 22 El comando anterior, debería mostrar un