mizazhaider-ceh/agentarsenal/session-hijacking
Claude Code and agent skill by mizazhaider-ceh/agentarsenal
- community
Checking that the SKILL.md file is still in the repository.
Use when testing session management weaknesses on an authorized engagement: stealing, fixing, or predicting session tokens. Covers cookie attribute review, session fixation testing, token entropy analysis, and logout and expiry behavior. Use when assessing login and session handling, when cookies lack flags, when testing single sign-on flows, or when you need to prove that a stolen token grants access.
Install
npx vskill@latest install mizazhaider-ceh/agentarsenal/session-hijackingSKILL.md
The same SKILL.md was published earlier as mizazhaider-ceh/agentarsenal/session-hijacking.
Session hijacking takes over a user's authenticated state by stealing or fixing their session token. This skill covers testing session management on authorized engagements: reviewing cookie security, attempting fixation, analyzing token randomness, and verifying logout actually kills the session. It pairs naturally with XSS (the usual theft vector) but stands alone as a session-layer assessment. Only test with accounts provided for the engagement.
Quick Workflow
- Log in with a test account and capture every cookie and token.
- Review cookie attributes: Secure, HttpOnly, SameSite, Path, expiry.
- Test session fixation: plant a token before login, check it after.
- Analyze token entropy across several logins.
- Test logout, expiry, and concurrent session behavior.
- Prove the impact by replaying a token in a clean session where allowed.
- Record every behavior with request and response evidence.
1. Cookie review
A session cookie without HttpOnly is stealable by any XSS; without Secure it leaks over HTTP; without SameSite it rides CSRF requests. Each missing flag is a concrete, reportable weakness.
2. Fixation testing
Also test the URL: if the application accepts ?session=... in links, tokens leak through referrers and logs, which is a finding on its own.
3. Token entropy and lifecycle
Test idle timeout and absolute timeout with the test account: leave the session idle past the stated limit and confirm the server rejects it, not just the client.
Edge cases
- The app uses JWTs instead of cookies. Decode the token, check the
algorithm (none is the classic flaw), expiry, and whether the server validates the signature at all.
- Sessions are tied to IP or User-Agent. Note the binding; it mitigates
theft but breaks legitimate roaming, so report the tradeoff.
- Logout kills the cookie client-side only. Replaying the old token after
logout proves the server-side flaw; this is a common and serious miss.
- Remember-me tokens are long-lived. Review their entropy and theft
impact separately; a year-long token is a year-long vulnerability.
Escalation
- You need theft impact proof: with permission, demonstrate reading the
cookie via the confirmed XSS and replaying it; stop at proof of access, and use only test accounts.
- Token prediction looks possible: collect a larger sample, analyze with
a script, and only claim predictability with statistical evidence.
- SSO or OAuth is in play: test the session layer of the relying party
and the token handling of the flow separately.
Detection and defender view
Defenders see hijacking as sessions used from unusual IPs or devices, impossible-travel logins, and concurrent sessions from distant locations. Fixation shows as pre-login tokens that become authenticated. Defenses are rotating session IDs at login, strong cookie flags, short timeouts with server-side invalidation, binding sessions to device fingerprints where appropriate, and alerting on anomalous session use.
Key references
- MITRE ATT&CK T1539 (Steal Web Session Cookie).
- MITRE ATT&CK T1606.001 (Forge Web Credentials: Web Cookies).
- CWE-384 (Session Fixation).
- CWE-613 (Insufficient Session Expiration).
- CWE-614 (Sensitive Cookie in HTTPS Session Without Secure Attribute).
- OWASP Testing Guide: Session Management Testing.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/auth/auth-attacks/sub/session-hijacking/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mizazhaider-ceh/agentarsenal/session-hijacking)