【一键安装】Nessus 一键下载 安装 破解脚本
2023-6-1 07:39:0 Author: 利刃信安攻防实验室(查看原文) 阅读量:83 收藏

#!/bin/bashif [[ $(id -u) -ne 0 ]] ; then echo "请以超级管理员身份 root 运行" ; exit 1 ; fiecho //==============================================================echo   Nessus 下载 安装 破解 一键运行脚本echo   利刃信安修改脚本echo   使用方法:echo            sudo chmod +x ./Nessus_Pro_Debian.sh && sudo ./Nessus_Pro_Debian.shecho //==============================================================echo " 1 确保准备就绪 ..."sudo apt-get update &>/dev/nullsudo apt-get install curl dpkg expect -y &>/dev/nullecho " 2 停止运行旧版本 ..."/bin/systemctl stop nessusd.service &>/dev/nullecho " 3 下载最新版本 Nessus ..."curl -A Mozilla --request GET \  --url 'https://www.tenable.com/downloads/api/v2/pages/nessus/files/Nessus-latest-debian10_amd64.deb' \  --output 'Nessus-10.5.2-debian10_amd64.deb' &>/dev/nullecho " 4 安装 Nessus ..."chmod +x Nessus-10.5.2-debian10_amd64.deb &>/dev/nulldpkg -i Nessus-10.5.2-debian10_amd64.deb &>/dev/nullecho " 5 开启 Nessus 服务 ..."/bin/systemctl start nessusd.service &>/dev/nullecho " 6 静待 20s ..."sleep 20echo " 7 停止 Nessus 服务 ..."/bin/systemctl stop nessusd.service &>/dev/nullecho " 8 修改 Nessus 配置信息 ..."echo "   监听端口: 8488"/opt/nessus/sbin/nessuscli fix --set xmlrpc_listen_port=8488 &>/dev/nullecho "   皮肤:       黑色"/opt/nessus/sbin/nessuscli fix --set ui_theme=dark &>/dev/nullecho "   安全校验:  关闭"/opt/nessus/sbin/nessuscli fix --set safe_checks=false &>/dev/nullecho "   日志: performance"/opt/nessus/sbin/nessuscli fix --set backend_log_level=performance &>/dev/nullecho "   升级:      关闭"/opt/nessus/sbin/nessuscli fix --set auto_update=false &>/dev/null/opt/nessus/sbin/nessuscli fix --set auto_update_ui=false &>/dev/null/opt/nessus/sbin/nessuscli fix --set disable_core_updates=true &>/dev/nullecho "   运维:    关闭"/opt/nessus/sbin/nessuscli fix --set report_crashes=false &>/dev/null/opt/nessus/sbin/nessuscli fix --set send_telemetry=false &>/dev/nullecho " 9 新增用户 (用户名:Mannix  口令:Mannix3389) ..."cat > expect.tmp<<'EOF'spawn /opt/nessus/sbin/nessuscli adduser Mannixexpect "Login password:"send "Mannix3389\r"expect "Login password (again):"send "Mannix3389\r"expect "*(can upload plugins, etc.)? (y/n)*"send "y\r"expect "*(the user can have an empty rules set)"send "\r"expect "Is that ok*"send "y\r"expect eofEOFexpect -f expect.tmp &>/dev/nullrm -rf expect.tmp &>/dev/nullecho " 10 下载最新插件 ..."curl -A Mozilla -o all-2.0.tar.gz \  --url 'https://xxx.xxx/nessus/all-2.0.tar.gz' &>/dev/nullecho " 11 安装插件 ..."chmod +x all-2.0.tar.gz &>/dev/null/opt/nessus/sbin/nessuscli update all-2.0.tar.gz &>/dev/nullecho " 12 开启服务 ..."rm -r all-2.0.tar.gz &>/dev/null/bin/systemctl start nessusd.service &>/dev/nullecho " 13 静待 20s ..."sleep 20echo " 14 监控 Nessus 状态 ..."M=0while [ $M -ne 100 ]do statline=`curl -sL -k https://localhost:8488/server/status|awk -F"," -v k="engine_status" '{ gsub(/{|}/,""); for(i=1;i<=NF;i++) { if ( $i ~ k ){printf $i} } }'` if [[ $statline != *"engine_status"* ]]; then echo -ne "\n 问题: Nessus 服务不可达?再次重试...\n"; fi echo -ne "\r $statline" if [[ $statline == *"100"* ]]; then M=100; else sleep 10; fidoneecho -ne ' 15 破解完成 ...'echoecho "        进入你的 Nessus: https://localhost:8488/(或者你的 VPS IP)"echo "                        用户名:             Mannix"echo "                        口令:           Mannix3389"echo "                             你可以任意修改"echoread -p " 16 按任意键退出 ..."


文章来源: http://mp.weixin.qq.com/s?__biz=MzU1Mjk3MDY1OA==&mid=2247504329&idx=1&sn=8bc9e5f004ab6f753d593b378fda2633&chksm=fbfb6104cc8ce8125e31d07eea5cfb934f69ed7ca44545ba33de5876274a04fe51ad0537709a#rd
如有侵权请联系:admin#unsafe.sh