Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Web Auth Session Handling

ASecurity

Legitimately acquire and KEEP an authenticated session (through MFA/OTP) so you can test the post-auth attack surface, and hand that session to your tools without leaking secrets. Load when the high-value classes (IDOR/BOLA, mass assignment, injection on real data APIs) are blocked behind login/SMS-OTP/TOTP, when tokens keep expiring mid-test, or when Burp/Playwright keep logging you out. Distinct from attacking auth — this one authenticates and reuses the session.

20 stars
0 votes
0 copies
0 views
Added 9/22/2026
ai-agentsrustgotestinggitapi

Works with

cliapi

Security Analysis

A100/100

Scanned 9/22/2026

$npx -y skills add NoorQureshi/SploitAgent --skill web-auth-session-handling --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Web Auth Session Handling?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Web Auth Session Handling
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/noorqureshi-web-auth-session-handling/badge)](https://www.skillsdirectory.com/skills/noorqureshi-web-auth-session-handling)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: web-auth-session-handling
description: >
  Legitimately acquire and KEEP an authenticated session (through MFA/OTP) so you can test the
  post-auth attack surface, and hand that session to your tools without leaking secrets. Load when
  the high-value classes (IDOR/BOLA, mass assignment, injection on real data APIs) are blocked
  behind login/SMS-OTP/TOTP, when tokens keep expiring mid-test, or when Burp/Playwright keep
  logging you out. Distinct from attacking auth — this one authenticates and reuses the session.
domain: web
type: methodology
stability: learning
modes: [pentest, bugbounty]
severity: info
owasp: [A01:2021-Broken-Access-Control]
tools: [burp, playwright, caido, ffuf]
schema_version: 1
---

# Authenticated session handling

## When it applies
The interesting bugs live *after* login — cross-tenant IDOR/BOLA, mass assignment, injection on
the real data APIs — but the run keeps collapsing to pre-auth findings because login is gated by
MFA/OTP, or the token expires and every automated request 401s halfway through. This skill is the
setup step that makes authenticated testing actually work. It does **not** attack the auth
mechanism (`web-oauth`, `web-auth-jwt`, `api-auth-attacks` do that) — it obtains one legitimate
session and keeps it usable.

## Why it works
Post-auth coverage silently disappears when tooling can't hold a session: the scanner logs out,
the token lapses, or MFA can't be satisfied autonomously. Capturing the session as a *reusable
artifact* — the cookie/localStorage state for browser-driven testing and the raw bearer token for
direct API replay — decouples "log in once" from "test a thousand requests," so the whole
authenticated surface stays reachable for the life of the token.

## Method
1. **Get a real test account, in writing.** For a pentest, the client provides it; for bounty,
   use an account you own (register two: attacker + victim, for IDOR diffing). Record it by
   reference in `scope.txt` — never paste live credentials into notes or a prompt.
2. **Handle the MFA/OTP gate** by the least-privileged means available:
   - **TOTP seed shared** → generate the current code from the Base32 seed (`oathtool --totp -b <SEED>`)
     and submit it. Fully repeatable.
   - **Operator-relayed OTP** → drive login to the OTP prompt, a human supplies the code once, continue.
   - **Out-of-band / human-in-the-loop** → persist the pre-OTP browser context, pause, let the
     operator complete the challenge, then resume and capture state.
3. **Capture the session as artifacts:**
   - Browser state — Playwright `storageState.json` (`context.storage_state(path=...)`) holds cookies + localStorage.
   - API replay — the raw access/ID token plus its `expires_at`.
4. **Feed it to your tools:**
   - **Burp/Caido** — a session-handling rule + macro that re-auths on a logged-out signature
     (a redirect to `/login`, a 401, a specific body), so long scans don't drop the session.
   - **Playwright** — launch with `storage_state="storageState.json"`.
   - **API fuzzers** (`ffuf`, `api-fuzzing`) — inject the bearer as a header.
5. **Refresh, don't re-login.** Record `expires_at`; when a refresh token exists, refresh; only
   re-run the full login when it doesn't. A wave of sudden 401s means the token lapsed — refresh
   before you trust "not vulnerable."
6. **Diff two sessions for access control.** Hold A's and B's artifacts side by side and replay
   each other's object references (`web-idor`, `api-bola`) — the core authenticated test.

## Gotchas
- **Present creds ≠ working creds.** Before spawning a big authenticated scan, verify the session
  actually reaches a known post-auth endpoint (200 with your data) — otherwise you "test" a
  logged-out surface and report false negatives.
- **Never inline the token.** Pass sessions by file reference; keep secrets out of prompts, notes,
  and any committed file. The `engagements/` tree is git-ignored — keep them there.
- **If a realm truly can't be authenticated** (no test account, no OTP relay), say so honestly —
  record the post-auth surface as *deferred/untested*, don't fake an N/A or silently skip it.
- **Scope the session's blast radius** — a test account with real admin rights can do real damage;
  prefer least-privilege test roles, and treat destructive actions per RoE.

## Verify success
A request built entirely from your captured artifact (no live browser) returns a known post-auth
response with your account's data — and a two-session IDOR probe runs cleanly against it.

## References
Playwright authentication/storageState docs; Burp/Caido session-handling rules; RFC 6238 (TOTP).

Attribution

NoorQureshiNoorQureshi
View sourceSee grades on GitHubMore from NoorQureshi →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698431 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →