Authentication session testing

From xalgorix/xalgorix · View interactive version

Authentication session testing is an AI agent skill from the GitHub repository xalgorix/xalgorix. Black-box testing of the full authentication and session lifecycle - registration, login, MFA, password reset, recovery, email change, logout, refresh, device trust - and session token handling including fixation, invalidation, replay, and cross-context binding.

How to use this skill

Skill file

Authentication and Session Testing

Purpose

Test the entire account and session lifecycle as a state machine, not just login. Every lifecycle transition (register, verify, login, MFA, reset, recovery, email change, role change, logout) is a boundary where revocation, binding, or downgrade logic is forgotten.

Entry Conditions

Step 0: Find the REAL Session Token

Apps set many cookies (analytics, CSRF, consent). Delete cookies one at a time and re-request a protected page - the one whose removal logs you out is the session token. Test only that one for the flaws below.

Session Lifecycle Matrix

Capture a valid session token, then perform each lifecycle event in a SEPARATE session and replay the old token against a protected route. Record status + body differential for each:

| Event | Question | Evidence to capture |

|---|---|---|

| Logout | is the old token dead server-side? | old cookie replay after logout |

| Password change | are other sessions revoked? | old session still valid after change |

| Password reset | does reset invalidate all sessions? | old session after reset completes |

| MFA change / enrollment | are sessions re-verified? | old session after MFA enrollment |

| Role change (up or down) | does privilege apply to existing sessions? | old session reaching admin route after downgrade |

| Account disable / deletion | immediate revocation? | old session after admin-side disable |

| Email change | does notification + re-verification occur? | old session after email change |

A stale token still working after logout is a server-side revocation failure (critical for stolen-session scenarios) - prove it with a state-changing request, not a cached GET.

Session Token Handling

Account Lifecycle Abuse

Registration

Login

MFA bypass routes

Password reset / recovery

Email change / verification

Methodology

map the lifecycle events the app exposes
-> capture a valid session token (baseline)
-> trigger each lifecycle event, replay the OLD token
-> record the differential (dead vs alive)
-> for each alive-after-event case, prove a state change or protected read
-> report with both request pairs attached

Evidence Contract

Not enough: old cookie returned 200 on GET /profile (may be cached or idempotent read).

Good proof: the stale session performs an authenticated state change (update profile, read private data never exposed to anonymous) - request/response pair attached, lifecycle event timestamped.

Not enough: reset token appeared reusable. Good proof: the same token changes the password a second time after consumption, with both responses captured.

Common Misses

False Positives

Xalgorix Tool Strategy

When to Load a Specialist Skill

Stopping Rule

Stop lifecycle testing when: every lifecycle event the app exposes has its before/after token differential recorded, the recovery flow has been exercised cross-account at least once, and no new auth route (mobile/legacy/GraphQL) has appeared for two consecutive discovery passes. Report proven revocation/binding failures; record hardening observations as low-priority notes.

Handoffs

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.