Last active
September 18, 2024 12:10
-
-
Save joaovarelas/0052e565740b50b7918069d1eff416ba to your computer and use it in GitHub Desktop.
Nessus Docker image to deploy offline containers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM debian:stable-slim | |
| COPY Nessus-10.8.3-ubuntu1604_amd64.deb . | |
| COPY all-2.0.tar.gz . | |
| RUN apt -y update && \ | |
| apt -y install curl dpkg expect systemctl && \ | |
| apt install -y Nessus-10.8.3-ubuntu1604_amd64.deb && \ | |
| rm -f Nessus-10.8.3-ubuntu1604_amd64.deb && \ | |
| /bin/systemctl start nessusd.service && \ | |
| echo "starting nessusd service..." && \ | |
| sleep 20 && \ | |
| /bin/systemctl stop nessusd.service | |
| RUN /opt/nessus/sbin/nessuscli fix --set ui_theme=dark && \ | |
| /opt/nessus/sbin/nessuscli fix --set safe_checks=false && \ | |
| /opt/nessus/sbin/nessuscli fix --set backend_log_level=performance && \ | |
| /opt/nessus/sbin/nessuscli fix --set auto_update=false && \ | |
| /opt/nessus/sbin/nessuscli fix --set auto_update_ui=false && \ | |
| /opt/nessus/sbin/nessuscli fix --set disable_core_updates=true && \ | |
| /opt/nessus/sbin/nessuscli fix --set report_crashes=false && \ | |
| /opt/nessus/sbin/nessuscli fix --set send_telemetry=false && \ | |
| echo 'spawn /opt/nessus/sbin/nessuscli adduser nessus\n \ | |
| expect "Login password:"\n \ | |
| send "nessus\r"\n \ | |
| expect "Login password (again):"\n \ | |
| send "nessus\r"\n \ | |
| expect "*(can upload plugins, etc.)? (y/n)*"\n \ | |
| send "y\r"\n \ | |
| expect "*(the user can have an empty rules set)"\n \ | |
| send "\r"\n \ | |
| expect "Is that ok*"\n \ | |
| send "y\r"\n \ | |
| expect eof' > adduser.txt && \ | |
| expect -f adduser.txt && \ | |
| /opt/nessus/sbin/nessuscli update all-2.0.tar.gz && \ | |
| rm -f all-2.0.tar.gz && \ | |
| /bin/systemctl stop nessusd.service && \ | |
| /bin/systemctl disable nessusd.service | |
| COPY plugin_feed_info.inc /opt/nessus/var/nessus/plugin_feed_info.inc | |
| COPY plugin_feed_info.inc /opt/nessus/lib/nessus/plugins/plugin_feed_info.inc | |
| COPY entrypoint.sh /entrypoint.sh | |
| RUN chmod +x /entrypoint.sh | |
| ENTRYPOINT ["/entrypoint.sh"] | |
| # docker build --tag nessus-image . | |
| # docker run -p 8834:8834 --cap-add LINUX_IMMUTABLE --name nessus-pro -it nessus-image | |
| # https://localhost:8834/server/status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment