2015年8月23日 星期日

Cent OS 7 Install OpenVAS 8

官方網站
http://www.openvas.org/

1.測試安裝軟體環境
CentOS 7 (minimal install)


安裝步驟(root):

1.Disable SELINUX.

vim /etc/selinux/config


SELINUX=disabled

# reboot


2.安裝相關軟體

yum install wget bzip2 texlive net-tools alien

3. Add Atomicorp repo

wget -q -O - http://www.atomicorp.com/installers/atomic | sh

4.安裝 OpenVAS Redis

yum install redis openvas

5.  redis 設定

vim /etc/redis.conf

加入

unixsocket /tmp/redis.sock
unixsocketperm 700

6. Restart Redis

systemctl enable redis
systemctl restart redis

7.  openvas-setup

※rsync為資料異動更新
...(略)

Step 2: Configure GSAD
The Greenbone Security Assistant is a Web Based front end
for managing scans. By default it is configured to only allow
connections from localhost.

Allow connections from any IP? [Default: yes]
Redirecting to /bin/systemctl restart  gsad.service
==
Step 3: Choose the GSAD admin users password.
The admin user is used to configure accounts,
Update NVT's manually, and manage roles.

Enter administrator username [Default: admin] :
Enter Administrator Password:
Verify Administrator Password:
※網址登入時需輸入的帳號密碼設定

Setup complete, you can now access GSAD at:
  https://<IP>:9392



8. 防火牆設定

firewall-cmd --permanent --zone=public --add-port=9392/tcp
firewall-cmd --reload

9.重建掃描資料庫

openvasmd --rebuild


=========================
登入測試
https://<IP-ADDRESS>:9392

=========================

題外話:執行確認安裝檢查時
# openvas-check-setup

(理論上會於step7檢查錯誤)
原因推估是Cent OS 7對於Netstate 命令集相容問題

至此不用管他,程式已可正常運行無誤。


=========測試中========
離線更新定義檔步驟

offline update
下載定義檔
http://www.openvas.org/openvas-nvt-feed-current.tar.bz2

複製到離線主機於/var/lib/openvas/plugins/底下

#cp  openvas-nvt-feed-current.tar.bz2  /var/lib/openvas/plugins/

解壓縮蓋檔
#tarxf  openvas-nvt-feed-current.tar.bz2

重啟服務
# systemctl restart openvas-scanner





#openvas-scapdata-sync

更新掃描文件檔

#greenbone-scapdata-sync.

#openvas-certdata-sync


==
PS.操作介面已與參考資料不同,故再研究使用方法中。



參考:
OpenVas

https://atomicorp.com/forums/viewtopic.php?f=31&t=8047

http://www.serenity-networks.com/linux/step-by-step-install-openvas-7-on-centos-7-run-vulnerability-assessments-and-pen-tests/

防火牆
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-using-firewalld-on-centos-7


==
服務重啟
systemctl restart openvas-manager
systemctl restart openvas-scanner
systemctl restart gsad

==
操作指令
openvasmd

加入使用者

openvasmd --create-user=edwin --role=Admin


==
log 檢查

vim /var/log/openvas/openvasmd.log


沒有留言:

張貼留言