nuclei/README.md

324 lines
19 KiB
Markdown
Raw Normal View History

2020-10-05 13:04:37 +00:00
<h1 align="center">
2020-04-04 16:46:21 +00:00
<br>
2021-01-30 06:42:19 +00:00
<a href="https://nuclei.projectdiscovery.io"><img src="static/nuclei-logo.png" width="200px" alt="Nuclei"></a>
2020-04-04 16:46:21 +00:00
</h1>
2021-01-30 06:42:19 +00:00
<h4 align="center">Fast and customisable vulnerability scanner based on simple YAML based DSL.</h4>
2020-04-04 16:46:21 +00:00
2020-10-05 13:04:37 +00:00
<p align="center">
2022-02-05 18:47:13 +00:00
<img src="https://img.shields.io/github/go-mod/go-version/projectdiscovery/nuclei?filename=v2%2Fgo.mod">
<a href="https://github.com/projectdiscovery/nuclei/releases"><img src="https://img.shields.io/github/downloads/projectdiscovery/nuclei/total">
<a href="https://github.com/projectdiscovery/nuclei/graphs/contributors"><img src="https://img.shields.io/github/contributors-anon/projectdiscovery/nuclei">
<a href="https://github.com/projectdiscovery/nuclei/releases/"><img src="https://img.shields.io/github/release/projectdiscovery/nuclei">
<a href="https://github.com/projectdiscovery/nuclei/issues"><img src="https://img.shields.io/github/issues-raw/projectdiscovery/nuclei">
<a href="https://github.com/projectdiscovery/nuclei/discussions"><img src="https://img.shields.io/github/discussions/projectdiscovery/nuclei">
2021-07-27 09:54:39 +00:00
<a href="https://discord.gg/projectdiscovery"><img src="https://img.shields.io/discord/695645237418131507.svg?logo=discord"></a>
2022-02-05 18:47:13 +00:00
<a href="https://twitter.com/pdnuclei"><img src="https://img.shields.io/twitter/follow/pdnuclei.svg?logo=twitter"></a>
2021-01-30 06:42:19 +00:00
</p>
<p align="center">
<a href="#how-it-works">How</a>
<a href="#install-nuclei">Install</a>
<a href="#for-security-engineers">For Security Engineers</a>
<a href="#for-developers-and-organisations">For Developers</a>
2021-06-30 09:09:00 +00:00
<a href="https://nuclei.projectdiscovery.io/nuclei/get-started/">Documentation</a>
2021-01-30 06:42:19 +00:00
<a href="#credits">Credits</a>
2021-04-08 18:15:22 +00:00
<a href="https://nuclei.projectdiscovery.io/faq/nuclei/">FAQs</a>
<a href="https://discord.gg/projectdiscovery">Join Discord</a>
2020-10-05 13:04:37 +00:00
</p>
2021-12-02 07:19:50 +00:00
<p align="center">
<a href="https://github.com/projectdiscovery/nuclei/blob/master/README.md">English</a>
<a href="https://github.com/projectdiscovery/nuclei/blob/master/README_CN.md">中文</a>
</p>
2021-01-30 06:42:19 +00:00
---
2020-10-05 12:17:42 +00:00
Nuclei is used to send requests across targets based on a template leading to zero false positives and providing fast scanning on large number of hosts. Nuclei offers scanning for a variety of protocols including TCP, DNS, HTTP, File, etc. With powerful and flexible templating, all kinds of security checks can be modelled with Nuclei.
2022-02-05 18:47:13 +00:00
We have a [dedicated repository](https://github.com/projectdiscovery/nuclei-templates) that houses various type of vulnerability templates contributed by **more than 300** security researchers and engineers.
2020-07-13 05:11:34 +00:00
2021-01-30 06:42:19 +00:00
## How it works
2020-04-04 16:46:21 +00:00
2021-01-30 06:42:19 +00:00
<h3 align="center">
<img src="static/nuclei-flow.jpg" alt="nuclei-flow" width="700px"></a>
</h3>
2020-04-04 16:46:21 +00:00
2021-01-30 06:42:19 +00:00
# Install Nuclei
2020-04-04 16:46:21 +00:00
2021-10-17 07:38:28 +00:00
Nuclei requires **go1.17** to install successfully. Run the following command to install the latest version -
2020-08-31 19:17:45 +00:00
```sh
2021-10-17 07:38:28 +00:00
go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest
2020-04-04 16:46:21 +00:00
```
2021-03-09 09:24:28 +00:00
2021-07-08 15:33:02 +00:00
**More installation [methods can be found here](https://nuclei.projectdiscovery.io/nuclei/get-started/).**
2020-04-04 16:46:21 +00:00
2021-01-30 06:42:19 +00:00
<table>
<tr>
<td>
2020-10-19 19:07:59 +00:00
2021-07-08 15:33:02 +00:00
### Nuclei Templates
2020-04-04 16:46:21 +00:00
Nuclei has built-in support for automatic template download/update as default since version [v2.5.2](https://github.com/projectdiscovery/nuclei/releases/tag/v2.5.2). [**Nuclei-Templates**](https://github.com/projectdiscovery/nuclei-templates) project provides a community-contributed list of ready-to-use templates that is constantly updated.
2020-04-04 16:46:21 +00:00
2021-09-18 10:44:59 +00:00
You may still use the `update-templates` flag to update the nuclei templates at any time; You can write your own checks for your individual workflow and needs following Nuclei's [templating guide](https://nuclei.projectdiscovery.io/templating-guide/).
2020-04-05 00:18:18 +00:00
2021-09-01 10:18:01 +00:00
The YAML DSL reference syntax is available [here](SYNTAX-REFERENCE.md).
2021-08-20 10:02:29 +00:00
2021-01-30 06:42:19 +00:00
</td>
</tr>
</table>
2020-04-05 00:18:18 +00:00
2021-06-20 12:23:42 +00:00
### Usage
```sh
nuclei -h
```
This will display help for the tool. Here are all the switches it supports.
2021-07-25 14:33:27 +00:00
```yaml
2021-07-26 18:57:17 +00:00
Nuclei is a fast, template based vulnerability scanner focusing
on extensive configurability, massive extensibility and ease of use.
2021-07-25 14:33:27 +00:00
2021-06-20 12:23:42 +00:00
Usage:
2021-08-31 17:29:11 +00:00
nuclei [flags]
2021-06-20 12:23:42 +00:00
Flags:
2021-07-26 18:57:17 +00:00
TARGET:
-u, -target string[] target URLs/hosts to scan
2021-08-10 18:21:23 +00:00
-l, -list string path to file containing a list of target URLs/hosts to scan (one per line)
2022-01-13 12:57:52 +00:00
-resume Resume scan using resume.cfg (clustering will be disabled)
2021-07-26 18:57:17 +00:00
TEMPLATES:
2021-11-30 17:53:14 +00:00
-t, -templates string[] template or template directory paths to include in the scan
-tu, -template-url string[] URL containing list of templates to run
-nt, -new-templates run only new templates added in latest nuclei-templates release
-w, -workflows string[] workflow or workflow directory paths to include in the scan
-wu, -workflow-url string[] URL containing list of workflows to run
-validate validate the passed templates to nuclei
-tl list all available templates
2021-07-26 18:57:17 +00:00
FILTERING:
2021-10-21 00:47:18 +00:00
-tags string[] execute a subset of templates that contain the provided tags
-itags, -include-tags string[] tags from the default deny list that permit executing more intrusive templates
2021-11-30 17:53:14 +00:00
-etags, -exclude-tags string[] exclude templates with the provided tags
2021-10-21 00:47:18 +00:00
-it, -include-templates string[] templates to be executed even if they are excluded either by default or configuration
2021-11-30 17:53:14 +00:00
-et, -exclude-templates string[] template or template directory paths to exclude
2022-01-13 12:57:52 +00:00
-s, -severity value[] Templates to run based on severity. Possible values: info, low, medium, high, critical
-es, -exclude-severity value[] Templates to exclude based on severity. Possible values: info, low, medium, high, critical
-pt, -type value[] protocol types to be executed. Possible values: dns, file, http, headless, network, workflow, ssl, websocket, whois
-ept, -exclude-type value[] protocol types to not be executed. Possible values: dns, file, http, headless, network, workflow, ssl, websocket, whois
2021-10-21 00:47:18 +00:00
-a, -author string[] execute templates that are (co-)created by the specified authors
2022-01-13 12:57:52 +00:00
-id, -template-id string[] List of template IDs to run (comma-separated, file)
-eid, -exclude-id string[] List of template IDs to exclude (comma-separated, file)
2021-07-26 18:57:17 +00:00
OUTPUT:
-o, -output string output file to write found issues/vulnerabilities
-silent display findings only
-nc, -no-color disable output content coloring (ANSI escape codes)
-json write output in JSONL(ines) format
-irr, -include-rr include request/response pairs in the JSONL output (for findings only)
2021-10-21 00:47:18 +00:00
-nm, -no-meta don't display match metadata
2021-08-31 17:29:11 +00:00
-nts, -no-timestamp don't display timestamp metadata in CLI output
2021-07-26 18:57:17 +00:00
-rdb, -report-db string local nuclei reporting database (always use this to persist report data)
2021-11-30 17:53:14 +00:00
-ms, -matcher-status show optional match failure status
2021-07-26 18:57:17 +00:00
-me, -markdown-export string directory to export results in markdown format
-se, -sarif-export string file to export results in SARIF format
CONFIGURATIONS:
-config string path to the nuclei configuration file
-rc, -report-config string nuclei reporting module configuration file
-H, -header string[] custom headers in header:value format
2021-08-10 18:21:23 +00:00
-V, -var value custom vars in var=value format
2021-07-26 18:57:17 +00:00
-r, -resolvers string file containing resolver list for nuclei
2021-10-21 00:47:18 +00:00
-sr, -system-resolvers use system DNS resolving as error fallback
2021-07-26 18:57:17 +00:00
-passive enable passive HTTP response processing mode
2021-11-30 17:53:14 +00:00
-ev, -env-vars enable environment variables to be used in template
-cc, -client-cert string client certificate file (PEM-encoded) used for authenticating against scanned hosts
-ck, -client-key string client key file (PEM-encoded) used for authenticating against scanned hosts
-ca, -client-ca string client certificate authority file (PEM-encoded) used for authenticating against scanned hosts
2022-02-05 15:09:59 +00:00
-ztls Use ztls library with autofallback to standard one for tls13
2021-07-26 18:57:17 +00:00
INTERACTSH:
2022-01-13 12:57:52 +00:00
-iserver, -interactsh-server string interactsh server url for self-hosted instance (default: oast.pro,oast.live,oast.site,oast.online,oast.fun,oast.me)
2021-10-21 00:47:18 +00:00
-itoken, -interactsh-token string authentication token for self-hosted interactsh server
-interactions-cache-size int number of requests to keep in the interactions cache (default 5000)
-interactions-eviction int number of seconds to wait before evicting requests from cache (default 60)
-interactions-poll-duration int number of seconds to wait before each interaction poll request (default 5)
-interactions-cooldown-period int extra time for interaction polling before exiting (default 5)
-ni, -no-interactsh disable interactsh server for OAST testing, exclude OAST based templates
2021-07-26 18:57:17 +00:00
RATE-LIMIT:
2021-11-30 17:53:14 +00:00
-rl, -rate-limit int maximum number of requests to send per second (default 150)
-rlm, -rate-limit-minute int maximum number of requests to send per minute
-bs, -bulk-size int maximum number of hosts to be analyzed in parallel per template (default 25)
-c, -concurrency int maximum number of templates to be executed in parallel (default 25)
-hbs, -headless-bulk-size int maximum number of headless hosts to be analyzed in parallel per template (default 10)
-hc, -headless-concurrency int maximum number of headless templates to be executed in parallel (default 10)
2021-07-26 18:57:17 +00:00
OPTIMIZATIONS:
-timeout int time to wait in seconds before timeout (default 5)
-retries int number of times to retry a failed request (default 1)
2021-10-21 00:47:18 +00:00
-mhe, -max-host-error int max errors for a host before skipping from scan (default 30)
2021-07-26 18:57:17 +00:00
-project use a project folder to avoid sending same request multiple times
2021-10-21 00:47:18 +00:00
-project-path string set a specific project path
2021-07-26 18:57:17 +00:00
-spm, -stop-at-first-path stop processing HTTP requests after the first match (may break template/workflow logic)
2021-10-21 00:47:18 +00:00
-stream Stream mode - start elaborating without sorting the input
2021-07-26 18:57:17 +00:00
HEADLESS:
2022-01-13 12:57:52 +00:00
-headless enable templates that require headless browser support (root user on linux will disable sandbox)
2021-10-21 00:47:18 +00:00
-page-timeout int seconds to wait for each page in headless mode (default 20)
-sb, -show-browser show the browser on the screen when running templates with headless mode
-sc, -system-chrome Use local installed chrome browser instead of nuclei installed
2021-07-26 18:57:17 +00:00
DEBUG:
-debug show all requests and responses
-debug-req show all sent requests
-debug-resp show all received responses
-p, -proxy string[] List of HTTP(s)/SOCKS5 proxy to use (comma separated or file input)
-tlog, -trace-log string file to write sent requests trace log
-elog, -error-log string file to write sent requests error log
-version show nuclei version
-v, -verbose show verbose output
-vv display templates loaded for scan
-tv, -templates-version shows the version of the installed nuclei-templates
2021-07-26 18:57:17 +00:00
UPDATE:
2021-10-21 00:47:18 +00:00
-update update nuclei engine to the latest released version
-ut, -update-templates update nuclei-templates to latest released version
-ud, -update-directory string overwrite the default directory to install nuclei-templates
-duc, -disable-update-check disable automatic nuclei/templates update check
2021-07-26 18:57:17 +00:00
STATISTICS:
-stats display statistics about the running scan
2021-10-21 00:47:18 +00:00
-sj, -stats-json write statistics data to an output file in JSONL(ines) format
2021-07-26 18:57:17 +00:00
-si, -stats-interval int number of seconds to wait between showing a statistics update (default 5)
2021-10-21 00:47:18 +00:00
-m, -metrics expose nuclei metrics on a port
-mp, -metrics-port int port to expose nuclei metrics on (default 9092)
2021-06-20 12:23:42 +00:00
```
2021-01-30 06:42:19 +00:00
### Running Nuclei
2020-07-13 05:11:34 +00:00
2021-07-08 16:01:07 +00:00
Scanning target domain with [community-curated](https://github.com/projectdiscovery/nuclei-templates) nuclei templates.
```sh
2021-07-11 21:41:47 +00:00
nuclei -u https://example.com
2021-07-08 16:01:07 +00:00
```
2021-07-08 15:33:02 +00:00
Scanning target URLs with [community-curated](https://github.com/projectdiscovery/nuclei-templates) nuclei templates.
2020-06-28 05:26:57 +00:00
2020-08-31 19:17:45 +00:00
```sh
2021-07-12 15:42:43 +00:00
nuclei -list urls.txt
2021-07-08 15:33:02 +00:00
```
Example of `urls.txt`:
```yaml
http://example.com
http://app.example.com
2021-07-08 16:01:07 +00:00
http://test.example.com
http://uat.example.com
2020-07-13 05:11:34 +00:00
```
2021-02-13 15:30:14 +00:00
**More detailed examples of running nuclei can be found [here](https://nuclei.projectdiscovery.io/nuclei/get-started/#running-nuclei).**
2020-08-28 09:45:39 +00:00
2021-01-30 06:42:19 +00:00
# For Security Engineers
2020-07-13 05:11:34 +00:00
Nuclei offers great number of features that are helpful for security engineers to customise workflow in their organisation. With the varieties of scan capabilities (like DNS, HTTP, TCP), security engineers can easily create their suite of custom checks with Nuclei.
2020-08-28 09:45:39 +00:00
- Varieties of protocols supported: TCP, DNS, HTTP, File, etc
2021-02-17 17:03:11 +00:00
- Achieve complex vulnerability steps with workflows and [dynamic requests.](https://blog.projectdiscovery.io/nuclei-unleashed-quickly-write-complex-exploits/)
2021-02-02 21:01:19 +00:00
- Easy to integrate into CI/CD, designed to be easily integrated into regression cycle to actively check the fix and re-appearance of vulnerability.
2020-07-13 05:11:34 +00:00
2021-01-30 06:42:19 +00:00
<h1 align="left">
<a href="https://nuclei.projectdiscovery.io/nuclei/get-started/"><img src="static/learn-more-button.png" width="170px" alt="Learn More"></a>
</h1>
2020-12-18 15:33:09 +00:00
2021-01-30 06:42:19 +00:00
<table>
<tr>
<td>
2020-12-18 15:43:19 +00:00
2021-09-07 14:31:46 +00:00
**For Bug Bounty hunters:**
2020-12-18 15:33:09 +00:00
Nuclei allows you to customise your testing approach with your own suite of checks and easily run across your bug bounty programs. Moreover, Nuclei can be easily integrated into any continuous scanning workflow.
2020-12-18 15:33:09 +00:00
- Designed to be easily integrated into other tool workflow.
2021-01-30 06:42:19 +00:00
- Can process thousands of hosts in few minutes.
- Easily automate your custom testing approach with our simple YAML DSL.
2020-12-18 15:33:09 +00:00
2021-01-30 06:35:13 +00:00
Please check our other open-source projects that might fit into your bug bounty workflow: [github.com/projectdiscovery](http://github.com/projectdiscovery), we also host daily [refresh of DNS data at Chaos](http://chaos.projectdiscovery.io).
2020-10-19 19:07:59 +00:00
2021-01-30 06:42:19 +00:00
</td>
</tr>
</table>
2020-12-18 15:33:09 +00:00
2021-01-30 06:42:19 +00:00
<table>
<tr>
<td>
2021-09-07 14:31:46 +00:00
**For Penetration Testers:**
2020-12-18 15:33:09 +00:00
2021-09-07 14:31:46 +00:00
Nuclei immensely improve how you approach security assessment by augmenting the manual, repetitive processes. Consultancies are already converting their manual assessment steps with Nuclei, it allows them to run set of their custom assessment approach across thousands of hosts in an automated manner.
2020-12-18 15:33:09 +00:00
Pen-testers get the full power of our public templates and customization capabilities to speed up their assessment process, and specifically with the regression cycle where you can easily verify the fix.
2020-12-18 15:33:09 +00:00
- Easily create your compliance, standards suite (e.g. OWASP Top 10) checklist.
2021-01-30 06:42:19 +00:00
- With capabilities like [fuzz](https://nuclei.projectdiscovery.io/templating-guide/#advance-fuzzing) and [workflows](https://nuclei.projectdiscovery.io/templating-guide/#workflows), complex manual steps and repetitive assessment can be easily automated with Nuclei.
- Easy to re-test vulnerability-fix by just re-running the template.
2020-10-19 19:07:59 +00:00
2021-01-30 06:42:19 +00:00
</td>
</tr>
</table>
2020-10-19 19:07:59 +00:00
2021-01-30 06:42:19 +00:00
# For Developers and Organisations
2020-10-19 19:07:59 +00:00
2021-09-07 14:31:46 +00:00
Nuclei is built with simplicity in mind, with the community backed templates by hundreds of security researchers, it allows you to stay updated with the latest security threats using continuous Nuclei scanning on the hosts. It is designed to be easily integrated into regression tests cycle, to verify the fixes and eliminate vulnerabilities from occurring in the future.
2020-10-19 19:07:59 +00:00
2021-02-02 21:01:19 +00:00
- **CI/CD:** Engineers are already utilising Nuclei within their CI/CD pipeline, it allows them to constantly monitor their staging and production environments with customised templates.
2021-01-30 06:42:19 +00:00
- **Continuous Regression Cycle:** With Nuclei, you can create your custom template on every new identified vulnerability and put into Nuclei engine to eliminate in the continuous regression cycle.
2020-10-19 19:07:59 +00:00
We have [a discussion thread around this](https://github.com/projectdiscovery/nuclei-templates/discussions/693), there are already some bug bounty programs giving incentives to hackers on writing nuclei templates with every submission, that helps them to eliminate the vulnerability across all their assets, as well as to eliminate future risk in reappearing on productions. If you're interested in implementing it in your organisation, feel free to [reach out to us](mailto:contact@projectdiscovery.io). We will be more than happy to help you in the getting started process, or you can also post into the [discussion thread for any help](https://github.com/projectdiscovery/nuclei-templates/discussions/693).
2020-10-19 19:07:59 +00:00
2021-01-30 06:42:19 +00:00
<h3 align="center">
<img src="static/regression-with-nuclei.jpg" alt="regression-cycle-with-nuclei" width="1100px"></a>
</h3>
2020-10-19 19:07:59 +00:00
2021-01-30 06:42:19 +00:00
<h1 align="left">
<a href="https://github.com/projectdiscovery/nuclei-action"><img src="static/learn-more-button.png" width="170px" alt="Learn More"></a>
</h1>
2020-10-19 19:07:59 +00:00
2021-01-30 06:42:19 +00:00
### Resources
2020-10-19 19:07:59 +00:00
2021-11-19 09:16:10 +00:00
- [Scanning Live Web Applications with Nuclei in CI/CD Pipeline](https://blog.escape.tech/devsecops-part-iii-scanning-live-web-applications/) by [@TristanKalos](https://twitter.com/TristanKalos)
2021-01-30 17:33:40 +00:00
- [Community Powered Scanning with Nuclei](https://blog.projectdiscovery.io/community-powered-scanning-with-nuclei/)
- [Nuclei Unleashed - Quickly write complex exploits](https://blog.projectdiscovery.io/nuclei-unleashed-quickly-write-complex-exploits/)
- [Nuclei - Fuzz all the things](https://blog.projectdiscovery.io/nuclei-fuzz-all-the-things/)
2021-07-27 10:06:13 +00:00
- [Nuclei + Interactsh Integration for Automating OOB Testing](https://blog.projectdiscovery.io/nuclei-interactsh-integration/)
2021-02-03 04:49:40 +00:00
- [Weaponizes nuclei Workflows to Pwn All the Things](https://medium.com/@dwisiswant0/weaponizes-nuclei-workflows-to-pwn-all-the-things-cd01223feb77) by [@dwisiswant0](https://github.com/dwisiswant0)
- [How to Scan Continuously with Nuclei?](https://medium.com/@dwisiswant0/how-to-scan-continuously-with-nuclei-fcb7e9d8b8b9) by [@dwisiswant0](https://github.com/dwisiswant0)
2021-07-27 10:06:13 +00:00
- [Hack with Automation !!!](https://dhiyaneshgeek.github.io/web/security/2021/07/19/hack-with-automation/) by [@DhiyaneshGeek](https://github.com/DhiyaneshGeek)
2020-12-18 15:33:09 +00:00
2021-01-30 06:42:19 +00:00
### Credits
2020-10-19 19:07:59 +00:00
2021-01-30 06:42:19 +00:00
Thanks to all the amazing community [contributors for sending PRs](https://github.com/projectdiscovery/nuclei/graphs/contributors). Do also check out the below similar open-source projects that may fit in your workflow:
2020-10-19 19:07:59 +00:00
2021-01-30 06:42:19 +00:00
[FFuF](https://github.com/ffuf/ffuf), [Qsfuzz](https://github.com/ameenmaali/qsfuzz), [Inception](https://github.com/proabiral/inception), [Snallygaster](https://github.com/hannob/snallygaster), [Gofingerprint](https://github.com/Static-Flow/gofingerprint), [Sn1per](https://github.com/1N3/Sn1per/tree/master/templates), [Google tsunami](https://github.com/google/tsunami-security-scanner), [Jaeles](https://github.com/jaeles-project/jaeles), [ChopChop](https://github.com/michelin/ChopChop)
2020-04-04 16:46:21 +00:00
2021-01-30 06:42:19 +00:00
### License
2020-08-08 08:00:07 +00:00
2021-01-30 06:42:19 +00:00
Nuclei is distributed under [MIT License](https://github.com/projectdiscovery/nuclei/blob/master/LICENSE.md)
2020-04-05 11:26:13 +00:00
2021-01-30 06:42:19 +00:00
<h1 align="left">
2021-07-27 09:54:39 +00:00
<a href="https://discord.gg/projectdiscovery"><img src="static/Join-Discord.png" width="380" alt="Join Discord"></a> <a href="https://nuclei.projectdiscovery.io"><img src="static/check-nuclei-documentation.png" width="380" alt="Check Nuclei Documentation"></a>
2021-01-30 06:42:19 +00:00
</h1>