Securizar acceso de ROOT en SSH

Seguimos con nuestros artículos sobre como asegurar el acceso SSH a nuestro servidor ya que es uno de los mayores puntos de acceso para posibles intentos de acceso por fuerza bruta, etc.

Normalmente, y como es lógico, estos ataques intentan la entrada con el usuario root, que por defecto es el único que tiene acceso total al servidor. ¿Cómo podemos hacer para dificultarles ese acceso? Pues bien, una de las maneras es quitando el acceso por SSH al usuario root. Y os preguntaréis, ¿y cómo administro el servidor sin usuario root? Pues muy fácil, creando un usuario que una vez dentro del sistema, pueda cambiar a root mediante el comando su. Pero mejor lo vamos viendo por pasos.

Lo primero que debemos hacer es asegurarnos de que existe el grupo wheel (suele venir creado por defecto pero en algunas distribuciones Debian parece ser que no está creado), y para ello debemos mirar si existe en el fichero etc/group. Si vemos que no existe esta línea, wheel:*:0:root,usuarios es que no está creado (donde “usuarios” son los usuarios pertenecientes al grupo). Otra forma de hacerlo es ejecutando el comando groups, que listará los grupos de usuarios del sistema. Si no existe el grupo, la forma más fácil de crearlo es editando el fichero etc/group y añadiendo la siguiente linea:

wheel:*:0:root,usuario_nuevo

Con esto ya estaríamos creando el usuario nuevo a parte del grupo. Si solo queremos crear el grupo:

wheel:*:0:root

Y después para crear el usuario:

adduser -G wheel -m -s /bin/bash -d /home/usuario_nuevo usuario_nuevo
passwd usuario_nuevo

-G wheel ->Crea el usuario dentro del grupo Wheel
-m ->se crea el directorio home si no existe
-s ->se le indica el shell del usuario
-d ->se le indica el nombre del directorio home del usuario

Con esto ya tenemos creado un usuario capaz de ganar privilegios de root mediante el comando su. Antes de continuar es aconsejable salir de SSH y probar si podemos ejecutar su con nuestro usuario_nuevo.

Continuar leyendo «Securizar acceso de ROOT en SSH»

Securizar y proteger el acceso SSH

SSH (Secure SHell) es el nombre de un protocolo y del programa que lo implementa, y sirve para acceder a máquinas remotas a través de una red.

Permite manejar por la computadora mediante un el intérprete de comandos instalado en la misma (bash, ksh, etc..), y también puede redirigir el tráfico de X-Windows para poder ejecutar programas gráficos si tenemos un Servidor X arrancado en nuestra máquina local.

Asegurando SSH:

Aunque SSH en sí es un protocolo seguro, podemos afinar los parámetros de configuración para hacer que su utilización resulte todavía más segura.

Pasos que seguiremos:

  • Deshabilitar SSH 1.
  • Autenticación basada en llave RSA.
  • No permitir autenticación mediante login/password.
  • No Permitir acceso como root sin llave.
  • Cambiar el puerto por Defecto.
  • Banear IPs tras 5 logins erróneos.

Deshabilitar SSH 1:

Continuar leyendo «Securizar y proteger el acceso SSH»

Solución APF: unable-to-load-iptables-module-ip_tables-aborting

Os comento este error  unable-to-load-iptables-module-ip_tables-aborting que se produce al intentar iniciar el firewall APF por primera vez, en un sistema Linux cuando tiene en el kernel compilado como modulo el firewall de IPtables.

El mensaje de error completo que se produce es el siguiente:

apf(20663): {glob} flushing & zeroing chain policies
apf(20663): {glob} firewall offline
apf(20702): {glob} activating firewall
apf(20742): {glob} unable to load iptables module (ip_tables), aborting.
apf(20702): {glob} firewall initalized

Continuar leyendo «Solución APF: unable-to-load-iptables-module-ip_tables-aborting»

Hack Proofing Linux: A Guide To Open Source Security

Hack Proofing Linux:A Guide to Open Source Security is designed to help you deploy a Linux system on the Internet in a variety of security roles.This book provides practical instructions and pointers concerning the open source security tools that we use every day.
First, we show you how to obtain the software; and then, how to use the Bastille application to harden your Linux operating system so that it can function securely as it fulfills a specific role of your choice (e.g., as a Web server, as an E-mail server, and so forth).You will also learn how to use your Linux system as an auditing tool to scan systems for vulnerabilities as well as create an Intrusion Detection System (IDS), which enables your Linux system to log and respond to suspicious activity. From virus protection to encrypting transmissions using Gnu Privacy Guard and FreeSWAN, you will be able to con?gure your system to secure local data as well as data that will be passed along the network.After reading this book, you will be able to identify open source and for-fee tools that can help you further secure your Linux system.
We have also included chapters concerning ways to sniff and troubleshoot network connections and how to implement strong authentication using One Time Passwords (OTP) and Kerberos.Tools such as Squid proxy server and Ipchains/Iptables will help you use your Linux system so that it can act as a firewall.With the tools on the accompanying CD as well as the advice and instructions given in this book, you will be able to deploy your Linux system in various roles with confidence.
We decided to focus on pro?ling the most commonly used security tools found on the Linux platform.We also decided to emphasize the real-world implementation of these tools, as opposed to just providing conceptual overviews. Finally, we decided to describe the steps you should take when things go wrong.As a result, we have created a book that is a valuable resource that helps you use your Linux system as efficiently as possible

Download:

http://rapidshare.com/files/192565554/HackLinux-www.warezwitch.com-.rar

Pass: www.warezwitch.com