Sei sulla pagina 1di 5

OpenVAS - Linuxmemo

Page 1 sur 5

OpenVAS
De Linuxmemo.
The Open Vulnerability Assessment System (OpenVAS) is a framework of several services and
tools offering a comprehensive and powerful vulnerability scanning and vulnerability management
solution.

Sommaire
1 Installation et setup
2 Clients
3 Service
4 Data
5 Metasploit plugin
6 Code status
7 NVT OID
8 Recettes
8.1 Conversion VM
8.2 Import
8.3 Export db Metasploit
8.4 Export db Postgres
9 Bugs

Installation et setup
Step 1: Configure OBS Repository
sudo
sudo
sudo
sudo

apt-get -y install python-software-properties


add-apt-repository "deb http://download.opensuse.org/repositories/security:/OpenVAS:/UNSTABLE:/v5/xUbuntu_12
apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys BED1E87979EAFD54
apt-get update

Step 2: Quick-Install OpenVAS

sudo apt-get -y install greenbone-security-assistant gsd openvas-cli openvas-manager openvas-scanner openvas-admi

Step 3: Quick-Start OpenVAS


(copy and paste whole block, during first time you will be asked to set a password for user "admin")
test -e /var/lib/openvas/CA/cacert.pem
sudo openvas-nvt-sync

|| sudo openvas-mkcert -q

http://linuxmemo.free.fr/index.php?title=OpenVAS

12/06/2015

OpenVAS - Linuxmemo

Page 2 sur 5

test -e /var/lib/openvas/users/om || sudo openvas-mkcert-client -n om -i


sudo /etc/init.d/openvas-manager stop
sudo /etc/init.d/openvas-scanner stop
sudo openvassd
sudo openvasmd --migrate
sudo openvasmd --rebuild
sudo killall openvassd
sleep 15
sudo /etc/init.d/openvas-scanner start
sudo /etc/init.d/openvas-manager start
sudo /etc/init.d/openvas-administrator restart
sudo /etc/init.d/greenbone-security-assistant restart
test -e /var/lib/openvas/users/admin || sudo openvasad -c add_user -n admin -r Admin

Step 4: Log into OpenVAS as "admin"


Open https://localhost:9392/
or
start "gsd" on a command line as a regular user (not as root!).

Clients
OpenVAS-Client - Obsolte car rest a la version du protocole OMP
/usr/bin/OpenVAS-Client

OpenVAS CLI - Ligne de commande


/usr/bin/omp
omp -h 127.0.0.1 -p 9390 -u admin -w pass -X '<help/>'

Ref des commandes OMPv3: http://www.openvas.org/openvas-cr-28.html


Greenbone Security Assistant - Service web
/usr/sbin/gsad

Greenbone Security Desktop - Programme client "bureau"


/usr/bin/gsd

Service
OpenVAS-Scanner
le scanner OpenVAS

OpenVas-Manager

fonctionnalits pour grer et organiser les rsultats de l'analyse, agit comme une couche entre le scanner OpenVA

http://linuxmemo.free.fr/index.php?title=OpenVAS

12/06/2015

OpenVAS - Linuxmemo

Page 3 sur 5

OpenVAS-Administrator

openvasad
gestion des comptes utilisateur et la gestion des feeds
openvasad --enable-modify-settings -c set_role -u openvas -r Admin
openvasad --enable-modify-settings -c <modify_user> <name>Foobar</name> <password modify="0"> </password> <role>A

Ref des commandes OAP: http://www.openvas.org/openvas-cr-30.html

Data
NVT's
For online-synchronisation use the command
openvas-nvt-sync

to update your local NVTs with the newest ones from the feed service. The command allows rsync,
wget or curl as transfer method. The feed is usually updated every weekday.
via proxy
If you have newer version of openvas-scanner (3.0.1 or higher). You can do something like this:
http_proxy="http://yourproxy.com:8080"; openvas-nvt-sync --wget

Or if you don't have wget, but curl:


http_proxy="http://yourproxy.com:8080"; openvas-nvt-sync --curl

Results
Configs

Metasploit plugin
load openvas
openvas_connect admin pass 127.0.0.1 9390
openvas_help
openvas_target_create <name> <hosts> <comment>
openvas_config_list
openvas_task_create <name> <comment> <config_id> <target_id>
openvas_task_start <id>
openvas_task_list

Import dans la db metasploit via


openvas_report_import
ou depuis un fichier
db_import

http://linuxmemo.free.fr/index.php?title=OpenVAS

12/06/2015

OpenVAS - Linuxmemo

Page 4 sur 5

Code status
The OpenVAS manager uses numerical response codes to indicate whether a command issued by the
client could be executed successfully. The response codes are very similar to the response codes used
by HTTP as specified in RFC 2616; a response code in the 2xx range indicates that the command has
been successfully received, understood, and accepted. A response code in the 4xx range indicates
that the command issued could not be executed due to error made by the client. A response in the
5xx range indicates that an error occurred in the manager during the processing of this command.
Responses are expected to include helpful information whenever possible, like the ID of the resulting
report when a task is started. Implementations which transfer OMP using a response-code aware
protocol (e.g. HTTP) might want to consider including this status code in the message generated by
this protocol.
http://www.ietf.org/rfc/rfc2616.txt

NVT OID
Ref: http://openvas.komma-nix.de/

Recettes
Conversion VM
ovftool --lax OpenVAS-6-DEMO-2.0.ova OpenVAS-6-DEMO-2.0.vmx

Import
restriction 4095 hosts maxi

<create_target_response status_text="Host specification exceeds 4095 hosts" status="400"></create_target_response

Cration d'une "target" l'aide d'un fichier xml


Fichier:
<create_target>
<name>new target</name>
<hosts>new_target.example.com</hosts>
</create_target>

injection via la commande


omp -u admin -w "admin" --xml="$(cat monfichier.xml)"

Export db Metasploit

http://linuxmemo.free.fr/index.php?title=OpenVAS

12/06/2015

OpenVAS - Linuxmemo

Page 5 sur 5

depuis la console metasploit avec le port 21 comme critre pas exemple:


services -u -p 21 -R
RHOSTS => file:/tmp/msf-db-rhosts-20130413-13479-dsxd0q-0

Editer le fichier
vim /tmp/msf-db-rhosts-20130413-13479-dsxd0q-0
:%s/\n/,/g
supprimer a dernire ","
puis ajouter les balises xml

Reste plus qu'a l'importer

Export db Postgres
depuis le shell

su postgres
psql -U postgres -d msf -c "COPY (SELECT hosts.address FROM hosts, services WHERE hosts.id = services.host_id AND

Bugs
Failed to receive data: A TLS packet with unexpected length was received.
Rcupre de http://linuxmemo.free.fr/index.php?title=OpenVAS
Catgories : Logiciel | Securite-outils
Dernire modification de cette page le 19 septembre 2014 11:43.

http://linuxmemo.free.fr/index.php?title=OpenVAS

12/06/2015

Potrebbero piacerti anche