Nuclei Setup Example
Learn how to install Nuclei and start scanning for vulnerabilities.
Installations
Install Go
ProjectDiscovery runs on any OS that supports Go.
Get the latest version
Download and install the latest version of Go.
Verify the version
Run go version
to confirm installation (v 1.21 at the time of writing)
Update your $PATH
The $PATH
variable defines directories with executable programs. You need to add the go/bin
directory (where ProjectDiscovery binaries reside) to $PATH
manually.
$PATH
. Refer to the steps below to update it manually.Verify your GOPATH
Run go env | grep GOPATH
and copy the output path. Append /bin
to it if needed.
Open your shell config file
Edit your shell config (e.g., nano ~/.zshrc
for zsh or nano ~/.bashrc
for bash). Add export PATH="$PATH:/your/go/path/bin"
at the end.
Reset your terminal
Run source ~/.zshrc
or source ~/.bashrc
, or restart your terminal.
Verify your updated PATH
Run echo $PATH
to confirm the Go binary directory is included.
Install Nuclei
What is Nuclei?
Nuclei is a community-powered vulnerability scanner that uses templates to identify vulnerabilities in your assets. As an open-source tool, it has the benefit of a huge community of users and contributors who have helped to create a vast library of templates.
Templates, are YAML files used to define what is scanned by Nuclei. The template library includes many options and customizations, and supports any templates you create to meet your requirements.
Install Nuclei with Go
Run go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest
in your terminal.
Confirm installation
Run nuclei -h
to see available options and flags.
Sample Nuclei Output
Run a Scan
Let’s run a scan against a test host to showcase Nuclei’s behavior.
We’ll be using the test URL(
http://honey.scanme.sh/
) to demonstrate the expected scan behavior and walk you through some results.
Scan your host
Run nuclei -u http://honey.scanme.sh/
to scan the target host with all available templates.
The -u option specifies the target you want to scan with all available templates.
View results
Here we have an example (edited for easier readability)
Understanding your results
If you examine the following line of output
[mismatched-ssl-certificate] [ssl] [low] scanme.sh:443 [CN: scanme]
The fields are as follows:
[mismatched-ssl-certificate]
is the template-id for the finding[ssl]
is the protocol associated with the finding[low]
is the severity associated with the findingScanme.sh:443
is the output (in this case the host that the finding applies to)[CN: scanme]
- This output also includes an extracted value, which is not typically in all templates but does show an example of some of the other types of output you might see.
So, each line of output follows this structure:
[template-id]
[protocol]
[severity]
output (impacted host, etc)
Other examples:
Was this page helpful?