session-attacks
Skill5 starsChanged 5 months agoApache-2.0View on GitHub
Session management attack methodology. Covers session fixation, CSRF, cookie theft, session prediction, concurrent session abuse, and logout bypass.
In this repository33 other files it gives its agents.
- dcsyncSkill
- kerberoastingSkill
- pass-the-hashSkill
- jailbreakingSkill
- model-extractionSkill
- prompt-injectionSkill
- system-prompt-extractionSkill
- jwtSkill
- oauthSkill
- container-escapeSkill
- iam-privescSkill
- s3-enumSkill
- edr-evasionSkill
- initial-accessSkill
- embedding-attacksSkill
- rag-poisoningSkill
- mcp-context-injectionSkill
- mcp-rug-pullSkill
- mcp-tool-poisoningSkill
- osintSkill
- subdomain-enumSkill
- model-tamperingSkill
- cvss4-scoringSkill
- report-writingSkill
- graphqlSkill
- idorSkill
- rceSkill
- sqliSkill
- ssrfSkill
- sstiSkill
- waf-bypassSkill
- xssSkill
- xxeSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Test: Check if the session token changes after successful login.
- Distinctive: line 32
No CSRF token: attack directly
- Distinctive: line 66
If token A still works: no concurrent session control
- Distinctive: line 74
If request succeeds: session not invalidated on logout
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Session Management Attacks
Session Fixation
1. Attacker obtains a pre-auth session token
2. Attacker sends victim a link with the fixed session: https://target.com/login?PHPSESSID=attacker_session
3. Victim logs in — server assigns that session to the authenticated user
4. Attacker uses the same session token to access victim's accountTest: Check if the session token changes after successful login. No change = likely fixation vulnerability.
CSRF (Cross-Site Request Forgery)
<!-- Auto-submitting CSRF form hosted on attacker.com -->
<form id="csrf" action="https://target.com/api/change-email" method="POST">
<input name="email" value="attacker@attacker.com">
</form>
<script>document.getElementById('csrf').submit();</script>CSRF bypass techniques:
- No CSRF token: attack directly
- CSRF token not tied to session: reuse your own valid token
- Referrer check bypass: send from target.com subdomain (open redirect) or remove Referer header
- Token in URL: change to POST and test if GET token accepted
- SameSite=Lax: CSRF via top-level GET navigation with side effects
Cookie Security Analysis
Secure flag: Missing → token sent over HTTP → interception risk
HttpOnly flag: Missing → token accessible via XSS → document.cookie
SameSite: None → CSRF from cross-origin → test CSRF attacks
Domain: .target.com → token sent to all subdomains → subdomain takeover → session theft
Expiry: No expiry → session persists indefinitely after logoutSession Prediction
# Test for weak session tokens
import requests, hashlib, time
for i in range(100):
r = requests.get("https://target.com/login")
token = r.cookies.get('SESSID')
# Check if token is time-based, sequential, or MD5/SHA1 of predictable input
print(hashlib.md5(str(time.time()).encode()).hexdigest())Concurrent Session Abuse
- Log in as user A — note session token A
- Log in again as user A — note session token B
- Try to use token A after token B is issued
- If token A still works: no concurrent session control
- Impact: attacker can maintain persistent access even after victim logs out
Forced Logout Testing
- Log in; note session token
- Log out
- Replay the session token in a subsequent request
- If request succeeds: session not invalidated on logout
Tools
- Burp Suite — session analysis, CSRF POC generator
- CSRF-Tester
- Browser dev tools — inspect cookie attributes
OWASP Mapping
- A07:2021 — Identification and Authentication Failures
- A01:2021 — Broken Access Control (CSRF)
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.

