nessus属于安全产品,其功能众多,主机漏扫为其一个子功能,由于正版有相关费用,所以我们采取自己升级版(说白了就是做破解)
此项目仅供非营利性学习研究,请勿用作非法用途,如有侵权请及时联系删除
docker部署
docker run -itd --name=ramisec_nessus -p 8834:8834 ramisec/nessus
(只有 497MB !!!) 就是这么简单! 但是需要下面一行代码更新插件🤣,(如果要保留数据,先创建~/nessus_data
文件夹
docker exec -it ramisec_nessus /nessus/update.sh "UPDATE_URL_YOU_GOT"
这个 UPDATE_URL_YOU_GOT 更新url需要先从 官网 申请一个激活码 an activation-code,然后再从这个 网站生成URL 举个栗子:
?
?输入信息后get started,然后你会收到一份邮件,里面有你的Nessus Essentials License码,也就是下图的activation code below,粘贴到这个 网站上,然后进nessus容器执行
nessusscli fetch --challenge
得到一串码,然后submit生成URL;
?提醒 如果你无法更新成功,请检查网络连接
如果想要进行旧版本数据迁移,请进行以下操作
# 创建目录
mkdir ~/nessus_data
# 停止容器
docker stop ramisec_nessus
# 拷贝数据
docker cp ramisec_nessus:/opt/nessus/var/nessus/ ~/nessus_data
# 删除旧容器
docker rm ramisec_nessus
# 开新容器
docker run -itd --name=ramisec_nessus -v ~/nessus_data/nessus/:/opt/nessus/var/nessus/ -p 8834:8834 ramisec/nessus
# 更新插件
docker exec -it ramisec_nessus /bin/bash /nessus/update.sh
apiVersion: apps/v1
kind: Deployment
metadata:
name: nessus
namespace: nessus
labels:
app: nessus
spec:
replicas: 1
selector:
matchLabels:
app: nessus
template:
metadata:
labels:
app: nessus
spec:
containers:
- name: nessus
image: ramisec/nessus
imagePullPolicy: IfNotPresent
ports:
- name: https
containerPort: 8834
protocol: TCP
resources: {}
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
name: nessus
namespace: nessus
spec:
selector:
app: nessus
type: ClusterIP
ports:
- name: nessus
protocol: TCP
port: 8834
targetPort: 8834
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nessus
namespace: nessus
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/proxy-body-size: 500m
nginx.ingress.kubernetes.io/client-body-buffer-size: "500m"
nginx.ingress.kubernetes.io/proxy-connect-timeout: "300"
nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
nginx.ingress.kubernetes.io/proxy-send-timeout: "300"
nginx.ingress.kubernetes.io/use-regex: "true"
spec:
tls:
- hosts:
# kubectl create secret tls Nessus-tls-secret --cert=./*.crt --key=./*.key -n nessus
- nessus-Nessus.123.cn
secretName: tls-secret
#ingressClassName: nginx
rules:
- host: nessus-nessus.123.cn
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nessus
port:
number: 8834
和docker一样
kubectl exec -it -n nessus nessuspodname -- bash
/nessus/update.sh "UPDATE_URL_YOU_GOT"
cd /opt/nessus/sbin
sudo ./nessuscli chpasswd admin
yaml未作挂载,需要数据请做挂载