cookie-attacks

Audit web application session cookies for missing security attributes and invalidation flaws.

6|1|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/securityfortech/hacking-skills --skill cookie-attacks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cookie-attacks
Source: https://github.com/securityfortech/hacking-skills/tree/main/skills/web/session/cookie-attacks
Command: npx skills add https://github.com/securityfortech/hacking-skills --skill cookie-attacks

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses critical vulnerabilities in how web applications handle session cookies, preventing session hijacking, unauthorized access after logout, and other session-related attacks.

Core Features & Use Cases

  • Cookie Attribute Auditing: Checks for missing Secure, HttpOnly, and SameSite flags.
  • Scope and Persistence Testing: Verifies Domain/Path scope and tests for overly persistent cookies.
  • Logout Invalidation: Ensures server-side session invalidation upon logout.
  • SSO Bypass Detection: Identifies weaknesses in Single Sign-On logout flows.
  • Use Case: A pentester uses this skill to audit an e-commerce site's session cookies, discovering that the session token lacks the HttpOnly flag, making it vulnerable to XSS attacks.

Quick Start

Audit the session cookies for the target website by checking for missing Secure, HttpOnly, and SameSite attributes.

Frequently Asked Questions about cookie-attacks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test session cookies for missing Secure, HttpOnly, and SameSite attributes?

Test session cookies by auditing web application responses for missing Secure, HttpOnly, and SameSite attributes using tools like Burp Suite, OWASP ZAP, and browser extensions to prevent session hijacking and XSS attacks.

What is an SSO single-logout bypass and how does it affect session management?

An SSO single-logout bypass occurs when Single Sign-On logout flows fail to invalidate server-side sessions across applications. Detecting this session management weakness ensures tokens are properly invalidated upon logout.

How do I audit cookie Domain and Path scope to prevent overly broad access?

Audit cookie Domain and Path scope by inspecting Set-Cookie headers to verify boundaries are not overly broad. Restricting scope prevents session tokens from being exposed to unintended subdirectories or subdomains.

Can I use Burp Suite and OWASP ZAP to check for browser cache leakage and session token predictability?

Yes, Burp Suite and OWASP ZAP can check for browser cache leakage and session token predictability by intercepting requests and analyzing responses to identify non-expiring persistent cookies and predictable session identifiers.

Why do I need __Host- and __Secure- prefixes for web application security?

You need __Host- and __Secure- prefixes for web application security to enforce strict cookie attributes. These prefixes ensure secure channels and specific Domain scopes, preventing session token subdomain bypass.

What is the best way to verify server-side session invalidation upon logout?

The best way to verify server-side session invalidation upon logout is to capture the logout request and replay the session token. If access remains, the server fails to properly invalidate the session.