Linux voce-esta-seguro

50
GNU/Linux, você está seguro? Luciano Antonio Borguetti Faustino [email protected] Digitro - NDS 1 de julho de 2013 1 / 13

Transcript of Linux voce-esta-seguro

Page 1: Linux voce-esta-seguro

GNU/Linux, você está seguro?

Luciano Antonio Borguetti [email protected]

Digitro - NDS

1 de julho de 2013

1 / 13

Page 2: Linux voce-esta-seguro

Apresentação

Luciano Antonio Borguetti Faustino

Natural do interior de São Paulo, 2 anos em Florianópolis

Trabalho com GNU/Linux há mais de 10 anos ...

Não sou especialista em segurança e muito menos em GNU/Linux, só um curioso!

Viciado em esportes de endurance (esportes/provas de longa duração/distancia)!

http://lucianoborguetti.wordpress.com

2 / 13

Page 3: Linux voce-esta-seguro

Apresentação

Roteiro

1) Vírus para Linux? Existe?2) Hardening.3) Instalação de Softwares.

3 / 13

Page 4: Linux voce-esta-seguro

Apresentação

Roteiro

1) Vírus para Linux? Existe?

2) Hardening.3) Instalação de Softwares.

3 / 13

Page 5: Linux voce-esta-seguro

Apresentação

Roteiro

1) Vírus para Linux? Existe?2) Hardening.

3) Instalação de Softwares.

3 / 13

Page 6: Linux voce-esta-seguro

Apresentação

Roteiro

1) Vírus para Linux? Existe?2) Hardening.3) Instalação de Softwares.

3 / 13

Page 7: Linux voce-esta-seguro

Apresentação

Sobre o que não vamos falar?

1) Não vamos demonstrar técnicas de ataque! só na palestra do @henriquemecking.Ok, pelo menos uma escalada de privilégios se der tempo ...

2) Comparação entre GNU/Linux e Windows.3) Futebol :P

4 / 13

Page 8: Linux voce-esta-seguro

Apresentação

Sobre o que não vamos falar?

1) Não vamos demonstrar técnicas de ataque! só na palestra do @henriquemecking.Ok, pelo menos uma escalada de privilégios se der tempo ...

2) Comparação entre GNU/Linux e Windows.3) Futebol :P

4 / 13

Page 9: Linux voce-esta-seguro

Apresentação

Sobre o que não vamos falar?

1) Não vamos demonstrar técnicas de ataque! só na palestra do @henriquemecking.Ok, pelo menos uma escalada de privilégios se der tempo ...

2) Comparação entre GNU/Linux e Windows.

3) Futebol :P

4 / 13

Page 10: Linux voce-esta-seguro

Apresentação

Sobre o que não vamos falar?

1) Não vamos demonstrar técnicas de ataque! só na palestra do @henriquemecking.Ok, pelo menos uma escalada de privilégios se der tempo ...

2) Comparação entre GNU/Linux e Windows.3) Futebol :P

4 / 13

Page 11: Linux voce-esta-seguro

Vírus para GNU/Linux

Não uso Windows, estou seguro

Matéria de 2006, onde o autor Andy Patrizio já fala que assumir que está seguro só pornão usar Windows não é uma verdade!

Assuming you’re safe from viruses and other malware just because you are on a non-Windows platform is a big mistake, as the number of Linux-based malware doubled in2005, and Mac OS X is next to get hit, according to a report from Kaspersky Labs.In a report titled "2005: *nix Malware Evolution,"the Russian antivirus software developerpointed out that the number of Linux-based malicious programs – viruses, Trojans, back-doors, exploits, and whatnot – doubled from 422 to 863.

April 27, 2006 - Andy Patrizio

fonte: http://www.internetnews.com/dev-news/article.php/3601946

5 / 13

Page 12: Linux voce-esta-seguro

Vírus para GNU/Linux

Não uso Windows, estou seguro

Matéria de 2006, onde o autor Andy Patrizio já fala que assumir que está seguro só pornão usar Windows não é uma verdade!

Assuming you’re safe from viruses and other malware just because you are on a non-Windows platform is a big mistake, as the number of Linux-based malware doubled in2005, and Mac OS X is next to get hit, according to a report from Kaspersky Labs.In a report titled "2005: *nix Malware Evolution,"the Russian antivirus software developerpointed out that the number of Linux-based malicious programs – viruses, Trojans, back-doors, exploits, and whatnot – doubled from 422 to 863.

April 27, 2006 - Andy Patrizio

fonte: http://www.internetnews.com/dev-news/article.php/3601946

5 / 13

Page 13: Linux voce-esta-seguro

Vírus para GNU/Linux

Bliss

Bliss - http://math-www.uni-paderborn.de/ axel/bliss/

1) A primeira aparição na lista linux-security aconteceu em janeiro de 19972) Ele tentava infectar todos os binários do sistema e onde tinha um bash3) Alan Cox respondeu:

"In theory you can write a virus for any OS if the owner is dumb enough to installunchecked binaries as root."

fonte: http://math-www.uni-paderborn.de/ axel/bliss/alan_reply.txt

6 / 13

Page 14: Linux voce-esta-seguro

Vírus para GNU/Linux

Bliss

Bliss - http://math-www.uni-paderborn.de/ axel/bliss/

1) A primeira aparição na lista linux-security aconteceu em janeiro de 1997

2) Ele tentava infectar todos os binários do sistema e onde tinha um bash3) Alan Cox respondeu:

"In theory you can write a virus for any OS if the owner is dumb enough to installunchecked binaries as root."

fonte: http://math-www.uni-paderborn.de/ axel/bliss/alan_reply.txt

6 / 13

Page 15: Linux voce-esta-seguro

Vírus para GNU/Linux

Bliss

Bliss - http://math-www.uni-paderborn.de/ axel/bliss/

1) A primeira aparição na lista linux-security aconteceu em janeiro de 19972) Ele tentava infectar todos os binários do sistema e onde tinha um bash

3) Alan Cox respondeu:

"In theory you can write a virus for any OS if the owner is dumb enough to installunchecked binaries as root."

fonte: http://math-www.uni-paderborn.de/ axel/bliss/alan_reply.txt

6 / 13

Page 16: Linux voce-esta-seguro

Vírus para GNU/Linux

Bliss

Bliss - http://math-www.uni-paderborn.de/ axel/bliss/

1) A primeira aparição na lista linux-security aconteceu em janeiro de 19972) Ele tentava infectar todos os binários do sistema e onde tinha um bash3) Alan Cox respondeu:

"In theory you can write a virus for any OS if the owner is dumb enough to installunchecked binaries as root."

fonte: http://math-www.uni-paderborn.de/ axel/bliss/alan_reply.txt

6 / 13

Page 17: Linux voce-esta-seguro

Vírus para GNU/Linux

Rootkits

Root + kit (kit de ferramentas)

The term rootkit or root kit originally referred to a maliciously modified set of administrativetools for a Unix-like operating system that granted "root"access.[2] If an intruder could re-place the standard administrative tools on a system with a rootkit, the intruder could obtainroot access over the system whilst simultaneously concealing these activities from the le-gitimate system administrator.

fonte: http://en.wikipedia.org/wiki/Rootkitcaso real: http://lucianoborguetti.wordpress.com/2009/12/07/possible-t0rn-v8-or-variation-rootkit-installe/

7 / 13

Page 18: Linux voce-esta-seguro

Vírus para GNU/Linux

Rootkits

Root + kit (kit de ferramentas)

The term rootkit or root kit originally referred to a maliciously modified set of administrativetools for a Unix-like operating system that granted "root"access.[2] If an intruder could re-place the standard administrative tools on a system with a rootkit, the intruder could obtainroot access over the system whilst simultaneously concealing these activities from the le-gitimate system administrator.

fonte: http://en.wikipedia.org/wiki/Rootkitcaso real: http://lucianoborguetti.wordpress.com/2009/12/07/possible-t0rn-v8-or-variation-rootkit-installe/

7 / 13

Page 19: Linux voce-esta-seguro

Vírus para GNU/Linux

Hydra

Heads of the Hydra. Malware for Network Devices

Network devices such as routers, access points and DSL modems are an integral partof today’s home and small office networks. Typically, these devices will have been pro-vided by a user’s ISP or bought to extend a user’s existing infrastructure and are usuallymanaged by people who do not have any special technical knowledge. Often poorly config-ured and vulnerable, such devices are an easy target for network-based attacks, allowingcybercriminals to quickly and easily gain control over a network. Surprisingly perhaps,these seemingly innocuous devices can also offer a perfect hiding place for malware.

fonte: http://www.securelist.com/en/analysis/204792187/ Heads_of_the_Hydra_Malware_for_Network_Devices

8 / 13

Page 20: Linux voce-esta-seguro

Vírus para GNU/Linux

Hydra

Heads of the Hydra. Malware for Network Devices

Network devices such as routers, access points and DSL modems are an integral partof today’s home and small office networks. Typically, these devices will have been pro-vided by a user’s ISP or bought to extend a user’s existing infrastructure and are usuallymanaged by people who do not have any special technical knowledge. Often poorly config-ured and vulnerable, such devices are an easy target for network-based attacks, allowingcybercriminals to quickly and easily gain control over a network. Surprisingly perhaps,these seemingly innocuous devices can also offer a perfect hiding place for malware.

fonte: http://www.securelist.com/en/analysis/204792187/ Heads_of_the_Hydra_Malware_for_Network_Devices

8 / 13

Page 21: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Desativar serviços desnecessários e Proteger serviços/recursos sensíveis.

Não é exclusivo para o GNU/Linux

Securing your Linux server is important to protect your data, intellectual property, and time,from the hands of crackers (hackers). The system administrator is responsible for securityLinux box. In this first part of a Linux server security series, I will provide 20 hardening tipsfor default installation of Linux system

fonte: http://www.cyberciti.biz/tips/linux-security.html

9 / 13

Page 22: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Desativar serviços desnecessários e Proteger serviços/recursos sensíveis.

Não é exclusivo para o GNU/Linux

Securing your Linux server is important to protect your data, intellectual property, and time,from the hands of crackers (hackers). The system administrator is responsible for securityLinux box. In this first part of a Linux server security series, I will provide 20 hardening tipsfor default installation of Linux system

fonte: http://www.cyberciti.biz/tips/linux-security.html

9 / 13

Page 23: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Desativar serviços desnecessários e Proteger serviços/recursos sensíveis.

Não é exclusivo para o GNU/Linux

Securing your Linux server is important to protect your data, intellectual property, and time,from the hands of crackers (hackers). The system administrator is responsible for securityLinux box. In this first part of a Linux server security series, I will provide 20 hardening tipsfor default installation of Linux system

fonte: http://www.cyberciti.biz/tips/linux-security.html

9 / 13

Page 24: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Minimize Software to Minimize Vulnerability

- Remova softwares que não serão utilizados

Keep Linux Kernel and Software Up to Date- Mantenha o sistema atualizado

Use Linux Security Extensions- SELinux e Apparmor

User Accounts and Strong Password Policy- Não use senhas bizarras

10 / 13

Page 25: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Minimize Software to Minimize Vulnerability- Remova softwares que não serão utilizados

Keep Linux Kernel and Software Up to Date- Mantenha o sistema atualizado

Use Linux Security Extensions- SELinux e Apparmor

User Accounts and Strong Password Policy- Não use senhas bizarras

10 / 13

Page 26: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Minimize Software to Minimize Vulnerability- Remova softwares que não serão utilizados

Keep Linux Kernel and Software Up to Date

- Mantenha o sistema atualizado

Use Linux Security Extensions- SELinux e Apparmor

User Accounts and Strong Password Policy- Não use senhas bizarras

10 / 13

Page 27: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Minimize Software to Minimize Vulnerability- Remova softwares que não serão utilizados

Keep Linux Kernel and Software Up to Date- Mantenha o sistema atualizado

Use Linux Security Extensions- SELinux e Apparmor

User Accounts and Strong Password Policy- Não use senhas bizarras

10 / 13

Page 28: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Minimize Software to Minimize Vulnerability- Remova softwares que não serão utilizados

Keep Linux Kernel and Software Up to Date- Mantenha o sistema atualizado

Use Linux Security Extensions

- SELinux e Apparmor

User Accounts and Strong Password Policy- Não use senhas bizarras

10 / 13

Page 29: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Minimize Software to Minimize Vulnerability- Remova softwares que não serão utilizados

Keep Linux Kernel and Software Up to Date- Mantenha o sistema atualizado

Use Linux Security Extensions- SELinux e Apparmor

User Accounts and Strong Password Policy- Não use senhas bizarras

10 / 13

Page 30: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Minimize Software to Minimize Vulnerability- Remova softwares que não serão utilizados

Keep Linux Kernel and Software Up to Date- Mantenha o sistema atualizado

Use Linux Security Extensions- SELinux e Apparmor

User Accounts and Strong Password Policy

- Não use senhas bizarras

10 / 13

Page 31: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Minimize Software to Minimize Vulnerability- Remova softwares que não serão utilizados

Keep Linux Kernel and Software Up to Date- Mantenha o sistema atualizado

Use Linux Security Extensions- SELinux e Apparmor

User Accounts and Strong Password Policy- Não use senhas bizarras

10 / 13

Page 32: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Disable Unwanted Services

- Desative serviços desnecessários

Find Listening Network Ports- Procure por portas abertas

Configure Iptables and TCPWrappers- Configure o firewall

Turn Off IPv6- Se não vai utilizar, desative

11 / 13

Page 33: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Disable Unwanted Services- Desative serviços desnecessários

Find Listening Network Ports- Procure por portas abertas

Configure Iptables and TCPWrappers- Configure o firewall

Turn Off IPv6- Se não vai utilizar, desative

11 / 13

Page 34: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Disable Unwanted Services- Desative serviços desnecessários

Find Listening Network Ports

- Procure por portas abertas

Configure Iptables and TCPWrappers- Configure o firewall

Turn Off IPv6- Se não vai utilizar, desative

11 / 13

Page 35: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Disable Unwanted Services- Desative serviços desnecessários

Find Listening Network Ports- Procure por portas abertas

Configure Iptables and TCPWrappers- Configure o firewall

Turn Off IPv6- Se não vai utilizar, desative

11 / 13

Page 36: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Disable Unwanted Services- Desative serviços desnecessários

Find Listening Network Ports- Procure por portas abertas

Configure Iptables and TCPWrappers

- Configure o firewall

Turn Off IPv6- Se não vai utilizar, desative

11 / 13

Page 37: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Disable Unwanted Services- Desative serviços desnecessários

Find Listening Network Ports- Procure por portas abertas

Configure Iptables and TCPWrappers- Configure o firewall

Turn Off IPv6- Se não vai utilizar, desative

11 / 13

Page 38: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Disable Unwanted Services- Desative serviços desnecessários

Find Listening Network Ports- Procure por portas abertas

Configure Iptables and TCPWrappers- Configure o firewall

Turn Off IPv6

- Se não vai utilizar, desative

11 / 13

Page 39: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Disable Unwanted Services- Desative serviços desnecessários

Find Listening Network Ports- Procure por portas abertas

Configure Iptables and TCPWrappers- Configure o firewall

Turn Off IPv6- Se não vai utilizar, desative

11 / 13

Page 40: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Disable Unwanted Services- Desative serviços desnecessários

Find Listening Network Ports- Procure por portas abertas

Configure Iptables and TCPWrappers- Configure o firewall

Turn Off IPv6- Se não vai utilizar, desative

11 / 13

Page 41: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Secure OpenSSH ServerWorkstations and laptop can work without OpenSSH server

- Desative ou ative quando for usar

Não tem como viver sem ele?

http://www.cyberciti.biz/tips/linux-unix-bsd-openssh-server-best-practices.html

12 / 13

Page 42: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Secure OpenSSH ServerWorkstations and laptop can work without OpenSSH server- Desative ou ative quando for usar

Não tem como viver sem ele?

http://www.cyberciti.biz/tips/linux-unix-bsd-openssh-server-best-practices.html

12 / 13

Page 43: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Secure OpenSSH ServerWorkstations and laptop can work without OpenSSH server- Desative ou ative quando for usar

Não tem como viver sem ele?

http://www.cyberciti.biz/tips/linux-unix-bsd-openssh-server-best-practices.html

12 / 13

Page 44: Linux voce-esta-seguro

Hardening

GNU/Linux Hardening

Secure OpenSSH ServerWorkstations and laptop can work without OpenSSH server- Desative ou ative quando for usar

Não tem como viver sem ele?

http://www.cyberciti.biz/tips/linux-unix-bsd-openssh-server-best-practices.html

12 / 13

Page 45: Linux voce-esta-seguro

Instalação de Softwares

Cuidados básicos

Sempre verifique a integridade antes de instalar qualquer pacote ou compilar qualquercódigo fonte.

md5sha1gpg

https://fedoraproject.org/pt_BR/keyshttp://httpd.apache.org/download.cgi#verify

13 / 13

Page 46: Linux voce-esta-seguro

Instalação de Softwares

Cuidados básicos

Sempre verifique a integridade antes de instalar qualquer pacote ou compilar qualquercódigo fonte.

md5

sha1gpg

https://fedoraproject.org/pt_BR/keyshttp://httpd.apache.org/download.cgi#verify

13 / 13

Page 47: Linux voce-esta-seguro

Instalação de Softwares

Cuidados básicos

Sempre verifique a integridade antes de instalar qualquer pacote ou compilar qualquercódigo fonte.

md5sha1

gpg

https://fedoraproject.org/pt_BR/keyshttp://httpd.apache.org/download.cgi#verify

13 / 13

Page 48: Linux voce-esta-seguro

Instalação de Softwares

Cuidados básicos

Sempre verifique a integridade antes de instalar qualquer pacote ou compilar qualquercódigo fonte.

md5sha1gpg

https://fedoraproject.org/pt_BR/keyshttp://httpd.apache.org/download.cgi#verify

13 / 13

Page 49: Linux voce-esta-seguro

Instalação de Softwares

Cuidados básicos

Sempre verifique a integridade antes de instalar qualquer pacote ou compilar qualquercódigo fonte.

md5sha1gpg

https://fedoraproject.org/pt_BR/keyshttp://httpd.apache.org/download.cgi#verify

13 / 13

Page 50: Linux voce-esta-seguro

Instalação de Softwares

Cuidados básicos

Sempre verifique a integridade antes de instalar qualquer pacote ou compilar qualquercódigo fonte.

md5sha1gpg

https://fedoraproject.org/pt_BR/keyshttp://httpd.apache.org/download.cgi#verify

13 / 13