Ejecutando JShielder

Ya que conocemos las funciones de Jshielder, vamos a ver el menú que tenemos cuando ejecutamos la herramienta y que funciones ejecuta.

Como descargo JShielder

$ git clone https://github.com/Jsitech/JShielder

Accedemos a la carpeta

$ cd JShielder/

Tendremos el Deployer General de JShielder, veamos que tiene el script:

#!/bin/bash


# JShielder v2.0
# Linux Hardening Script
#
# Jason Soto
# www.jsitech.com
# Twitter = @JsiTech

# Tool URL = www.jsitech.com/jshielder
# us.jsitech.com/jshielder

# Based from JackTheStripper Project
# Credits to Eugenia Bahit

# A lot of Suggestion Taken from The Lynis Project 
# www.cisofy.com/lynis
# Credits to Michael Boelen @mboelen

##############################################################################################################

f_banner(){
echo
echo "
     _ ____  _     _      _     _
    | / ___|| |__ (_) ___| | __| | ___ _ __
 _  | \___ \| '_ \| |/ _ \ |/ _  |/ _ \ '__|
| |_| |___) | | | | |  __/ | (_| |  __/ |
 \___/|____/|_| |_|_|\___|_|\__,_|\___|_|
Linux Automated Hardening Script for Linux Servers
Developed By Jason Soto @JsiTech "
echo
echo

}

##############################################################################################################

#Check if Running with root user

if [ "$USER" != "root" ]; then
      echo "Permission Denied"
      echo "Can only be run by root"
      exit
else
      clear
      f_banner
fi


menu=""
until [ "$menu" = "10" ]; do

clear
f_banner

echo
echo -e "\e[34m---------------------------------------------------------------------------------------------------------\e[00m"
echo -e "\e[93m[+]\e[00m SELECT YOUR LINUX DISTRIBUTION"
echo -e "\e[34m---------------------------------------------------------------------------------------------------------\e[00m"
echo ""
echo "1. Ubuntu Server 14.04 LTS"
echo "2. Ubuntu Server 15.04"
echo "3. Linux CentOS 6 (Coming Soon)"
echo "4. Linux CentOS 7 (Coming Soon)"
echo "5. Debian GNU/Linux 7 (Coming Soon)"
echo "6. Debian GNU/Linux 8 (Coming Soon)"
echo "7. Red Hat Linux 6 (Coming Soon)"
echo "8. Red Hat Linux 7 (Coming Soon)"
echo "9. Fedora Server 23 (Coming Soon)"
echo "10. Exit"
echo

read menu
case $menu in

1)
cd UbuntuServer_14.04LTS/
chmod +x jshielder.sh
./jshielder.sh
;;

2)
cd UbuntuServer_15.04/
chmod +x jshielder.sh
./jshielder.sh
;;

10)
break
;;

*) ;;

esac
done

Tenemos el menu para Seleccionar la Distro, Por el Momento JSHielder solo está disponible para las distros Ubuntu Server 14.04LTS y 15.04. Al Seleccionar la Distro el Script se encarga de ejecutar la versión de Jshielder para esa distro. Veamos el menu que tenemos al momento de que se ejecute JShielder para la Distro de Elección:

---------------------------------------------------------------------------------------------------------
[+] SELECT THE DESIRED OPTION
---------------------------------------------------------------------------------------------------------

1. LAMP Deployment
2. Reverse Proxy Deployment With Apache
3. LEMP Deployment (Under Development, Testing)
4. Reverse Proxy Deployment with Nginx (ModSecurity)
5. Running With SecureWPDeployer or JSDeployer Script
6. Customized Run (Only run desired Options)
7. Exit
  • LAMP Deployment: Hace un deployment de un servidor LAMP (Linux-Apache-MySQL/MariaDB-PHP) con todos los pasos de Hardening de Jshielder
  • Reverse Proxy Deployment With Apache: Hace un deployment de un Servidor Reverse Proxy basado en Apache. Sigue todos los pasos de Hardening de JShielder, pero no instala php, mysql.
  • LEMP Deployment: Hace un deployment de un servidor LEMP (Linux-NginX-MySQL/MariaDB-PHP )con todos los pasos de Hardening de Jshielder. Puede ser utlizado si se desea desplegar una aplicación web customizada.
  • Reverse Proxy Deployment with Nginx (ModSecurity): Hace un deployment de un Servidor Reverse Proxy basado en Nginx. Sigue todos los pasos de Hardening de JShielder, pero no instala php, mysql. Puede ser utlizado si se desea desplegar una aplicación web customizada.
  • Running With SecureWPDeployer or JSDeployer Script: Esta opción debe ser seleccionado cuando ejecutamos JShielder mediante el script de Deployment Seguro de WordPress, SecureWPDeployer o Joomla. JSDeployer. Sigue todo el proceso de LAMP Deployment de Jshielder pero omite el paso de Reiniciar el Servidor para continuar con el Deployment de WordPress o Joomla.

  • Customized Run (Only run desired Options): Esta Opción le da al usuario un menu para ejecutar solo las funciones deseadas.

    ---------------------------------------------------------------------------------------------------------
[+] SELECT THE DESIRED OPTION
---------------------------------------------------------------------------------------------------------

1. Configure Host Name, Create Legal Banners, Update Hosts Files
2. Configure Timezone
3. Update System
4. Create Admin User
5. Instructions to Generate and move Private/Public key Pair
6. Secure SSH Configuration
7. Set Restrictive IPTable Rules
8. Install and Configure Fail2Ban
9. Install, Optimize and Secure Apache
10. Install Nginx with ModSecurity Module and Set OwaspRules
11. Set Nginx Vhost with PHP
12. Set Nginx Vhost
13. Install and Secure PHP for Apache Server
14. Install and Secure PHP for Nginx Server
15. Install ModSecurity (Apache)and Set Owasp Rules
16. Install ModEvasive
17. Install ModQos and SpamHaus
18. Tune and Secure Linux Kernel
19. Install RootKit Hunter
20. Tune Vim, Nano, Bashrc
21. Install PortSentry
22. Secure tty, root home, grub configs, cron
23. Install Unhide
24. Install Tiger
25. Disable Compilers
26. Enable Unnatended Upgrades
27. Enable Process Accounting
28. Install PHP Suhosin
29. Install and Secure MySQL
30. Set More Restrictive UMASK Value (027)
31. Secure /tmp Directory
32. Install PSAD IDS
33. Exit