-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Added fuzzing support for query params + var dump feature #2679
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
payloads
to support file input -
payloads
to support global dsl/variable -
values
to support global dsl/variable (nmi for why required) -
keys
to support global dsl/variable (nmi for why required) - uniform request block (tbd for usability)
- mimic existing nuclei request behavior (tbd what is correct behaviour)
- lint / build fix
- docs update
-
keys-regex
parameter add
router.GET("/", func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { | ||
w.Header().Set("Content-Type", "text/html") | ||
value := r.URL.Query().Get("id") | ||
fmt.Fprintf(w, "This is test matcher text: %v", value) |
Check warning
Code scanning / CodeQL
Reflected cross-site scripting
func permissionsHandler(ctx echo.Context) error { | ||
command := ctx.QueryParam("cmd") | ||
fields := strings.Fields(command) | ||
cmd := exec.Command(fields[0], fields[1:]...) |
Check failure
Code scanning / CodeQL
Command built from user-controlled sources
|
||
func requestHandler(ctx echo.Context) error { | ||
url := ctx.QueryParam("url") | ||
data, err := http.Get(url) |
Check failure
Code scanning / CodeQL
Uncontrolled data used in network request
} | ||
|
||
func infoHandler(ctx echo.Context) error { | ||
return ctx.HTML(200, fmt.Sprintf(bodyTemplate, fmt.Sprintf("Name of user: %s%s%s", ctx.QueryParam("name"), ctx.QueryParam("another"), ctx.QueryParam("random")))) |
Check warning
Code scanning / CodeQL
Reflected cross-site scripting
second, _ := strconv.Atoi(trimmed[1]) | ||
text = strconv.Itoa(first * second) | ||
} | ||
return ctx.HTML(200, fmt.Sprintf(bodyTemplate, fmt.Sprintf("Text: %s", text))) |
Check warning
Code scanning / CodeQL
Reflected cross-site scripting
|
||
func redirectHandler(ctx echo.Context) error { | ||
url := ctx.QueryParam("redirect_url") | ||
return ctx.Redirect(302, url) |
Check warning
Code scanning / CodeQL
Open URL redirect
Docs here - projectdiscovery/nuclei-docs#78 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge conflict
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm - marking as "request changes" just to check if the following are known limitations:
- Parameters with same name are flattened (eg.
http://192.168.1.1/?id=1&id=2
=>http://192.168.1.1/?id=fuzz
) replacement
seems to be literal, without the capability to refer to the existing value for some custom manipulation via DSL (eg.{{md5(current_param_value+fuzz)}}
)
@Mzack9999 made the value of the parameter accessible as DSL payloads:
reflection:
- "1337"
fuzzing:
- part: query
type: replace
mode: single
fuzz:
- "{{concat(value,reflection,'somethingelse')}}"
|
Proposed changes
Closes #2529 and #2670
Docs here - projectdiscovery/nuclei-docs#78
Example template
Example run
Checklist