[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71H22Q42M05F7BC2B5719GS":3,"skill-same:01M71H22Q42M05F7BC2B5719GS":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":28,"publishedAt":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":14,"repositoryHtmlUrl":42,"repositoryHomepageUrl":6,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":44,"updatedAt":45,"install":46,"resources":59},"01M71H22Q42M05F7BC2B5719GS","webapp-api-websocket-wssecurity",null,"Webapp Api Websocket Wssecurity.","DCx7C5\u002Fai-marketplace","DCx7C5","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42419559?v=4","01M71C01G2AZV3NTNGWAWSHJPP","DC","01M71C01GQW6G50S2BYMS7PP3E",0,"MIT","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-api-websocket-wssecurity\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[29,30,31,32,33],"webapp api websocket wssecurity","webapp","websocket","api","cybersecurity","2026-11-10 10:12:30",false,"---\nname: webapp-api-websocket-wssecurity\ndescription: \"Webapp Api Websocket Wssecurity.\"\ndomain: cybersecurity\n---\n\n|\n| **WebSocket** | Full-duplex communication protocol over a single TCP connection, established via HTTP upgrade handshake |\n| **CSWSH** | Cross-Site WebSocket Hijacking - an attack where a malicious website initiates a WebSocket connection to a legitimate server using the victim's browser credentials |\n| **Origin Validation** | Server-side check of the Origin header during WebSocket handshake to prevent CSWSH by rejecting connections from unauthorized domains |\n| **WebSocket Frame** | The basic unit of data in WebSocket communication, containing opcode, masking, payload length, and payload data |\n| **Upgrade Handshake** | HTTP request with `Upgrade: websocket` and `Connection: Upgrade` headers that establishes the WebSocket connection |\n| **Message Flooding** | Sending a large volume of WebSocket messages to exhaust server resources (memory, CPU, bandwidth) |\n\n## Tools & Systems\n\n- **Burp Suite Professional**: Intercepts WebSocket handshakes and messages, allows message modification and replay\n- **OWASP ZAP**: WebSocket testing with message fuzzing, interception, and breakpoint capabilities\n- **wscat**: Command-line WebSocket client for manual testing: `wscat -c wss:\u002F\u002Ftarget.com\u002Fws -H \"Authorization: Bearer token\"`\n- **websocat**: Advanced CLI WebSocket tool with proxy, broadcast, and scripting capabilities\n- **Autobahn TestSuite**: Comprehensive WebSocket protocol compliance and security testing framework\n\n## Common Scenarios\n\n### Scenario: Chat Application WebSocket Security Assessment\n\n**Context**: A messaging application uses WebSocket for real-time chat. The WebSocket endpoint handles message delivery, typing indicators, read receipts, and user presence. Authentication is cookie-based.\n\n**Approach**:\n1. Analyze the WebSocket handshake: connection established at `wss:\u002F\u002Fchat.example.com\u002Fws` with session cookie authentication\n2. Test CSWSH: WebSocket server does not validate the Origin header - an attacker's page can connect and receive the victim's messages\n3. Test authentication: WebSocket accepts connections with expired session cookies (session validation only at handshake, not for subsequent messages)\n4. Test authorization: User A can send messages to private channels they are not a member of by crafting the channel ID\n5. Test injection: Message content is stored without sanitization; XSS payload in message body executes in other users' browsers\n6. Test message flooding: Server accepts 5000 messages per second without rate limiting, causing CPU spike\n7. Find that WebSocket messages include the sender's internal user ID, email, and IP address (information leakage)\n\n**Pitfalls**:\n- Not testing CSWSH because the application uses token-based authentication (cookies are automatically sent with WebSocket)\n- Only testing the initial handshake authentication without verifying ongoing message authorization\n- Missing injection vulnerabilities because payloads are in JSON WebSocket frames instead of HTTP parameters\n- Not testing reconnection behavior (does the server re-validate authentication on reconnect?)\n- Ignoring that WebSocket connections may bypass HTTP-level rate limiting and WAF rules\n\n## Output Format\n\n```\n## Finding: Cross-Site WebSocket Hijacking Enables Real-Time Data Theft\n\n**ID**: API-WS-001\n**Severity**: High (CVSS 8.1)\n**Affected Endpoint**: wss:\u002F\u002Fchat.example.com\u002Fws\n\n**Description**:\nThe WebSocket server does not validate the Origin header during the\nhandshake. An attacker can host a malicious web page that opens a\nWebSocket connection to the chat server using the victim's session\ncookie. All messages, typing indicators, and presence data are\nforwarded to the attacker in real time.\n\n**Proof of Concept**:\nHost the CSWSH PoC page on attacker.com. When a logged-in user\nvisits the page, the JavaScript establishes a WebSocket connection\nto the chat server. The server authenticates the connection using\nthe victim's cookie and delivers all real-time chat data to the\nattacker's connection.\n\n**Impact**:\nReal-time interception of all private messages, presence data,\nand typing indicators for any user who visits the attacker's page.\n\n**Remediation**:\n1. Validate the Origin header against an allowlist of legitimate domains\n2. Implement CSRF tokens in the WebSocket handshake URL\n3. Use token-based authentication (Authorization header) instead of cookies for WebSocket\n4. Implement per-message authorization checks, not just connection-level authentication\n5. Add rate limiting on WebSocket message volume per connection\n```\n","|\n| **WebSocket** | Full-duplex communication protocol over a single TCP connection, established via HTTP upgrade handshake |\n| **CSWSH** | Cross-Site WebSocket Hijacking - an attack where a malicious website initiates a WebSocket connection to a legitimate server using the victim's browser credentials |\n| **Origin Validation** | Server-side check of the Origin header during WebSocket handshake to prevent CSWSH by rejecting connections from unauthorized domains |\n| **WebSocket Frame** | The basic unit of data in WebSocket communication, containing opcode, masking, payload length, and payload data |\n| **Upgrade Handshake** | HTTP request with `Upgrade: websocket` and `Connection: Upgrade` headers that establishes the WebSocket connection |\n| **Message Flooding** | Sending a large volume of WebSocket messages to exhaust server resources (memory, CPU, bandwidth) |\n\n## Tools & Systems\n\n- **Burp Suite Professional**: Intercepts WebSocket handshakes and messages, allows message modification and replay\n- **OWASP ZAP**: WebSocket testing with message fuzzing, interception, and breakpoint capabilities\n- **wscat**: Command-line WebSocket client for manual testing: `wscat -c wss:\u002F\u002Ftarget.com\u002Fws -H \"Authorization: Bearer token\"`\n- **websocat**: Advanced CLI WebSocket tool with proxy, broadcast, and scripting capabilities\n- **Autobahn TestSuite**: Comprehensive WebSocket protocol compliance and security testing framework\n\n## Common Scenarios\n\n### Scenario: Chat Application WebSocket Security Assessment\n\n**Context**: A messaging application uses WebSocket for real-time chat. The WebSocket endpoint handles message delivery, typing indicators, read receipts, and user presence. Authentication is cookie-based.\n\n**Approach**:\n1. Analyze the WebSocket handshake: connection established at `wss:\u002F\u002Fchat.example.com\u002Fws` with session cookie authentication\n2. Test CSWSH: WebSocket server does not validate the Origin header - an attacker's page can connect and receive the victim's messages\n3. Test authentication: WebSocket accepts connections with expired session cookies (session validation only at handshake, not for subsequent messages)\n4. Test authorization: User A can send messages to private channels they are not a member of by crafting the channel ID\n5. Test injection: Message content is stored without sanitization; XSS payload in message body executes in other users' browsers\n6. Test message flooding: Server accepts 5000 messages per second without rate limiting, causing CPU spike\n7. Find that WebSocket messages include the sender's internal user ID, email, and IP address (information leakage)\n\n**Pitfalls**:\n- Not testing CSWSH because the application uses token-based authentication (cookies are automatically sent with WebSocket)\n- Only testing the initial handshake authentication without verifying ongoing message authorization\n- Missing injection vulnerabilities because payloads are in JSON WebSocket frames instead of HTTP parameters\n- Not testing reconnection behavior (does the server re-validate authentication on reconnect?)\n- Ignoring that WebSocket connections may bypass HTTP-level rate limiting and WAF rules\n\n## Output Format\n\n```\n## Finding: Cross-Site WebSocket Hijacking Enables Real-Time Data Theft\n\n**ID**: API-WS-001\n**Severity**: High (CVSS 8.1)\n**Affected Endpoint**: wss:\u002F\u002Fchat.example.com\u002Fws\n\n**Description**:\nThe WebSocket server does not validate the Origin header during the\nhandshake. An attacker can host a malicious web page that opens a\nWebSocket connection to the chat server using the victim's session\ncookie. All messages, typing indicators, and presence data are\nforwarded to the attacker in real time.\n\n**Proof of Concept**:\nHost the CSWSH PoC page on attacker.com. When a logged-in user\nvisits the page, the JavaScript establishes a WebSocket connection\nto the chat server. The server authenticates the connection using\nthe victim's cookie and delivers all real-time chat data to the\nattacker's connection.\n\n**Impact**:\nReal-time interception of all private messages, presence data,\nand typing indicators for any user who visits the attacker's page.\n\n**Remediation**:\n1. Validate the Origin header against an allowlist of legitimate domains\n2. Implement CSRF tokens in the WebSocket handshake URL\n3. Use token-based authentication (Authorization header) instead of cookies for WebSocket\n4. Implement per-message authorization checks, not just connection-level authentication\n5. Add rate limiting on WebSocket message volume per connection\n```\n",{"name":5,"domain":33,"description":7},"main","a91f1293287ffa9f4f1b8f486cd6e835a1568c84","skills\u002Fwebapp-api-websocket-wssecurity","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace","https:\u002F\u002Fgithub.com\u002FDCx7C5","#Python","2026-09-01 11:21:00",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add DCx7C5\u002Fai-marketplace --skill webapp-api-websocket-wssecurity",{"tool":52,"command":53},"bunx","bunx skills add DCx7C5\u002Fai-marketplace --skill webapp-api-websocket-wssecurity",{"tool":55,"command":56},"pnpm","pnpm dlx skills add DCx7C5\u002Fai-marketplace --skill webapp-api-websocket-wssecurity","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-api-websocket-wssecurity\u002FSKILL.md",true,[60],{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"index.json","REFERENCE","参考文档",524,"https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-api-websocket-wssecurity\u002Findex.json",[67,92,115,137,159,174],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":34},"01M71HAPZ01KQ30RKTB0FFSQ05","services-wmi-persistence-detect","Detect WMI event subscription persistence by enumerating ActiveScriptEventConsumer, CommandLineEventConsumer, and permanent subscriptions in the WMI repository.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fservices\u002Fwmi\u002Fpersistence\u002Fdetect\u002FSKILL.md",[],[74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,33,91],"services","detect","services wmi persistence detect","wmi","persistence","de","cm","process","activescript","event","subscriptions","commandline-consumer","repository","subscription","event-subscription","t1546.003","forensics","process-forensics",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":34},"01M71HAK6JTTTS229T17WJMMCG","services-wmi-exec-exploit","Perform lateral movement across Windows networks using WMI-based remote execution techniques including Impacket wmiexec.py, CrackMapExec, and native WMI commands for stealthy post-exploitation during red team engagements.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fservices\u002Fwmi\u002Fexec\u002Fexploit\u002FSKILL.md",[],[99,74,100,77,101,102,103,33,104,105,106,107,108,109,79,110,111,112,113,114],"exploit","services wmi exec exploit","exec","remote","traffic","Bash","analysis","team","across","crackmapexec","native","command","lateral movement","read","lateral-movement","Impacket",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":34},"01M71HAG6MHKNQV8KDZKMT4886","registry-artifact-extract","Extract and analyze Windows Registry hives to uncover user activity, installed software, autostart entries, and evidence of system compromise.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fregistry\u002Fartifact\u002Fextract\u002FSKILL.md",[],[122,123,124,125,126,127,33,104,128,105,129,130,79,112,131,132,133,134,135,136],"artifact","registry","registry artifact extract","extract","evidence-collection","artifact-analysis","collection","analyze","uncover","software","activity","digital-forensics","windows-registry","regripper","sonnet",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":34},"01M71HACR4A8XTWTTSXK4124AA","processes-token-impersonate-detect","Detect Windows token impersonation and privilege abuse including SeImpersonatePrivilege exploitation via Potato attacks and token stealing techniques.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Ftoken\u002Fimpersonate\u002Fdetect\u002FSKILL.md",[],[75,144,145,146,147,148,149,80,150,33,91,151,152,153,154,155,156,157,158,79],"processes token impersonate detect","token","processes","attacks","windows","escalation","techniques","privilege-escalation","seimpersonate","token-impersonation","printspoofer","exploitation","potato","impersonation","via",{"skillNo":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":165,"publishedAt":34},"01M71HAABSB4Z6QFSXEG00R4RK","processes-thread-injection-detect","Detect Windows thread injection techniques including CreateRemoteThread, QueueUserAPC, NtCreateThreadEx, and thread hijacking via process memory analysis.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Fthread\u002Finjection\u002Fdetect\u002FSKILL.md",[],[166,167,75,168,146,148,169,80,170,150,33,91,105,32,171,172,173,158,79,81],"thread","processes thread injection detect","injection","memory","process-injection","apc-injection","thread-injection","nt-api",{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":178,"categories":179,"keywords":180,"publishedAt":34},"01M71HA7H311V5G14WMX58HQSS","processes-hollow-technique-detect","Detect process hollowing (RunPE) by identifying processes with mismatched image paths between PEB and VAD tree, or unmapped PE headers in memory.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Fhollow\u002Ftechnique\u002Fdetect\u002FSKILL.md",[],[181,75,146,182,169,80,183,184,33,91,185,186,187,188,189,190,79,81,191,192],"processes hollow technique detect","tree","memory-forensics","process-hollow","peb","runpe","image","pe-header","in memory","with","mismatched","headers"]