projectdiscovery / nuclei

Fast and customizable vulnerability scanner based on simple YAML based DSL.
https://docs.projectdiscovery.io/tools/nuclei
MIT License
20.01k stars 2.46k forks source link

[feature] template browser support #203

Closed ehsandeep closed 3 years ago

ehsandeep commented 4 years ago

Is your feature request related to a problem? Please describe. with the addition of relative path support, we almost using it all the time while running nuclei, but as the templates are not in the current directory it becomes a problem when you want to list/find any targeted template, so adding flag support which will perform same ls like action in at installed template path would make it more useful.

Describe the solution you'd like

Suggested flag:-

ts - stands for template search.

example:-

This is same as ls -1 ~/nuclei-templates/

nuclei -ts

[WRN] Use with caution. You are responsible for your actions
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[INF] Searching for templates in /Users/bauthard/nuclei-templates/

LICENSE
README.md
basic-detections
brute-force
cves
dns
files
panels
payloads
security-misconfiguration
subdomain-takeover
technologies
tokens
vulnerabilities
workflows

This is same as ls -1 ~/nuclei-templates/tokens

nuclei -ts tokens/

[WRN] Use with caution. You are responsible for your actions
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[INF] Searching for templates in /Users/bauthard/nuclei-templates/tokens/

amazon-mws-auth-token-value.yaml
aws-access-key-value.yaml
google-api-key.yaml
http-username-password.yaml
mailchimp-api-key.yaml
slack-access-token.yaml

string-based search for template file names.

Note:- if user-provided string which is the same as the folder name, folder lookup will be performed instead of filename search.

nuclei -ts rce

[WRN] Use with caution. You are responsible for your actions
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[INF] Searching for templates in /Users/bauthard/nuclei-templates/

vulnerabilities/pdf-signer-ssti-to-rce.yaml
vulnerabilities/rce-shellshock-user-agent.yaml
vulnerabilities/rce-via-java-deserialization.yaml
workflows/liferay-rce-workflow.yaml
workflows/netsweeper-preauth-rce-workflow.yaml

In case, no config file found, the following error will be displayed.

nuclei -ts 

[WRN] Use with caution. You are responsible for your actions
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[FTL] Program exiting: nuclei-templates are not installed, use update-templates flag to download.

Few notes to consider:-

ehsandeep commented 3 years ago

This feature will be dropped in favor of,

  1. tl flag that lists all the templates.
  2. Upcoming website that will also list and search available templates.