hunt-xxe
できること
このスキルは、XMLパーサーが外部エンティティを受け入れるかを調べます。外部エンティティが許されると、ファイルが読まれたり、サーバーが外部へリクエストを送ったりすることがあります。XMLアップロード、SOAPサービス、文書のインポート機能を、許可を得てテストするためのものです。
使う場面
- ✓XML、SOAP、SAMLのメッセージを受け付けるエンドポイントがあるとき。
- ✓DOCX、SVG、XLSXなどのファイルアップロードが、サーバーで解析されているとき。
- ✓サーバーがXMLを読んでいる間に、外部のアドレスを取得するかもしれないとき。
スキルのリンク
https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-xxe/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“当社の文書インポートはDOCXファイルを受け付けます。許可を得たテストで、XMLパーサーが外部エンティティを安全でない形で扱っていないか確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、テスト用のリソースを読み込むようパーサーに求めるXMLを送り、応答またはコールバックを確認します。結果を確かめてから報告します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
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:
Nokogiriolder 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
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-Typetoapplication/xmlwith equivalent XML body.Identify file upload features — Upload SVG, DOCX, XLSX, and observe if the server processes/renders content. These are often XML under the hood.
Attempt inline XXE (classic file read) — Replace the XML body with a basic entity test payload targeting
/etc/passwdorC:\Windows\win.ini. Observe if the value is reflected in the response.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.
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.
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.Test all subdomains sharing the same backend — If one subdomain is vulnerable, enumerate and test all others systematically. Shared backend infrastructure means shared vulnerability.
Test parameter-level injection — Some endpoints parse only specific XML nodes. Inject entities into every element value, attribute value, and even element names.
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.
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
よくある質問
XXEで何ができますか?
スキルによると、ローカルファイルの読み取り、内部へのリクエスト、場合によってはコードの実行が可能になることがあります。
応答が見えないケースはどう確認されますか?
テスト担当者が管理するサーバーへのアウトオブバンドのコールバックで確認します。
どのファイル形式が対象ですか?
スキルは、SVG、DOCX、PPTXなど、XMLを含むオフィス系のファイルを対象にしています。
詳細
作者による元の説明
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.
人気
- GitHubのスター
- 5.4k
- ランキング
- #14941
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
apk-redteam-pipeline
5.4kエージェントが、Android アプリのセキュリティの弱点を、APK ファイルの発見と逆コンパイルから、埋め込まれた機密情報の確認まで、認可されたテストとして確認できるよう支援します。
bugcrowd-reporting
5.4kエージェントが、適切なカテゴリーを選び、対象外の異議に答えることで、より良い Bugcrowd の脆弱性報告書を書けるよう支援します。
cloud-iam-deep
5.4kエージェントが、認可されたセキュリティテストの間に、見つかったクラウドの認証情報が AWS、Azure、Google Cloud で何にアクセスできるかを確認できるよう支援します。
enterprise-vpn-attack
5.4kエージェントが、認可されたテスト中に、Cisco、Fortinet、Citrix などの VPN とリモートアクセスの機器に、既知の弱点がないか確認できるよう支援します。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。