Skip to content

Harden Weak Session IDs Low - #280

Open
r1kka6 wants to merge 1 commit into
OWASP-CTF:dc34-ctffrom
r1kka6:fix/weak-session-id-low
Open

r1kka6 wants to merge 1 commit into
OWASP-CTF:dc34-ctffrom
r1kka6:fix/weak-session-id-low

Conversation

@r1kka6

@r1kka6 r1kka6 commented Aug 9, 2026

Copy link
Copy Markdown

Summary

  • replace the predictable low-level dvwaSession counter with a cryptographically random 256-bit value
  • scope and harden the generated cookie with Secure, HttpOnly, SameSite=Strict, and a challenge-specific path

Verification

  • docker run --rm -v "$PWD":/app dvwa-ctf-xss-reflected-low php -l /app/vulnerabilities/weak_id/source/low.php
  • docker build -t dvwa-ctf-weak-session-id-low .
  • compared two POSTs to /vulnerabilities/weak_id/ against baseline and patched containers: baseline returned dvwaSession=1 then dvwaSession=2; patched returned distinct 64-hex values with hardened cookie flags

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