authenticated-session-acquisition
Skill555 starsChanged 8 months agoMITView on GitHub
Acquire an authenticated session THROUGH MFA/OTP on an in-scope target and emit a reusable session artifact (Playwright storageState + Bearer) so executors can test the post-auth attack surface. Use when the highest-value authenticated classes (BOLA/IDOR/mass-assignment/injection on the real data APIs) are blocked because login is gated by SMS-OTP or TOTP MFA. Distinct from the authentication skill (which ATTACKS auth); this one legitimately authenticates and hands the session to the rest of the engagement.
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- Kur1sulab/blackboxedited, first seen Aug 12, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- Kur1sulab/blackbox★ 398% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository49 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ai-threat-testingSkill
- api-securitySkill
- attack-path-stitcherSkill
- authenticationSkill
- blockchain-securitySkill
- client-sideSkill
- cloud-containersSkill
- cloud-defenseSkill
- coordinationSkill
- cryptographySkill
- cve-poc-generatorSkill
- cve-risk-scoreSkill
- dfirSkill
- essential-toolsSkill
- firewall-reviewSkill
- github-workflowSkill
- hackeroneSkill
- hacktheboxSkill
- infrastructureSkill
- injectionSkill
- mobile-securitySkill
- network-appliance-offensiveSkill
- osintSkill
- patt-fetcherSkill
- pci-secure-softwareSkill
- pentest-engagementSkill
- protect-with-passwordSkill
- reconnaissanceSkill
- regression-sweepSkill
- reverse-engineeringSkill
- risk-prioritiserSkill
- script-generatorSkill
- server-sideSkill
- skill-pruneSkill
- skill-updateSkill
- social-engineeringSkill
- source-code-scanningSkill
- systemSkill
- techstack-backendSkill
- techstack-correlationSkill
- techstack-frontendSkill
- techstack-infraSkill
- techstack-osintSkill
- techstack-securitySkill
- techstack-identificationSkill
- ti-ingestSkill
- transilience-report-styleSkill
- web-app-logicSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 0 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 33
If no test account / OTP seed is available and no OTP can be relayed, the realm's post-auth surface is untestable through no fault of the …
- Very specific: line 43
Read the scope: which realms/tenants are in creds_env, which assets are behind them, roe.reversible_writes for the test tenant.
- Very specific: line 46
Verify: one minimal authenticated request returns an authorized response (not 401/403/login-redirect).
- Very specific: line 51
Do not paste tokens, seeds, or cookies into prompts, experiments.md, attack-chain.md, or any tools/*.md — reference the artifact file by …
- Very specific: line 52
Do not brute-force or bypass the OTP/MFA challenge here — that is an authentication finding, not session acquisition.
- Very specific: line 53
Do not mark an MFA-blocked cell covered/NA — mark it deferred with a filed CIR so the gate discloses it.
- Very specific: line 54
Do not test outside the authenticated tenant you were given, and honor roe.reversible_writes (create-then-delete only in your own test …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Authenticated Session Acquisition
On financial and multi-tenant targets the login is gated by SMS OTP / TOTP MFA that an autonomous run cannot satisfy, so the post-auth surface (BOLA/IDOR/mass-assignment/injection on the real data APIs, session handling, API pivots) silently collapses to pre-auth findings only. This skill's job is narrow and concrete: get one legitimate authenticated session and hand it to the executors as a reusable artifact. It does not attack the auth mechanism — see authentication for that.
The artifact contract (how the session reaches executors)
Emit both, into the engagement's OUTPUT_DIR, referenced BY NAME (never inline secrets — credential-loading.md):
OUTPUT_DIR/<asset>/session/storageState.json— the Playwright storage state (cookies + localStorage) for browser-driven post-auth testing.OUTPUT_DIR/<asset>/session/bearer.txt— the raw access/ID token (+ itsexpires_at) for direct API replay.
Executors consume these exactly like any env-loaded secret: the scope file's creds_env names the realm, and the session path is passed as a file reference, so no token is ever written into a prompt, experiments.md, or attack-chain.md. Re-run this skill when the token expires (record expires_at; refresh rather than re-login where a refresh token exists).
Modes (pick by what the client can provide)
| Mode | When | How |
| TOTP-from-seed | The client shared the TOTP secret (Base32 seed) for a test account | Generate the current code deterministically with tools/totp_now.py <BASE32_SEED>, submit it in the login flow. Fully autonomous, repeatable. |
| Explicit-OTP | The operator can read a one-time code (SMS/email/authenticator) at run time | Drive login to the OTP prompt, the operator supplies the code once, continue. |
| Human-in-the-loop resume | OTP arrives out-of-band and the run must pause | Persist the pre-OTP browser context, pause; the operator completes the challenge; resume and capture storageState. |
Provider recipes
Detailed per-IdP flows are in reference/session-acquisition.md: Auth0, Okta, Amazon Cognito (SRP auth + the UNSIGNED unauthenticated-posture check), and Descope. Each recipe ends by exporting storageState.json + bearer.txt in the contract above.
When a session cannot be acquired — defer honestly, do not fake
If no test account / OTP seed is available and no OTP can be relayed, the realm's post-auth surface is untestable through no fault of the tester. Record it honestly instead of a fabricated NA or a silent miss:
- File a client-input request at
reports/client-input-requests/CIR-NNN.mdnaming exactly what's needed ("needs test account / OTP seed / allowlist for<realm>"). - Set a realm-level
BLOCKED_REASONinattack-chain.md. - Mark that realm's post-auth coverage cells
status:"deferred"incoverage.json, each carryingdeferral_reason+client_input_request(the CIR path) — seecoverage-matrix.md. The deterministic gate then discloses the deferred surface in the report rather than hiding it, and only the parent orchestrator (viacoverage_gate.py --accept-deferrals) may finalize a substantiated-deferred engagement. A scope that is entirely auth-gated never completes.
The preflight cred-reach probe (preflight-checklist.md, Phase-1 gate) is what triggers this path: present creds are not working creds; verify reachability per realm before spawning post-auth executors.
Workflow
- Read the scope: which realms/tenants are in
creds_env, which assets are behind them,roe.reversible_writesfor the test tenant. - Identify the IdP (login redirect host /
/.well-known/openid-configuration/ SDK bundle) → pick the recipe. - Acquire the session in the appropriate mode → write
storageState.json+bearer.txt. - Verify: one minimal authenticated request returns an authorized response (not 401/403/login-redirect).
- Hand the artifact paths to the post-auth executor batch; on failure, run the defer path above.
Anti-Patterns
- Do not paste tokens, seeds, or cookies into prompts,
experiments.md,attack-chain.md, or anytools/*.md— reference the artifact file by path only. - Do not brute-force or bypass the OTP/MFA challenge here — that is an
authenticationfinding, not session acquisition. - Do not mark an MFA-blocked cell
covered/NA— mark itdeferredwith a filed CIR so the gate discloses it. - Do not test outside the authenticated tenant you were given, and honor
roe.reversible_writes(create-then-delete only in your own test tenant).
Reference
reference/session-acquisition.md— per-IdP acquisition recipes (Auth0 / Okta / Cognito / Descope) + the storageState/Bearer export.tools/totp_now.py— stdlib RFC-6238 TOTP generator (the TOTP-from-seed mode).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

