Chuyển đến nội dung
Skillpedia
Bảo mật5.4k · #14941

hunt-xxe

Skill này làm gì

Skill này kiểm tra xem các bộ phân tích XML có chấp nhận thực thể ngoài hay không, điều có thể làm lộ file hoặc khiến máy chủ gửi yêu cầu. Nó dành cho kiểm thử được ủy quyền các tải lên XML, dịch vụ SOAP và tính năng nhập tài liệu.

Khi nào nên dùng

  • ✓Khi một endpoint chấp nhận thông điệp XML, SOAP hoặc SAML.
  • ✓Khi một file tải lên như DOCX, SVG hoặc XLSX được phân tích trên máy chủ.
  • ✓Khi máy chủ có thể lấy một địa chỉ ngoài khi đọc XML.

Liên kết skill

https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-xxe/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-xxe/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tính năng nhập tài liệu của chúng tôi chấp nhận file DOCX. Bạn có thể kiểm tra xem bộ phân tích XML có xử lý thực thể ngoài không an toàn trong kiểm thử được ủy quyền không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent gửi XML yêu cầu bộ phân tích tải một tài nguyên kiểm thử, rồi kiểm tra phản hồi hoặc callback. Nó xác nhận kết quả trước khi báo cáo.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Crown Jewel Targets

XXE is a critical-severity vulnerability that consistently pays at the top of bug bounty scales ($5,000–$30,000+) due to its direct path to sensitive data exfiltration and SSRF. Highest-value targets:

  • Large enterprise platforms with XML-heavy backend integrations (finance, logistics, ride-sharing APIs)
  • Domains with file-read capability — /etc/passwd, /etc/shadow, internal config files, AWS metadata endpoints
  • Subdomains sharing backend infrastructure — one XXE endpoint can pivot to internal services across dozens of domains (as demonstrated by 26+ Uber domains via a single entry point)
  • API gateways accepting XML content types — especially REST APIs that silently accept Content-Type: application/xml
  • File upload features — SVG, DOCX, XLSX, PDF, PPTX parsers on the server side
  • SAML/SSO endpoints — SAML assertions are XML-based and frequently vulnerable
  • Office/document processing services — any feature that converts or processes user-supplied documents

Attack Surface Signals

URL Patterns

/api/v*/xml
/upload
/import
/parse
/convert
/saml/acs
/sso/saml
/feed
/rss
/sitemap
/webdav
/soap/*
/wsdl
/service.asmx
/xmlrpc
/graphql (multipart with XML)

Request/Response Headers

Content-Type: application/xml
Content-Type: text/xml
Content-Type: application/soap+xml
Content-Type: multipart/form-data  ← check file upload fields
Accept: application/xml
X-Content-Type-Options: (absent — good sign of loose parsing)

JavaScript Patterns (source recon)

// Look for in JS bundles
XMLSerializer
DOMParser
parseFromString
new ActiveXObject("Microsoft.XMLDOM")
$.parseXML(
xml2js
libxmljs
lxml

Tech Stack Signals

  • Java stacks: Spring, Struts, JAX-WS — default XML parsers (SAX, DOM) are XXE-vulnerable without explicit hardening
  • PHP: simplexml_load_string(), DOMDocument::loadXML() — vulnerable by default pre-PHP 8
  • Python: lxml, xml.etree (safe by default), xml.sax (unsafe)
  • Ruby: Nokogiri older versions, REXML
  • Node.js: xml2js, libxmljs, fast-xml-parser (older versions)
  • WSDL/SOAP services: Always test — legacy XML parsing virtually guaranteed
  • File parsers: Apache POI (Java), python-docx, LibreOffice integrations

Step-by-Step Hunting Methodology

  1. Map every XML entry point — Use Burp Suite passive scanner to flag all requests/responses with XML content types. Also intercept JSON endpoints and manually swap Content-Type to application/xml with equivalent XML body.

  2. Identify file upload features — Upload SVG, DOCX, XLSX, and observe if the server processes/renders content. These are often XML under the hood.

  3. Attempt inline XXE (classic file read) — Replace the XML body with a basic entity test payload targeting /etc/passwd or C:\Windows\win.ini. Observe if the value is reflected in the response.

  4. If no reflection, pivot to Blind OOB — Set up an OOB listener (Burp Collaborator, interactsh, or a self-hosted netcat server). Inject an external entity pointing to your callback URL. Confirm DNS/HTTP hit to validate the parser is making outbound connections.

  5. Escalate Blind OOB to file exfiltration — Use a two-stage payload: first entity loads local file, second entity sends it OOB via HTTP parameter or DNS exfiltration.

  6. Test SSRF pivot — Point the external entity at internal network addresses (http://169.254.169.254/latest/meta-data/, http://10.0.0.1/, http://localhost:8080/admin). Look for differences in response timing or error messages.

  7. Test all subdomains sharing the same backend — If one subdomain is vulnerable, enumerate and test all others systematically. Shared backend infrastructure means shared vulnerability.

  8. Test parameter-level injection — Some endpoints parse only specific XML nodes. Inject entities into every element value, attribute value, and even element names.

  9. Test for error-based exfiltration — If OOB is blocked, trigger XML parsing errors that include file content in the error message returned to the client.

  10. Document the full impact chain — Demonstrate: file read → SSRF → internal service access → note which internal domains/IPs are reachable.


Payload & Detection Patterns

Error-based exfil via local-DTD repurposing (zero network egress)

When both file:// outbound AND external-DTD fetch are blocked, reference a DTD already on disk and re

Câu hỏi thường gặp

XXE cho phép làm gì?

Theo skill, nó có thể cho phép đọc file cục bộ, gửi yêu cầu nội bộ và trong một số trường hợp là chạy mã.

Trường hợp mù được xác nhận thế nào?

Skill dùng callback ngoài băng tần tới một máy chủ do người kiểm thử kiểm soát.

Những loại file nào được bao quát?

Skill bao quát SVG, DOCX, PPTX và các file văn phòng tương tự có chứa XML.

Chi tiết

Mô tả gốc của tác giả

Hunting skill for xxe vulnerabilities. Built from 10 public bug bounty reports including SVG-upload XXE, Office-doc (PPTX/DOCX) XXE, SOAP XXE, SAML AssertionConsumer XXE, blind OOB XXE via DTD callback, parameter-entity XXE, XXE-to-LFI, XXE-to-SSRF, and XXE-to-RCE chains (Adobe Commerce CosmicSting CVE-2024-34102). Use when hunting XXE on any target — emphasis on OOB-Or-It-Didn't-Happen Gate for blind cases.

repo: elementalsouls/Claude-BugHunter

Độ phổ biến

Sao GitHub
5.4k
Vị trí xếp hạng
#14941
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự