quinta-feira, 25 de janeiro de 2024

Security pratica

Regras de Segurança, implementando servidores Definir essas flags é uma boa prática para impedir que os atacantes enviem pacotes falsos ao sistema aos quais não é possível responder. Uma instância em que esse recurso é dividido é se o roteamento assimétrico for empregado. Isso ocorreria ao usar protocolos de roteamento dinâmico (bgp, ospf, etc) no seu sistema. Se você estiver usando o roteamento assimétrico no seu sistema, não poderá ativar esse recurso sem interromper o roteamento Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file: net.ipv4.conf.all.rp_filter = 1 net.ipv4.conf.default.rp_filter = 1 Run the following commands to set the active kernel parameters: sysctl -w net.ipv4.conf.all.rp_filter=1 sysctl -w net.ipv4.conf.default.rp_filter=1 sysctl -w net.ipv4.route.flush=1 Verificações de segurança The following command lists all the directories that can be modified by all and without a sticky bit: find / -type d \( -perm -0002 -a \! -perm -1000 \) -ls 2>/dev/null The following command lists all the directories that can be modified by anyone and whose owner is not root: find / -type d -perm -0002 -a \! -uid 0 -ls 2>/dev/null For distributions under systemd, the following command lists all the services installed on the system: # systemctl list-units --type service The following command lists all executable files for which one or more Linux capabilities have been enabled # find / -type f -perm /111 -exec getcap {} \; 2>/dev/null The following command lists all the services listening on the network: # sockstat

Nenhum comentário:

Postar um comentário

RECOVER SENHA UBUNTU