hunt-session

Detect session fixation, invalidation, and token-rotation vulnerabilities in web applications.

6|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/Wyl-cmd/kxns-cli --skill hunt-session-wyl-cmd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hunt-session
Source: https://github.com/Wyl-cmd/kxns-cli/tree/main/src/kxns_cli/skills/hunt-session
Command: npx skills add https://github.com/Wyl-cmd/kxns-cli --skill hunt-session-wyl-cmd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Session management flaws like fixation, missing invalidation on logout or password change, and weak refresh-token handling let attackers hijack accounts persistently, yet they are hard to prove without rigorous two-session testing and false-positive controls. ## Core Features & Use Cases - Fixation & Invalidation Testing: Verify session regeneration on login and invalidation on logout, password change, and email change using two real captured sessions (attacker A and victim B). - Token & Cookie Analysis: Audit session-ID entropy against NIST SP 800-63B, decode JWTs for missing exp/jti claims, test refresh-token rotation and reuse-detection, and check Secure/HttpOnly/SameSite/__Host- cookie attributes. - Use Case: During a bug bounty engagement, capture a victim test account's session, change its password from a second session, then replay the old cookie against /api/profile to prove a persistent account-takeover primitive with body-diff evidence. ## Quick Start Test whether the target application invalidates an old session after a password change by capturing two sessions with curl and replaying the first one.

Frequently Asked Questions about hunt-session

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test for session fixation vulnerabilities?

Capture a pre-authentication session cookie with curl, authenticate while carrying that same cookie, then compare the session value before and after login. If the value is unchanged and now returns authenticated data, the server failed to regenerate the session and fixation is confirmed.

How to verify session invalidation after password change?

Log in twice to create sessions A and B, change the password using session B, then replay session A against an authenticated endpoint. If session A still returns the account's unique data in the response body, the old session survived and persistent account takeover is possible.

What is refresh token rotation and reuse detection?

Rotation means each refresh request returns a new refresh token, and reuse detection means replaying an old token invalidates the entire token family. Test by rotating once, replaying the old token, and checking whether the new token still works afterward.

How much entropy should a session ID have?

NIST SP 800-63B requires at least 64 bits of entropy in a session identifier. Collect 200 or more samples, check for duplicates, sequential patterns, and decodable structures like timestamps or user IDs rather than judging by token length alone.

Why is a 200 status code not proof of a session vulnerability?

Cached edge responses or generic SPA shells return 200 for everyone, so status codes alone prove nothing. Always diff the response body against the authenticated baseline for unique identity markers and run a garbage-cookie negative control to confirm the endpoint is session-gated.

When is a missing HttpOnly cookie flag a real finding?

A missing HttpOnly attribute is only a meaningful finding when chained to a real XSS or DOM sink that can actually read document.cookie. Standalone attribute gaps for HttpOnly, Secure, or SameSite are Low or Informational severity until paired with an exploit primitive.