Skip to content

feat(bypass): add static-asset extension in query string payloads - #61

Merged
devploit merged 1 commit into
mainfrom
feat/query-extension-bypass
Oct 30, 2026
Merged

devploit merged 1 commit into
mainfrom
feat/query-extension-bypass

Conversation

@devploit

Copy link
Copy Markdown
Owner

Summary

Adds the ?x=.js family of payloads to the suffix-tricks technique and to payloads/endpaths, plus tests and a README note.

Why

A 403 bypass against Microsoft-Azure-Application-Gateway/v2 was reported by @4osp3l on 2026-10-24: a URL returns 403, and appending ?x=.js grants direct access to the restricted resource.

The mechanism is that the gateway rule matches the full request URI against static-asset suffixes. /admin?x=.js ends in .js, so it is classified as a static asset and skips the restriction, while the origin ignores the unknown query parameter and serves /admin.

nomore403 already covered two neighbours of this trick but not the trick itself:

  • extensions appended to the path (/admin.js, /admin;.js, .css, .json) in suffix-tricks and endpaths
  • arbitrary query parameters (?debug=1, ?param, ?download=1, ?format=json) in both

Neither puts a static-asset extension as the query value, which is the condition that fires the Azure rule. This PR fills that gap.

Changes

  • cmd/requester.go: suffix-tricks emits ?x=<ext> for .js, .css, .png, .ico, .svg. When the target already has a query string, the variant is emitted as ?x=<ext>&<original query> so the original parameters are preserved, matching how the existing suffix payloads behave.
  • payloads/endpaths: adds the same values plus bare ?.js, ?.css, ?.png, so a default wordlist run also exercises the bypass.
  • cmd/bypass_test.go: TestSuffixTricksSendsQueryExtensionVariants (asserts the three variants above, with and without original query) and TestEndPathsPayloadFileContainsQueryExtensionVariants (pins the shipped wordlist). Both were written first and failed before the implementation.
  • README.md: documents the new variant under suffix-tricks.

Verification

go vet ./...
go test ./...   # ok  github.com/devploit/nomore403/cmd

Security review

Reviewed the diff for exploitable issues. The only sources are the target URL the operator supplies and static literals; the only sink is outbound requests to that target, which is the tool's purpose. No new parsing, no file or shell interaction, no secrets.

VERDICT: PASS

Adds the "?x=.js" family of payloads to the suffix-tricks technique and
to payloads/endpaths.

Why: a 403 bypass against Microsoft-Azure-Application-Gateway/v2 was
reported (https://x.com/4osp3l, 2026-10-24) where appending "?x=.js" to a
forbidden URL grants access. The gateway rule matches the full request
URI against static-asset suffixes, so the request is classified as an
asset and skips the restriction, while the origin ignores the query and
serves the protected resource. nomore403 already tried extensions on the
path (/admin.js) and arbitrary query parameters (?debug=1), but never an
extension as a query value, so this variant was not covered.

suffix-tricks now emits ?x=<ext> for .js/.css/.png/.ico/.svg, preserving
the original query string when present. payloads/endpaths gains the same
values plus bare ?.js/?.css/?.png so the default wordlist run also
exercises the bypass. Tests pin both behaviours.
@devploit
devploit merged commit 57e0a39 into main Oct 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant