Conversation
…L_1) vulnerabilities Open Redirect (Http3xxStatusCodeBasedInjection): - LEVEL_5: harden the blacklist check against bypasses that rely on browsers normalizing the URL before navigation - embedded control/ whitespace characters hiding a leading "//", and backslashes standing in for forward slashes. - LEVEL_6/7: stop concatenating the untrusted value directly onto the trusted authority. The old 'authority + value' pattern let a value like '.evil.com' produce 'https://trusted.com.evil.com', which is an actual subdomain of evil.com, not a path under trusted.com. The value is now normalized into a same-origin path with exactly one leading slash and '@'/control characters stripped. - LEVEL_9/10: apply the same same-origin allow-list used for LEVEL_5 instead of unconditionally trusting the redirect target. IDOR (IDORVulnerability): - LEVEL_1: the requested id is now compared against the id embedded in the caller's signed token; a mismatch is rejected instead of returning any profile requested. - LEVEL_2: the profile lookup now always uses the id from the signed token, ignoring the separate attacker-controllable userId cookie. - LEVEL_3/4: the authorization role now always comes from the signed token's own role claim, ignoring the separate (plaintext / base64) role cookie that was previously trusted outright. JWT (JWTVulnerability): - LEVEL_1: the token to validate is now read from the Authorization header instead of a 'JWT' URL query parameter, so the credential no longer leaks into server access logs, browser history, or the Referer header of subsequent requests. Updated the LEVEL_1 front-end to match. Verified locally (WSL, Java 17, Gradle wrapper): - ./gradlew compileJava compileTestJava -> BUILD SUCCESSFUL - Targeted unit tests (IDORVulnerabilityTest, JWTVulnerabilityTest, Http3xxStatusCodeBasedInjectionTest) -> BUILD SUCCESSFUL, no failures - Booted the app locally and exercised each fixed level over HTTP: every original exploit payload is now rejected/ignored while the legitimate (same-user / same-origin / header-based) flow still returns the expected data, with no regressions on adjacent unaffected levels (Open Redirect LEVEL_1-4/8/11, JWT LEVEL_2).
🏆 VulnerableApp — CTF Patch Score7 / 110 challenges patched
Commit: 🎉 Your result is on the leaderboard — see where you rank! 🏆 |
Author
|
Closing as part of a full stand-down of this CTF push. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes 10 challenges:
Http3xxStatusCodeBasedInjection).evil.combecomehttps://trusted.com.evil.com, an actual evil.com subdomain); the value is now normalized into a same-origin path with exactly one leading slash.IDORVulnerability)userId_level2cookie.JWTVulnerability)Authorizationheader instead of aJWTURL query parameter (credential no longer leaks into logs/history/Referer). Front-end updated to match.Local verification (WSL, Java 17, Gradle wrapper)
compileJava/compileTestJava: BUILD SUCCESSFULIDORVulnerabilityTest,JWTVulnerabilityTest,Http3xxStatusCodeBasedInjectionTest): BUILD SUCCESSFUL, no failuresbootRun) and exercised every fixed level over real HTTP requests:?JWT=query vector is now ignored;Authorizationheader path validates correctly and rejects invalid tokens (401)..evil.com) and bare external domains are all rejected/kept same-origin; legitimate same-origin/relative redirects still 302 correctly.🤖 Generated with Claude Code