hunt-session
Lets your agent search for problems in how user sessions are managed. It's important to prevent attackers from stealing user access.
What it does
This tool helps check if user sessions on websites and apps are secure. It looks for flaws that could let an attacker access someone else's account, even after they log out or change their password.
When to use it
- ✓When testing the security of a website or application.
- ✓To check if logging out truly ends the user's session.
- ✓To ensure changing a password invalidates old sessions.
Example of what to ask your AI
“Check session management security for the website example.com”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The tool simulates actions like logging in, logging out, and changing passwords, observing if the user's session is correctly invalidated. It looks for known patterns of session management vulnerabilities.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill hunt-sessionOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/hunt-session/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.
Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:
- Ask the user to state the exact target URL, IP, account, or resource.
- Ask the user to confirm written authorization and the permitted scope.
- Show the exact command(s) and explain their expected effect.
- Wait for explicit confirmation in the current conversation.
Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.
Autonomous Testing Priority
Missing HttpOnly on cookies is auto-detected — focus your active testing on lifecycle invalidation (higher impact).
Pattern 1 — Session survives logout (most common high-value finding):
- Login and note the session token/cookie value
- Call the logout endpoint (
/logout,POST /api/logout, etc.) - Try to use the OLD session token to access a protected resource (
/api/me,/dashboard,/account) - If 200 with user data → session not invalidated on logout = ATO persistence
Pattern 2 — Session not regenerated on login (session fixation):
- GET any page to receive a pre-authentication session token/cookie
- POST valid credentials to the login endpoint
- Compare the session token BEFORE and AFTER login
- If the token is unchanged → session fixation vulnerability
Pattern 3 — Session survives password change:
- Login → record session A value
- Change the password via the account settings endpoint
- Replay session A on a protected endpoint
- If 200 → token not rotated on credential change = persistent ATO (critical chain when combined with XSS/cookie theft)
Content-type: Login and session endpoints vary — use application/json for REST APIs, application/x-www-form-urlencoded for traditional web forms. Try both if the first returns an unexpected response.
Proof: A protected-resource 200 response (with user data) using a session token that should have been invalidated confirms the finding.
HUNT-SESSION — Session Management
Crown Jewel Targets
Session fixation leading to admin hijack = Critical. Session surviving a password change = High-to-Critical (persistent ATO from a stolen cookie that the victim believes they revoked by resetting their password).
Highest-value chains:
- Session fixation — server accepts a session ID set by the client and does NOT regenerate it on login → attacker pre-plants an ID, victim authenticates, attacker rides the now-authenticated session → persistent ATO.
- No invalidation on logout — old token still works after
/logout→ theft window never closes. - No invalidation on password / email change — a stolen session survives the victim's "I think I was hacked, let me reset" → persistent ATO. This is the single highest-paid session bug class.
- Refresh-token reuse without rotation-detection — a leaked refresh token mints fresh access tokens forever; no reuse-detection means the legitimate user's later refresh does NOT revoke the attacker's branch.
- Predictable / low-entropy session ID — sequential, timestamp- or userId-derived IDs → brute-force or compute other users' sessions.
- JWT-as-session with no
exp/ no revocation list — stolen JWT = permanent access; logout is cosmetic.
Grounding — patterns that shaped each phase
No invented CVE/report IDs below. These are the named, publicly-documented patterns this skill encodes:
- Session fixation, login-CSRF, no-regeneration-on-auth — OWASP WSTG-SESS-03 / WSTG-SESS-01; the classic ACROS / Mitja Kolšek session-fixation paper. Highest-impact variant: fixing the session of an SSO/admin user.
- SameSite=Lax sibling-subdomain CSRF reaching session state — Argo CD CVE-2024-22424 (Lax cookies sent on top-level cross-site navigations from a sibling subdomain). Use this when a session cookie relies on
SameSite=Laxas its only CSRF defence. - Refresh-token rotation & automatic reuse-detection — the Auth0/IETF OAuth-Security-BCP model: a rotated refresh token, if replayed, must invalidate the entire token family. Absence = the core bug to prove.
…
FAQ
What is a 'session'?
It's like a temporary badge a website gives you after you log in, so it knows who you are on subsequent visits without asking for your password again.
What is 'session invalidation'?
It's the process of 'logging out' or ending a user's session, ensuring that the temporary badge no longer works.
Why is testing this important?
If a session isn't invalidated properly, an attacker could use an old badge (even after logout) to keep accessing the victim's account.
Details
Original description by the author
Hunt Session Management vulnerabilities
Popularity
- GitHub stars
- 48k
- Ranking position
- #3284
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
django-security
Helps your agent implement security practices in Django applications. It focuses on authentication, authorization, and prevention against common attacks, ensuring more secure code.
affaan-m/ECC
laravel-security
Helps your agent secure Laravel applications against threats. Implements security practices for authentication, authorization, and common attack prevention.
affaan-m/ECC
module-regression
Helps your agent manage changes in large projects. Ensures code changes in one part don't break other parts.
affaan-m/ECC