# Authenticated session acquisition

> Authenticated session acquisition is an open-source agent skill for security. Obtains a logged-in session through MFA/OTP for later authenticated security testing. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/transilienceai/communitytools/tree/main/skills/authenticated-session-acquisition
- **Repository:** https://github.com/transilienceai/communitytools
- **GitHub stars:** 641
- **License:** MIT
- **Skill name:** authenticated-session-acquisition
- **Collection:** https://github.com/transilienceai/communitytools
- **Categories:** [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-12-02

## About

This skill is built for security testing engagements where the login flow of an in-scope target is protected by SMS or TOTP multi-factor authentication. Its purpose is to produce one legitimate authenticated session and save it as reusable files: a Playwright storage state holding cookies and localStorage, and a raw bearer token with its expiry time. Other testing steps can then reach the post-login parts of an application that would otherwise be out of reach.

The skill offers three ways to get past the second factor, depending on what the client provides: generating the current code from a shared TOTP seed with a bundled stdlib Python script, pausing so an operator can enter a one-time code at run time, or pausing the browser session for a human to finish the challenge and then resuming. It includes per-provider recipes for Auth0, Okta, Amazon Cognito and Descope, and a verification step that confirms an authenticated request returns an authorized response before the session is handed on.

If no test account or seed is available, the skill directs the agent to file a client input request, mark the affected coverage as deferred, and avoid reporting that surface as tested. Secrets are referenced by file path rather than written into prompts or notes.

## When your agent uses it

> 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.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/transilienceai/communitytools/tree/HEAD/skills/authenticated-session-acquisition)
- [License: MIT](https://github.com/transilienceai/communitytools/tree/HEAD/skills/authenticated-session-acquisition)

## Features

- **Session artifact export:** Writes Playwright storage state and a bearer token file to the engagement output directory.
- **TOTP code generation:** Produces current RFC 6238 codes from a shared Base32 seed using a bundled script.
- **Operator-assisted OTP entry:** Pauses at the one-time code prompt so an operator can supply the code during the run.
- **Identity provider recipes:** Step-by-step acquisition flows for Auth0, Okta, Amazon Cognito and Descope.
- **Session verification step:** Checks that a minimal authenticated request is accepted rather than rejected or redirected.
- **Honest deferral path:** Records untestable post-login areas with a client input request instead of marking them complete.

## Good for

- Log into a test tenant behind SMS or TOTP MFA and save the session for API testing
- Generate a current TOTP code from a client-shared seed for a test account
- Export a reusable bearer token and its expiry time for direct API calls
- Pause a login flow so an operator can enter a one-time code, then continue
- Document which post-login areas could not be tested because no test account was available

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/authenticated-session-acquisition` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/transilienceai/communitytools.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/authenticated-session-acquisition &&
cp -R "$tmp/skills/authenticated-session-acquisition" ~/.claude/skills/authenticated-session-acquisition &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/authenticated-session-acquisition` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/authenticated-session-acquisition` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/transilienceai/communitytools.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/authenticated-session-acquisition &&
cp -R "$tmp/skills/authenticated-session-acquisition" ~/.agents/skills/authenticated-session-acquisition &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/authenticated-session-acquisition` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/authenticated-session-acquisition` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/transilienceai/communitytools.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/authenticated-session-acquisition &&
cp -R "$tmp/skills/authenticated-session-acquisition" ~/.cursor/skills/authenticated-session-acquisition &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/authenticated-session-acquisition` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/transilienceai/communitytools.git --path skills/authenticated-session-acquisition
```

Or copy the folder to `~/.gemini/skills/authenticated-session-acquisition` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/authenticated-session-acquisition`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/transilienceai/communitytools.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/authenticated-session-acquisition &&
cp -R "$tmp/skills/authenticated-session-acquisition" ~/.copilot/skills/authenticated-session-acquisition &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/authenticated-session-acquisition` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/transilienceai/communitytools.git
```

Then copy `communitytools/skills/authenticated-session-acquisition` into your agent's skills folder as `authenticated-session-acquisition`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Authenticated session acquisition trigger?

It is meant for cases where the highest-value authenticated checks are blocked because login is gated by SMS OTP or TOTP MFA, and it is distinct from the authentication skill, which attacks auth.

### What files does Authenticated session acquisition produce?

It produces a Playwright storageState.json with cookies and localStorage, and a bearer.txt containing the raw access or ID token and its expires_at value.

### Does Authenticated session acquisition try to bypass MFA?

No. The skill states it does not brute-force or bypass the OTP challenge; it either uses a client-provided seed, an operator-supplied code, or a human-completed challenge.

### What does the TOTP script need?

The bundled tools/totp_now.py is a stdlib RFC-6238 generator that takes a Base32 seed as its argument.

### How do I install Authenticated session acquisition in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/authenticated-session-acquisition to use it in all your projects, or to .claude/skills/authenticated-session-acquisition in one project.

### Does Authenticated session acquisition run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Authenticated session acquisition?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Authenticated session acquisition?

The closest alternatives to Authenticated session acquisition are Authentication, API security, API security auth pattern, Ad methodology and Mobile security.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Authentication](https://ai-powered.com/skills/authentication): Authentication is an open-source agent skill for security.
- [API security](https://ai-powered.com/skills/api-security): API security is an open-source agent skill for security.
- [API security auth pattern](https://ai-powered.com/skills/api-security-auth-pattern): API security auth pattern is an open-source agent skill for security.
- [Ad methodology](https://ai-powered.com/skills/ad-methodology): Ad methodology is an open-source agent skill for security.
- [Mobile security](https://ai-powered.com/skills/mobile-security): Mobile security is an open-source agent skill for security.
- [Pentest engagement](https://ai-powered.com/skills/pentest-engagement): Pentest engagement is an open-source agent skill for security.
- [Network appliance offensive](https://ai-powered.com/skills/network-appliance-offensive): Network appliance offensive is an open-source agent skill for security.
- [Essential tools](https://ai-powered.com/skills/essential-tools): Essential tools is an open-source agent skill for security.

---
Source: https://ai-powered.com/skills/authenticated-session-acquisition
