segurança em servidores linux - Ênfase em rhel

63
SEGURANÇA EM SERVIDORES LINUX SEGURANÇA EM SERVIDORES LINUX Alessandro Silva Technical Account Manager | Platform 03 Set 2014

Upload: alessandro-silva

Post on 05-Jun-2015

586 views

Category:

Technology


23 download

DESCRIPTION

Não espere seu sistema ser invadido para torná-lo a prova de balas. Antecipe-se e tome as medidas preventivas para proteger seus dados, sistemas e sua reputação profissional. Conheça alguns dos principais recursos para fortalecer a segurança de servidores Linux e minimizar riscos e ameaças de possíveis invasões.

TRANSCRIPT

Page 1: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUXSEGURANÇA EM SERVIDORES LINUX

Alessandro SilvaTechnical Account Manager | Platform03 Set 2014

Page 2: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA2

Sobre o Palestrante

● Bacharel em Informática e Especialista em TI aplicada à Educação - UFRJ

● Pós-graduando em Gerência da Segurança da Informação – UFRJ

● Especialista em Linux com mais de 10 anos na indústria de TI

● Certificações:

● RHCE - Red Hat Certified Engineer● RHCSA -Red Hat Certified System Administrator● LPIC-1, LPIC-2 e LPIC-3✔ Novell CLA e Datacenter Technical Specialist✔ Zabbix Certified Specialist e Zabbix for Large Environments

● Idealizador dos eventos: Fsldc e LinuxinRio

● Technical Account Manager na Red Hat

Page 3: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA3

Agenda

● O que queremos proteger?

● Segurança física e controle de acesso

● Fortalecimento da Instalação

● Gerenciamento do sistema

● Auditoria

● Segurança nos serviços

● Tunando o kernel

● Planejamento de contingência e recuperação de desastres

● Considerações finais

Page 4: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA5

Liderança e inovação com código aberto

Page 5: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA6

O que queremos proteger?

Disponibilidade

Confidencialidade

Integridade

Page 6: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA7

Segurança na InstalaçãoOnde tudo começa!

Page 7: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA8

Segurança física e controle de acesso

● Se existe acesso físico à máquina, a segurança é inexistente!

● Acesso ao servidor

✔ Rack✔ Acesso físico e controle de acesso

● Proteja o BIOS/UEFI

✔ Prevenção de mudanças

✔ Evita boot não autorizado

● Desabilitar periféricos não usados

● No-break, fonte redundante...

● RAID

Page 8: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA9

Instalação

● Escolha sua distribuição

✔ Confiabilidade✔ Suporte✔ Atualização✔ Estabilidade

Page 9: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA10

Instalação

● Qual a fonte da imagem ISO?

✔ Instalação Minimal/Basic

● Particionamento dos discos

✔ Planejamento do particionamento● Diminui o tempo de acesso aos dados● Facilita a recuperação de desastres● Minimiza problemas de indisponibilidade por espaço em disco

● Swap

✔ Prefira não usar✔ Se não tiver escolha, usar SSD!

Page 10: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA11

Instalação

● Use LVM!

● /boot

✔ Kernel, Grub, ...✔ Não deve ser encriptada

● /home

✔ Dados dos usuários● /var/tmp e /tmp

✔ Arquivos temporários ✔ Não são armazenados por longo período.

Page 11: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA12

Instalação

● Instale apenas os pacotes necessários

● Pacotes do sistema precisam vir de fontes seguras

Page 12: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA13

Instalação

● Proteja o gerenciador de boot (Grub) com senha

Page 13: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA14

Pós-instalaçãoJá posso entrar em produção?

Page 14: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA15

Atualização do sistema

● Atualização completa do sistema

✔ yum update

● Checagem de erratas

✔ yum check­update ­­security

● Aplicando as erratas

✔  yum update ­­security

Page 15: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA17

Serviços: Quais devem estar ativos?

● Apenas os serviços necessários!

✔ ntsysv

✔ chkconfig

✔ systemctl● # systemctl list-unit-files● # systemctl disable httpd

 root@myserver:/home/alessandro# chkconfig ­­list httpd httpd        0:off  1:off  2:on   3:on   4:on   5:on   6:off

Page 16: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA18

Serviços: Quais devem estar ativos?

root@myserver [~]# netstat -tnap Conexões Internet Ativas (servidores e estabelecidas)Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:40001 0.0.0.0:* OUÇA 6041/java tcp 0 0 0.0.0.0:1 0.0.0.0:* OUÇA 4904/portsentry tcp 0 0 0.0.0.0:993 0.0.0.0:* OUÇA 4332/dovecot tcp 0 0 0.0.0.0:10050 0.0.0.0:* OUÇA 4017/zabbix_agentd tcp 0 0 0.0.0.0:80 0.0.0.0:* OUÇA 2412/httpd tcp 0 0 0.0.0.0:995 0.0.0.0:* OUÇA 4332/dovecot

root@myserver [~]# netstat -napuConexões Internet Ativas (servidores e estabelecidas)Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name Udp 0 0 192.168.10.78:53 0.0.0.0:* 3561/named udp 0 0 192.168.10.79:53 0.0.0.0:* 3561/named udp 0 0 192.168.10.80:53 0.0.0.0:* 3561/named

TCP

UDP

Page 17: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA19

Serviços: performance x segurança

● ps, netstat

● top, htop, nmon

● lsof, pgrep

● systemtap

Page 18: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA20

Limitando os recursos

● Limitando o acesso root aos terminais✔ /etc/securetty

● Forçar logout para o usuário✔ .bashrc ou /etc/profile

● TMOUT=360

● Limitando o acesso aos recursos ✔ /etc/security/limits.conf

✔ Evite o forkbomb● :(){ :|: &};:

Page 19: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA21

Limitando os recursos

root@myserver:/home/alessandro# ulimit ­u46601

root@myserver:/home/alessandro# ulimit ­tUnlimited

root@myserver:/home/alessandro# ulimit ­funlimited

● Máximo de processos executados simultaneamente

● Tempo máximo de utilização da CPU

● Máximo de arquivos que podem ser criados pelo usuário

Page 20: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA22

Gereciamento do SistemaComo você aplica seus patches de segurança?

Page 21: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA23

Equipe de Resposta a Incidentes

● ERISI

● CSIRT (Computer Security Incident Response Team)

● Investiga e analisa questões relacionadas a segurança de software

● Analisa quais produtos são afetados, seus impactos e contramedidas

● Publicação de erratas

✔ Severidades✔ Impactos✔ CVE ( Common Vulnerabilities and Exposures)

Page 22: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA24

CVE

● Formato padronizado para notificação e acompanhamento de questões de segurança relacionadas a software.

● Mantido pela empresa MITRE Corporation

● Common Vulnerability Scoring System (CVSS)

● Severidades

✔ Crítica

✔ Importante

✔ Moderada

✔ Baixa

Page 23: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA25

Erratas

● Red Hat Security Advisory (RHSA)

● Red Hat Bug Fix Advisory (RHBA)

● Red Hat Enhancement Advisory (RHEA)

Page 24: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA26

Como funciona na prática?

Page 25: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA27

YUM Security Plugin - Instalação

# yum install -y yum-plugin-security

# ls -l /etc/yum/pluginconf.d/

-rw-r--r-- 1 root root 17 Out 16 17:52 product-id.conf

-rw-r--r-- 1 root root 17 Fev 3 07:03 security.conf

-rw-r--r-- 1 root root 17 Out 16 17:52 subscription-manager.conf

# cat /etc/yum/pluginconf.d/security.conf

[main]

enabled=1

Page 26: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA28

YUM Security Plugin – Verificando erratas

# yum updateinfo

Loaded plugins: product­id, refresh­packagekit, rhnplugin, security, subscription­managerThis system is not registered to Red Hat Subscription Management. You can use subscription­manager to register.This system is receiving updates from RHN Classic or RHN Satellite.rhel­x86_64­server­6/updateinfo                                                           | 2.1 MB     00:22   

Updates Information Summary: available     42 Security notice(s)          5 Critical Security notice(s)         15 Important Security notice(s)          7 Low Security notice(s)         15 Moderate Security notice(s)    143 Bugfix notice(s)     13 Enhancement notice(s)updateinfo summary done

Page 27: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA29

Kpatch: dynamic kernel patching

● Permitirá a aplicação de um patch no kernel sem necessidade de reboot do servidor ou restart de qualquer processo.

● SysAdmins poderão aplicar erratas de segurança críticas sem precisar de janelas de manutenção.

● Maior controle de uptime sem sacrificar:

✔ Segurança✔ Disponibilidade✔ Estabilidade

● Encontra-se em desenvolvimento:

✔ https://github.com/dynup/kpatch

Page 28: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA30

Gestão de Atualizações

● Aplicar atualizações

✔ A maior parte dos ataques ocorrem em softwares não atualizados

● Monitoramento após a aplicação

● Gestão de mudanças

● Viabilidade

Page 29: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA31

Red Hat Network Satellite

Page 30: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA32

Monitoramento

Notificações

ControleCentralizado

ConfiguraçãoStatusChecagens

Monitoração SNMP

Monitoração com agente

Monitoração com ping e porta

Dispositivos monitorados

Dispositivos de rede

Servidores com Agente Zabbix

Servidores sem Agente Zabbix

Page 31: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA33

Controle de AcessoEsteja no controle da administração de sistemas

Page 32: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA34

Firewall

● Servir como separação entre sua rede e a Internet

● Permitir o uso legítimo da rede

● Impedir tráfego indevido ao servidor (malicioso)

● Iptables

✔ Avaliação

✔ Busca de regras existentes

● Identificação das necessidades de proteção

● Definição da estratégia

Page 33: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA35

Firewall

Ferramenta de administração do Firewall no Red Hat 6

Page 34: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA36

Proxy e filtros

● Utilização de Proxy

✔ Performance

✔ Controle de acesso● Autenticação e autorização● Filtro de conteúdo (por página, por usuário...)● Relatórios de acessos com SARG

Page 35: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA37

TCP Wrappers

● Ferramenta para autorizar ou negar acesso aos serviços.

✔ Utiliza a biblioteca Libwrap

✔ Para fins de controle utiliza os arquivos:● /etc/hosts.allow● /etc/hosts.deny

✔ Usado em conjunto com o firewall

sshd : client­1.example.com : allowsshd : client­2.example.com : deny

Page 36: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA38

Controle de acesso

● MAC (Mandatory Access Control)

✔ SELINUX (Security-Enhanced Linux)

✔ Padrão no Red Hat Enterprise Linux

● DAC (Discricionary Access Control)

✔ chmod

✔ chattr

● ACL (Access Control List)

✔ Filesystem

Page 37: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA39

root@myserver:/home/alessandro# find / ­type d ­perm ­1000 ­ls

Controle de acesso

● Permissões

● Permissões especiais

✔ SUID, SGID e Stick bit● Atributos

✔ chattr, lsattr● Revisão nos controles de acesso

● SUDO

Page 38: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA40

Auditoria: Use o Audit!

● Mecanismo para rastrear informações de segurança relevantes com base em regras pré-definidas.

● Útil para avaliar a violação da política de segurança e ações realizadas no sistema.

● Audit não provê segurança adicional

● Os eventos são armazenados em logs

● Possíveis violações podem ser evitadas com medidas preventivas com base na análise dos logs.

● Desenhado para atender padrões de segurança:

- Payment Card Industry — Data Security Standard (PCI-DSS)

Page 39: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA41

Auditoria: Satellite + OpenSCAP

● Varredura

● Relatórios

● Análise de conformidade

● Audit

Page 40: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA42

Auditoria: política de login/senhas

root@myserver:/home/alessandro# chage ­l alessandro

PASS_MAX_DAYS   99999PASS_MIN_DAYS   0PASS_WARN_AGE   7LOGIN_RETRIES           5LOGIN_TIMEOUT           60LOGIN_TIMEOUT           60

/etc/login.defs

Última mudança de senha                                  : Mar 16, 2013Senha expira                                      : nuncaSenha inativa                                        : nuncaConta expira                                              : nuncaNúmero mínimo de dias entre troca de senhas              : 0Número máximo de dias entre troca de senhas              : 99999Número de dias de avisos antes da expiração da senha     : 7

Page 41: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA43

Auditoria

root@myserver[~]# whoroot     pts/0        2013­06­29 12:53 (192.168.0.50)root     pts/1        2013­06­29 12:08 (192.168.0.53)

  root@myserver [~]# last   root     pts/0        192.168.0.50    Sat Jun 29 12:53   still logged in     root     pts/1        192.168.0.51    Sat Jun 29 12:08   still logged in     root     pts/0        192.168.0.52    Wed Jun 26 10:37 ­ 11:45  (01:07)      root     pts/0        192.168.0.53    Tue Jun 25 16:23 ­ 16:26  (00:03)    

Who

Last

Page 42: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA44

Segurança no Armazenamento de Dados

● OpenSSL

● GPG

✔ Útil para validar a autenticidade e integridade dos pacotes

● Criptografia do Filesystem

✔ Um notebook do EB foi esquecido em um taxi com informações confidenciais. E agora?

# gpg ­­verify gnupg­1.2.4.tar.bz2.siggpg: Signature made Wed 24 Dec 2003 07:24:58 EST using DSA key ID 57548DCDgpg: Good signature from "Werner Koch (gnupg sig) <[email protected]>"gpg: checking the trustdbgpg: no ultimately trusted keys foundgpg: WARNING: This key is not certified with a trusted signature! There is no indication that the signature belongs to the owner.Fingerprint: 6BD9 050F D8FC 941B 4341 2DCC 68B7 AB89 5754 8DCD

Page 43: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA45

Segurança no Armazenamento de Dados

● Backup

● Estratégia de backup

✔ Storage, fita …

✔ Rotina de backup

✔ Software para backup● Bacula● Amanda

Page 44: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA46

Autenticação de usuários e grupos

● PAM

● OpenLDAP

● Politica de controle de acesso

✔ Existe processo para desabilitar um usuário desligado da empresa?

● Política de senhas

✔ Senhas seguras com letras, números e caracteres especiais✔ Evitar senhas do tipo: empresa@2014, 123qwe, 123456, etc.✔ Senhas conhecidas por constarem em wordlists

● Engenharia social

Page 45: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA47

Segurança nos ServiçosPontos de atenção, riscos e ameaças

Page 46: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA48

Serviços – Alguns dos riscos

● Serviços inseguros✔ Denial of Service Attack (DoS)

✔ Distributed Denial of Service Attack (DDoS)

✔ Script Vunerability Attacks

✔ Buffer Overflow Attacks

Page 47: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA49

Serviços – SSH

● Manter atualizado!

● Acesso remoto ao shell dos servidores

● Tráfego criptografado

● Faz tunelamento com segurança

● Autenticação por senha ou chave

● Indispensável para SysAdmins

Page 48: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA50

Serviços – SSH

● /etc/ssh/sshd_config

● Use chaves!

✔ ssh-keygen

✔ ssh-copy-id

Port 22Protocol 2PermitRootLogin noLoginGraceTime 60PermitEmptyPasswords noAllow users tux linusBanner /etc/issue

Page 49: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA51

Serviços – SSH

● Banner de boas-vindas

● /etc/issue e /etc/issue.net

 

● Configure no SSH

✔ /etc/ssh/sshd_config

     Banner /etc/issue

● Conceito deve ser aplicado a outros serviços!

$ ssh [email protected] somente a usuarios autorizados!Se nao possui dados de acesso, afaste­se sob as penas da [email protected]'s password: 

Page 50: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA52

FTP - VSFTPD

● VSFTPD (Very Secure FTP Daemon)

● Existem outras soluções

✔ ProFTPD, Pure-Ftpd, etc.● Performance

● Estabilidade

● Amplamente utilizado

● Enjaular (CHROOT)

● Manter atualizado!

Page 51: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA53

FTP - VSFTPD

● ftpd_banner=FTP Server

✔ Esconder banner

● anonymous_enable=NO

✔ Desabilita o login anônimo

● write_enable=YES

✔ Permite que o usuário grave informações

● userlist_enable=YES

✔ userlist_file=/etc/vsftpd/vsftpd.deny_users

● chroot_local_user=YES

✔ Enjaule usuários

Page 52: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA54

FTP - VSFTPD

● Controle de acesso

✔ /etc/ftpusers

● Prevenindo ataques de DoS

✔ ls_recurse_enable=NO

✔ max_clients=200

✔ max_per_ip=4

● FTP com SSL

Page 53: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA55

Web Server

● Manter o software atualizado!

● Adicionar suporte a conexões criptografadas

● Observar os módulos de segurança disponíveis

✔ Mod_security, mod_evasive, mod_access, mod_authz

● Ajuste das configurações adequadamente

● Testar as configurações antes de aplicar em produção

✔ apachectl configtest

✔ apachectl graceful!

● Diretórios restritos

✔ .htaccess e htpasswd

Page 54: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA56

● teste

Page 55: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA57

Syslog Centralizado

● rsyslog

● rsyslog-gnutls

● logrotate

SysAdmin

E-mail

rsyslog

Page 56: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA58

Tunando o Kernel

● /proc/sys/net/ipv4/tcp_syncookies

✔ Tenta evitar SYN ATTACK que causa uma negação de serviço

● /proc/sys/net/ipv4/ip_default_ttl

✔ Engana o “OS guessing” em scans

● /proc/sys/net/ipv4/icmp_echo_ignore_all

✔ Bloqueio de pacotes ICMP

● /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

✔ Ignora mensagens enviadas para brodcast

● /proc/sys/net/ipv6/conf/all/disable_ipv6

✔ Desabilita IPV6

Page 57: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA59

Ferramentas de segurança para Linux

● TCPDUMP

● Wireshark

● Ngrep

● Ethereal

● Snort

● AIDE

● TCPDUMP

● Wireshark

● Ngrep

● Ethereal

● Snort

● AIDE

● Nmap

● John the Ripper

● OpenVAS

● CHKRootkit

● OpenVPN

+

Page 58: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA60

Preparando para o desastrePlanejando a contingência e continuídade

Page 59: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA61

BIA - Business Impact Analisys

● Quanto tempo pode ficar parado em caso de um incidente?

● Qual o impacto da indisponibilidade no negócio?

● Quais os requisitos mínimos para retorno a normalidade?

● Há contingência?

● Em caso de um desastre, qual o tempo necessário para retorno a normalidade?

Page 60: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA62

PCO – Plano de Contingência

● Quais os componentes mínimos para manutenção dos serviços do servidor até o retorno a normalidade?

● Contingência não significa 100% de funcionamento

● 100% significa redundância!● Contingência pode ser “não fazer nada”

● Contingência pode ser ...

Page 61: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA63

PRD – Plano de Recuperação de Desastres

● Aplicado ao componente

● Construir ou não um kernel personalizado?

● Kickstart

● Clonezilla

Page 62: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA64

Referências

● Guia de Segurança do Red Hat Enterprise Linux

● Documentação oficial do RHN Satellite

● Ambos disponíveis em: https://access.redhat.com/documentation/

● Hardening Linux, Packet Publisher

● Segurança para Linux, Mc Grall Hill

● http://cve.mitre.org/

Page 63: Segurança em Servidores Linux - Ênfase em RHEL

SEGURANÇA EM SERVIDORES LINUX | ALESSANDRO SILVA65

E-mail: [email protected] no Twitter: @alessssilvaLinkedin: alessandrosilva.info/linkedin

Obrigado!Obrigado!