Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config-json.yaml false positive & proposed improvements #8303

Closed
fmunozs opened this issue Oct 2, 2023 · 1 comment · Fixed by #8334
Closed

config-json.yaml false positive & proposed improvements #8303

fmunozs opened this issue Oct 2, 2023 · 1 comment · Fixed by #8334
Assignees
Labels
Done Ready to merge false-positive Nuclei template reporting invalid/unexpected result

Comments

@fmunozs
Copy link
Contributor

fmunozs commented Oct 2, 2023

Nuclei Version:

2.9.15

Template file:

https://github.com/projectdiscovery/nuclei-templates/blob/main/http/exposures/configs/config-json.yaml

Command to reproduce:

nuclei -t http/exposures/configs/config-json.yaml -u https://pmm.share-now.com/

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v2.9.15

                projectdiscovery.io

[WRN] Found 11 template[s] loaded with deprecated paths, update before v3 for continued support.
[INF] Current nuclei version: v2.9.15 (latest)
[INF] Current nuclei-templates version: v9.6.4 (latest)
[INF] New templates added in latest release: 121
[INF] Templates loaded for current scan: 1
[INF] Targets loaded for current scan: 1
[config-json] [http] [medium] https://pmm.share-now.com/config/default.json

Anything else:

Currently this template is looking for a couple of very specific strings, which IMHO is not ideal, as shown in the above example, when a page returns 200, it may report a false positive issue. I think it may be a better idea to check for the return file type for "application/json" , we could add "text/plain", "text/javascript", "text/json" just in case for older http servers. This should discard false positive text/html responses.

Another idea would be to check if the returned body is a JSON string, not sure if DSL allows that.

@fmunozs fmunozs added the false-positive Nuclei template reporting invalid/unexpected result label Oct 2, 2023
@princechaddha princechaddha linked a pull request Oct 8, 2023 that will close this issue
2 tasks
@princechaddha
Copy link
Member

Hi @fmunozs, Thank you for taking the time to create this issue and for contributing to this project 🍻

@princechaddha princechaddha added the Done Ready to merge label Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Done Ready to merge false-positive Nuclei template reporting invalid/unexpected result
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants