顯示具有 greenbone 標籤的文章。 顯示所有文章
顯示具有 greenbone 標籤的文章。 顯示所有文章

2026/07/04

又到弱掃時間
上到greenbone去看
名字改成openvas了


可是下載ova時速度最快也只有1M 總共要7.6G
光時下載就要等好几個小時
還不包括 rule update
記得之前使用官方的vm時
會有 2 cpu, 5G ram的限制
給再多也沒用

所以想說使用另一個方法來做
先安裝kali
再來安裝openvas
流程如下

apt install openvas

gvm-setup

執行的過程會隨几產生一組密碼 要記下來 等下登入要用


gvm-check-setup

gvm-start

https://127.0.0.1:9392

gvm-stop


如果要更改port或要讓遠端可以訪問
修改以下檔案

/lib/systemd/system/gsad.service


手動更新rule

sudo greenbone-feed-sync --type all


弱掃過程ram吃的不多 給個16G應該就可以了
但cpu吃非常重 能給多少就給多少 這次我是給了 60 顆
速度會快一點


2025/01/14

又到了弱掃的時間
昨天看報告
有二個問題

Vulnerability Detection Result
The remote SSH server supports the following weak KEX algorithm(s):
KEX algorithm | Reason
------------------------------------------------
diffie-hellman-group-exchange-sha1 | Using SHA-1


Vulnerability Detection Result
The remote SSH server supports the following weak client-to-server encryption algorithm(s):
aes128-cbc
aes256-cbc
The remote SSH server supports the following weak server-to-client encryption algorithm(s):
aes128-cbc
aes256-cbc


想說改一下 /etc/ssh/sshd_config就可以了

Ciphers aes128-ctr,aes192-ctr,aes256-ctr

KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512

沒想到重掃還是一樣

因為每次掃都要花很多時間
所以使用 nmap 特別針對ssh server來掃

nmap --script ssh2-enum-algos -sV -p 22   10.0.0.1


Starting Nmap 7.80 ( https://nmap.org ) at 2025-01-21 13:47 CST
Nmap scan report for 10.0.0.1
Host is up (0.00079s latency).

PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 8.0 (protocol 2.0)
| ssh2-enum-algos: 
|   kex_algorithms: (12)
|       curve25519-sha256
|       curve25519-sha256@libssh.org
|       ecdh-sha2-nistp256
|       ecdh-sha2-nistp384
|       ecdh-sha2-nistp521
|       diffie-hellman-group-exchange-sha256
|       diffie-hellman-group14-sha256
|       diffie-hellman-group16-sha512
|       diffie-hellman-group18-sha512
|       diffie-hellman-group-exchange-sha1
|       diffie-hellman-group14-sha1
|       kex-strict-s-v00@openssh.com
|   server_host_key_algorithms: (5)
|       rsa-sha2-512
|       rsa-sha2-256
|       ssh-rsa
|       ecdsa-sha2-nistp256
|       ssh-ed25519
|   encryption_algorithms: (7)
|       aes256-gcm@openssh.com
|       chacha20-poly1305@openssh.com
|       aes256-ctr
|       aes256-cbc
|       aes128-gcm@openssh.com
|       aes128-ctr
|       aes128-cbc
|   mac_algorithms: (8)
|       hmac-sha2-256-etm@openssh.com
|       hmac-sha1-etm@openssh.com
|       umac-128-etm@openssh.com
|       hmac-sha2-512-etm@openssh.com
|       hmac-sha2-256
|       hmac-sha1
|       umac-128@openssh.com
|       hmac-sha2-512
|   compression_algorithms: (2)
|       none
|_      zlib@openssh.com

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 0.29 seconds

果然還是沒用
找了半天資料 才找到解決方法

先處理 
aes128-cbc
aes256-cbc

先建一個文件內容如下

vi /etc/crypto-policies/policies/modules/DISABLE-CBC.pmod

cipher = -AES-128-CBC -AES-256-CBC
ssh_cipher = -AES-128-CBC -AES-256-CBC


更新加密策略

update-crypto-policies --set DEFAULT:DISABLE-CBC


再來處理

diffie-hellman-group-exchange-sha1


vi /etc/crypto-policies/back-ends/opensshserver.config

刪除以下文字

,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1



重啟 sshd

systemctl restart sshd


再跑一次 
nmap --script ssh2-enum-algos -sV -p 22   10.0.0.1

Starting Nmap 7.80 ( https://nmap.org ) at 2025-01-21 13:59 CST
Nmap scan report for 10.0.0.1
Host is up (0.00077s latency).

PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 8.0 (protocol 2.0)
| ssh2-enum-algos: 
|   kex_algorithms: (10)
|       curve25519-sha256
|       curve25519-sha256@libssh.org
|       ecdh-sha2-nistp256
|       ecdh-sha2-nistp384
|       ecdh-sha2-nistp521
|       diffie-hellman-group-exchange-sha256
|       diffie-hellman-group14-sha256
|       diffie-hellman-group16-sha512
|       diffie-hellman-group18-sha512
|       kex-strict-s-v00@openssh.com
|   server_host_key_algorithms: (5)
|       rsa-sha2-512
|       rsa-sha2-256
|       ssh-rsa
|       ecdsa-sha2-nistp256
|       ssh-ed25519
|   encryption_algorithms: (5)
|       aes256-gcm@openssh.com
|       chacha20-poly1305@openssh.com
|       aes256-ctr
|       aes128-gcm@openssh.com
|       aes128-ctr
|   mac_algorithms: (8)
|       hmac-sha2-256-etm@openssh.com
|       hmac-sha1-etm@openssh.com
|       umac-128-etm@openssh.com
|       hmac-sha2-512-etm@openssh.com
|       hmac-sha2-256
|       hmac-sha1
|       umac-128@openssh.com
|       hmac-sha2-512
|   compression_algorithms: (2)
|       none
|_      zlib@openssh.com

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 0.33 seconds


已經全部修正
再重掃一次也沒問題了

2022/04/11

今天有朋友問greenbone的問題

到官網看了一下

名字又改了

改成  Greenbone Enterprise TRIAL

不過下載時看到的檔案還是GSM

只是比之前用的版本又更新了

順便記錄一下怎麼匯入 proxmox


ova下載回來後先解開

tar xvf GSM-TRIAL-21.04.15-VirtualBox.ova

有一個 ovf 跟一個 vmdk 只需要使用 vmdk

把vmdk 上傳到 proxmox  

在proxmox 上 create 一個vm

cpu給2顆 ram給5G

接下來把建立時預設的那個HD刪除

把剛剛上傳的vmdk匯入

qm importdisk 132 GSM-TRIAL-21.04.15-VirtualBox-disk001.vmdk local-lvm

把匯入的HD掛上    BUS一定要使用 IDE

把BIOS調整成 UEFI

調整開几順序 使用剛剛匯入的HD開几

開几完成使用 admin/admin 在 console登入

接下來建立 web 介面的帳號密碼及更新 feed

完成後即可使用 web 介面登入操作


https://www.greenbone.net/en/testnow/



2020/12/25

年末弱掃的時間又到了

之前有安裝 GSM free trian 的版本

可是執行後發現預設會限制 resource的使用

cpu只能用二個
ram只能使用5G
給再大也沒用

於是想說11月份的kali linux 2020.4 不知道能不能再安裝使用 greenbone
直接下載 virtualbox 的vm
預設的帳號是 kali/kali

登入後執行

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install gvm*
sudo gvm-setup

接下來會更新 feed 要不少時間
完成後畫面會出現網頁介面 admin 的登入密碼
一定要記下來

啟動gvm

gvm-start

啟動完成後就可以在本几上開firefox

http://127.0.0.1:9392 登入

登入後記得改一下admin的密碼跟時區

之後几器如果有重開

也必須先執行 gvm-start


後續觀察
感覺使用kali也沒有比較快


2020/10/09

之前有裝過的GCE的版本已經沒有了

官方出了一個GSM Trail 的版本來取代

安裝方式跟之前差不多

一樣HD要用SATA或 IDE才行

官方說明最少要2個cpu及5G的ram

不過實際上給多了 在status 也看不到  看來給多用不到

安裝過程預設會建一個admin的user

這個user是在os登入用的

登入後會直接出現設定介面

不是一般linux登入的shell

os登入後再建立一個web 管理介面用的user

預設會使用dhcp

可以在os登入後進行修改


https://www.greenbone.net/en/testnow/

https://community.greenbone.net/t/setting-up-the-greenbone-security-manager-trial-gsm-trial-virtual-machine/6939

2020/06/23

延續上一篇的問題
report 出現弱掃軟体未更新真的不是很能接受
而且稽核員看到一定又要說話
所以到greenbone的網站再看看
發現提供了GCE這個版本可以使用


不需要申請key 就可以直接使用
只是用的feed 是community的版本
來裝一下看看吧
直接在vm上開個guest來裝
要注意的是 hd 只能使用ide ide 其他不行
安裝過程設定的user password只能在console登入使用
網頁介面使用的user必需登入 console 介面後建立
feed 的update 也是在console做
console並不像一般的linux
登入後只能使用固定的功能
console設定完成後就可以使用browser用server的ip登入了
安裝使用到目前沒有什麼問題
只是
不管給多少cpu和ram
看起來都只會使用2個cpu和4G的ram
也因此弱掃速度相對慢
不像kali給16個cpu 32G的ram
一個C一個小時就掃完了

只能等