2018-10-04
Openvas 忘記密碼重設
markdown
重設 admin 密碼
```
# openvasmd --user=admin --new-password=new_password
```
建立新帳號
```
openvasmd --create-user new_user
```
刪除帳號
```
openvasmd --delete-user=new_user
```
2018-09-28
kali 安裝 openvas
markdown
## 更新套件
```
# apt-get update
# apt-get dist-upgrade
```
```
# apt-get install openvas
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
...
# openvas-setup
[>] Updating OpenVAS feeds
[*] [1/3] Updating: NVT
--2018-09-27 23:44:12-- http://dl.greenbone.net/community-nvt-feed-current.tar.bz2
Resolving dl.greenbone.net (dl.greenbone.net)... 89.146.224.58, 2a01:130:2000:127::d1
Connecting to dl.greenbone.net (dl.greenbone.net)|89.146.224.58|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 31010829 (30M) [application/octet-stream]
Saving to: ‘/tmp/greenbone-nvt-sync.spbmXIvZMn/openvas-feed-2018-09-27-84150.tar.bz2’
/tmp/greenbone-nvt-syn 100%[=========================>] 29.57M 1.97MB/s in 32s
2018-09-27 23:44:46 (933 KB/s) - ‘/tmp/greenbone-nvt-sync.spbmXIvZMn/openvas-feed-2018-09-27-84150.tar.bz2’ saved [31010829/31010829]
2008/
2008/secpod_ms08-054_900045.nasl
...
Sep 28 00:08:54 kali systemd[1]: Starting Open Vulnerability Assessment System Manager Daemon...
Sep 28 00:08:54 kali systemd[1]: openvas-manager.service: Can't open PID file /var/run/openvasmd.pid (yet?) after start: No such file or directory
Sep 28 00:08:54 kali systemd[1]: Started Open Vulnerability Assessment System Manager Daemon.
[*] Opening Web UI (https://127.0.0.1:9392) in: 5... 4... 3... 2... 1...
[>] Checking for admin user
[*] Creating admin user
User created with password '32f486b6-5791-46e2-ad9a-0a00b0573a4a'.
[+] Done
```
## Services 監聽
當 __openvas-setup__ 完成, OpenVAS manager, scanner, 和 GSAD 服務應該都會啟動
```
# netstat -antp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:9390 0.0.0.0:* LISTEN 85440/openvasmd
tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN 85444/gsad
tcp 0 0 127.0.0.1:9392 0.0.0.0:* LISTEN 85437/gsad
```
如果沒有啟動成功,可以單獨執行
```
# sudo systemctl start openvas-scanner
# sudo systemctl start openvas-manager
# sudo systemctl start openvas-gsa
# openvas-stop
# openvas-start
```
2018-09-27
markdown 編寫
markdown
#安裝步驟
* 到blogger「版面配置」新增小工具
* 選擇「HTML/JavaScript」
* 勾選 顯示「 HTML/JavaScript 」
* 填入以下程式碼(需將全型 < 取代為 <,將全型 > 取代為 >)
```js
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.6.4/showdown.min.js"></script>
<script>
var converter = new showdown.Converter();
var posts = document.querySelectorAll(".post-body,.snippet-item");
Array.prototype.forEach.call(posts, function(el, i){
if(el.innerHTML.indexOf("markdown") <= 1){
el.innerHTML = converter.makeHtml(el.innerHTML.replace("markdown",""));
}
});
var pres = document.querySelectorAll("pre");
Array.prototype.forEach.call(pres, function(el, i){
el.classList.add("prettyprint");
});
</script>
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js?skin=sunburst"></script>
::decode
```
* 儲存
撰寫時要在文章中有 markdown
例如:
```
markdown
# 文章標題
文章內容
```
參考來源:
[卡卡米的記憶體: 在 blogger 貼漂亮 code 的方法(使用 markdown 和 prettyprint)](http://etrex.blogspot.com/2017/03/blogger-code-markdown-prettyprint.html)
訂閱:
文章 (Atom)