Ho abbandonato l’hosting – Hardening – 3a parte

Un aiuto fondamentale nell’analisi delle vulnerabilità del sistema me le ha fonito

lynys

( https://packages.cisofy.com/community/#debian-ubuntu in quanto analizza il sistema, e poi elenca tutte le criticità trovate, molte inapplicabili, ma molte invece si

  • Determine if protocol ‘dccp’ is really needed on this system [NETW-3200]
    • Related resources
    • Website: https://cisofy.com/lynis/controls/NETW-3200/
  • Determine if protocol ‘sctp’ is really needed on this system [NETW-3200]
    • Related resources
    • Website: https://cisofy.com/lynis/controls/NETW-3200/
  • Determine if protocol ‘rds’ is really needed on this system [NETW-3200]
    • Related resources
    • Website: https://cisofy.com/lynis/controls/NETW-3200/
  • Determine if protocol ‘tipc’ is really needed on this system [NETW-3200]
    • Related resources
    • Website: https://cisofy.com/lynis/controls/NETW-3200/

oppure

  • Consider hardening SSH configuration [SSH-7408]
    • Details : AllowTcpForwarding (set YES to NO)
    • Related resources
    • Article: OpenSSH security and hardening: https://linux-audit.com/ssh/audit-and-harden-your-ssh-configuration/
    • Website: https://cisofy.com/lynis/controls/SSH-7408/
  • Consider hardening SSH configuration [SSH-7408]
    • Details : ClientAliveCountMax (set 3 to 2)
    • Related resources
    • Article: OpenSSH security and hardening: https://linux-audit.com/ssh/audit-and-harden-your-ssh-configuration/
    • Website: https://cisofy.com/lynis/controls/SSH-7408/
  • Consider hardening SSH configuration [SSH-7408]
    • Details : LogLevel (set INFO to VERBOSE)
    • Related resources
    • Article: OpenSSH security and hardening: https://linux-audit.com/ssh/audit-and-harden-your-ssh-configuration/
    • Website: https://cisofy.com/lynis/controls/SSH-7408/

ed alla fine valuta quanto è robusta la tua configurazione e la mia è passata da 67 a 82.

Bisogna in ogni caso leggere con attenzione le note, in quanto (per esempio) avendo il serve su container, lisys continuava a leggere la configurazione “reale” e non vedeva che e stato configurato in maniera differente od anche il servizio fail2ban non è necessario in quanto l’installazione del sistema IDS è fatto con CrowdSec e quindi fail2ban è inutile.

Oppure i pacchetti cancellati, ma non purged:

dpkg -l | grep "^rc"


I pacchetti con stato rc sono quelli rimossi ma non purgati (r=removed, c=config files remain).: purga tutti in un colpo


sudo dpkg --purge $(dpkg -l | grep "^rc" | awk '{print $2}')


Poi verifica:


bashdpkg -l | grep "^rc"

nessun outpu = tutto ok !

Alla fine della cura 0 Warning e 22 suggestions

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Questo sito utilizza Akismet per ridurre lo spam. Scopri come vengono elaborati i dati derivati dai commenti.