O documento apresenta uma agenda detalhada sobre o scanner de vulnerabilidades Nessus, incluindo tópicos como arquitetura, instalação, configuração, plugins, relatórios e uso.
1. Nessus – Scanner de
Vulnerabilidades
Mauro Risonho de Paula Assumpção
Nsec Network Security and Pentesting
mauro.risonho@nsec.com.br
2006
2. Agenda Oficial do Site
Portas e Serviços IP
Segurança da Máquina
O que é Varredura e Tecnicas de Varreduras
Tipos de Portas Clássicas, Demonstrações e
Práticas reais
O que é uma ameaça, avaliar ameaças, riscos
à segurança de redes
dentificar as necessidades de segurança de
rede, causas dos problemas, características,
fatores motivadores de invasão de rede e
ameaças mais significativas
3. Agenda Oficial do Site
Conceito de Vulnerabilidade, Ameaça, Risco,
Plano de Contingência, Gerenciamento de
Risco, Invasor, Metodologias de Seguranças
na Grandes Empresas
Exemplo de informações sensíveis em um
sistema e casos de usos na área de segurança
e exemplos
O que é Nessus
4. Agenda Oficial do Site
Tipos de licenciamento
Arquitetura
Instalação
Configuração
Plugins
Linguagem de Programação para Vulnerabilidades
NASL (Nessus Attack Scripting Language) baseada
em C
5. Agenda Oficial do Site
Usando o Nessus
Comandos via shell console e via interface gráfica
Relatórios
Uso em conjunto com NMAP
Testes iniciais, simulações de ambiente e exemplos
Uso Técnicas de Verificação Black Box (Caixa
Preta) e White Box (Caixa Branca)
Modelos Contratos e Políticas para garantir o
profissional da área de segurança e seus clientes
Principais centros de Bugs-Tracks e
Vulnerabilidade e outros sites Relativos
6. Agenda
Introdução ao Nessus
Tempo de Varredura e Scanning
Arquitetura do Nessus
Nessus em Ação
Metodologias para Scanning
Relatórios
7. Introdução ao Nessus
Uma ferramenta ”Livre, Poderosa, fácil de usar
e atualizar, scanner de segurança remota”.
Open-source, livre para usar, modificar e etc.
Definições de Vulnerabilidades, chamadas
Plugins, na versão Home atendem bem as
necessidades.
Fácil de manter a persperctiva sobre Scanning
de Vulnerabilidades.
8. Introdução ao Nessus
Plugins – Usa uma linguagem própria (NASL),
semelhante a linguagem C, para determinar
como os testes de vulnerabilidades serao
feitos.
Arquitetura Cliente/Servidor – Cliente e
Servidor podendo ser usado em qualquer lugar
da rede.
Porta: 31337 Será detectado com Servidor de
FTP
9. Introdução ao Nessus
Scanning Inteligente – FTP anônimo
Relatórios providenciam listas de
vulnerabilidades e grande número de soluções.
Cliente / Servidor – usa criptografia SSL para
proteger resultados dos relatórios
10. Tempo de Varredura e Scanning
Demora muito fazer varreduras e gerar relatorios ?
(Depende)
Número de Hosts
Número de Portas Abertas
Número de Servicos sendo executados nestas Portas
Qual tipo de host (Windows, Linux, Mac e outros
dispositivos).
Dimensionamento do Hardware
11. Tempo de Varredura e Scanning
Demora muito fazer varreduras e gerar relatorios ?
(Depende)
Quanto hosts possuem firewalls.
Velocidade da rede
Outros trafegos de rede
Quantas vulnerabilidades possuem
Se o(s) Host(s) travam depois do scanning do primeiro
plugin ou antes do ultimo plugin.
12. Tempo de Varredura e Scanning
1 Host = 1 manha ou 1 tarde
Mais de 1 Host = 1 Dia
Toda Classe C Subnet = 2 – 3 Dias
Toda Classe B = Semanas
Toda Classe A = ???
13. Planejamento
de Métodos de
Segurança
de
ç ã o d es e
alia da os
Av rabili Risc
l ne de e
Vu álise e ção çã o
An Sel anta es
l õ
e s; Imp Soluç
e triz s ; de
Dir lítica ;
Po rões tos
n
Pad dime res
nto ce do
a m e as
nci nç ias
, , Pro ndica
Ge re Muda
ditor ência &I e
de Au nting ação to o
Co uper en ã
c a m taç
Re in ci
Tr e a pa
C
ração
Monitoração de
Indicadores de
Segurança
Etapas das Metodologias
17. Mercado de Trabalho
Empresas de pequeno porte
Poucos recursos finaceiros
Acúmulo de funções:
− Administrador de sistemas (analista de segurança)
− Programador (noções de segurança)
Empresas de médio e grande porte
Equipe dedicada aos eventos de segurança
Time de resposta à incidentes
Empresas especializadas
Open Communications Security / Módulo
19. Nessus Server
É um daemon (Serviço em execução) foco
mais em plataforma UNIX (Unix, Linux, *BSD)
20. Nessus – Report (Relatórios)
Em diferentes formatos (XML, NSE, NRE,
HTML, HTML com Gráficos, TXT e outros)
Problema – Como encaminhar estes relatórios
com segurança ao cliente (usuário)?
21. Nessus - Comercial
http://www.tenablesecurity.com/ - Complete
Nessus Systems
Renaud Deraison - Director of Research
(Criador)
Ron Gula - Chief Technology Officer
Nessus Consoles, Proxies, and
Appliances(Nessus Scanner BoxS)
22. Nessus – Combinações com
Aplicações
Os resultados dos relatórios (XML, TXT)
podem ser inseridos em um banco de dados
Os resultados dos relatórios podem ser
exibidos em páginas de internet usando um
servidor de web.
As contas dos usuários com vulnerabilidades
podem ser vistos nos relatórios.
23. Metodologias Scannings
Alguns usuários podem usar e scannear seu
próprio computador (se for o caso) e enviar o(s)
relatório(s)
Você pode fazer scanning de um range de Ips
e obter o(s) relatório(s)
Alguns usuários podem usar e scannear seu
próprio computador (se for o caso), mediante
ao servidor e o próprio lhe enviar o(s)
relatório(s)
Quando um usuário conectar à rede, o próprio
Nessus pode conectar à máquina do usuário e
iniciar um scanning (popular com conexões
wireless e VPN)
24. Metodologias Scannings
O servidor pode realizar scanning regulares
(diários, semanais e mensais) e o próprio lhe
enviar o(s) relatório(s) para comparação dos
mesmos.
25. Nessus - elementos
Nessus
O Cliente parte de suite Nessus Security Scanner
Exemplo:
nessus c /root/nessus/nessus.rc T html qx
localhost 1241 batch batch1
/root/nessus/target
/var/www/html/nessus/results.html
26. Nessus - elementos
Nessus
Sintaxe:
nessus [v] [h] [n] [T <type>] [q [pPS]
host port user password targets results]
nessus i in.[nsr|nbe] o out.[html|xml|nsr|
nbe]
27. Nessus - elementos
Nessus
opções:
c <configfile>, configfile=<configfile>
use another configuration file.
n, nopixmaps
no pixmaps. This is handy if you are running
nessus on a remote computer.
28. Nessus - elementos
Nessus
opções:
q, batchmode
quiet mode or batch mode. Setting this option
makes the nessus client expect all of the
following settings..
p
obtain list of plugins installed on the server.
P
obtain list of server and plugin preferences.
29. Nessus - elementos
Nessus
opções:
host
is the nessusd host to whom you will connect.
port
is the port to which you will connect on the
remote nessusd host.
user
is the user name to use to connect to nessusd.
30. Nessus - elementos
Nessus
opções:
password
is the password associated with this user name.
targets
is the name of a file containing the target
machines.
results
is the name of the file where the results will be
stored at the end of the test.
31. Nessus - elementos
opções:
r <reportfile>, openreport=<reportfile>
Using the GUI, nessus visualizes a report file from a
previous session. Repeating this option, more files
are displayed.
T <type>, outputtype="<type>"
Save the data as <type>, where <type> can be
“nbe”, “html”, “html_graph”, “text”, “xml”, “old-xml”,
“tex” or “nsr”.
V, verbose
make the batch mode display status messages to
the screen.
32. Nessus - elementos
Nessus
opções:
x, dontchecksslcert
do not check SSL certificates.
v, version
shows version number and quits.
h, help
lists the available options
33. Nessus - elementos
Nessus
arquivo importante – pasta Home do Usuário:
~/.nessusrc
is the client configuration file, which contains the
options about which nessusd server to connect
to, which plugins to activate, and so on. The
file is created automatically if it does not exist.
34. Nessus - elementos
nessus-adduser
add a user in the nessusd userbase
Exemplo:
nessusadduser
35. Nessus - elementos
nessus-adduser
uso:
Login
the login name of the nessusd user to add.
Password
the password that the user will use to connect to nessusd.
Authentification type
the authentification method the client will use. The
recommended method is “cipher”. However, if you
compiled nessusd without the cipher support or if you are
using a Nessus client which does not support the cipher
layer, you’ll have to use “plaintext”
36. Nessus - elementos
nessus-adduser
uso:
Rules
the set of rules to apply to the user. See below.
37. Nessus - elementos
nessus-adduser
Rules:
Each user has his own set of rules. Rules are
here to restrict the rights of the users. For
instance, you can add user “joe” so that he
can only test the host
“192.168.1.1”, whereas you can add user “bob” so
that he can test whatever IP address he
wishes.
Each rule fits on one line. A user can have an
unlimited amount of rules (and can even have
no rule at all).
38. Nessus - elementos
nessus-adduser
Rules:
Each rule fits on one line. A user can have an
unlimited amount of rules (and can even have
no rule at all).
The syntax is:
accept|deny ip/mask
and
default accept|deny
39. Nessus - elementos
nessus-adduser
Rules:
Where mask is the CIDR netmask of the rule.
The default statement must be the last rule and defines
the policy of the user.
The following rule set will allow the user to test
192.168.1.0/24, 192.168.3.0/24 and 172.22.0.0/16, but
nothing else:
accept 192.168.1.0/24
accept 192.168.3.0/24
accept 172.22.0.0/16
default deny
40. Nessus - elementos
nessus-adduser
Rules:
The following rule set will allow the user to test
whatever he wants, except the network 192.168.1.0/24:
deny 192.168.1.0/24
default accept
The keyword client_ip has been defined, and is replaced
at run time by the IP address of the nessusd user.
For instance, if you want your users to be able to
only be able to scan the system they come from, then
you want them to have the following ruleset:
accept client_ip
default deny
41. Nessus - elementos
nessus-build
opções:
password
is the password associated with this user name.
targets
is the name of a file containing the target
machines.
results
is the name of the file where the results will be
stored at the end of the test.
42. Nessus - elementos
nessus-build
build a Nessus plugin from a C source file
Exemplo:
nessusbuild exploitIIS.c exploitIIS.nes
43. Nessus - elementos
nessus-check-signature
A simple utility to check (or generate) the
signature of plugins retrieved from
www.nessus.org
Exemplo:
nessusbuild exploitIIS.c exploitIIS.nes
44. Nessus - elementos
nessus-adduser
Using /var/tmp as a temporary file holder
Add a new nessusd user
----------------------
Login : teste
Authentication (pass/cert) [pass] :
Login password :
Login password (again)
45. Nessus - elementos
User rules
----------
nessusd has a rules system which allows you to
restrict the hosts
that teste has the right to test. For instance, you
may want
him to be able to scan his own host only.
Please see the nessus-adduser(8) man page for
the rules syntax
46. Nessus - elementos
Login: teste
Password: ***********
DN:
Rules:
Is that ok ? (y/n) [y] y
user added.
49. Referências
Official site
http://www.nessus.org/
Developers site
http://cvs.nessus.org/
AUTHORS
The Nessus Project was started and is being maintained by Renaud
Deraison <deraison@cvs.nessus.org>. The nessusd server is mainly
Copyright (C) 1998-2001 Renaud Deraison, as well as the attack
modules. Several other people have been kind enough to send
patches and bug reports. Thanks to them