Thanks to visit codestin.com
Credit goes to GitHub.com

Skip to content

A comprehensive guide to XML External Entity injection vulnerabilities. Learn how attackers exploit XXE, and how to defend your applications with secure XML parsing configurations.

Notifications You must be signed in to change notification settings

Wh1t3Fox/xxe.page

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

XXE.page

Comprehensive educational resource for XML External Entity (XXE) vulnerabilities

A production-ready, static site providing in-depth guides, code examples, and an interactive payload generator for understanding, testing, and preventing XXE injection attacks.

🌐 Live Site: xxe.page (if deployed)

πŸ“š Overview

XXE.page is a comprehensive educational platform covering all aspects of XML External Entity vulnerabilities, from fundamental concepts to advanced exploitation techniques and prevention strategies across multiple programming languages and frameworks.

Key Features

  • 27 Comprehensive Guides organized into 7 categories
  • Interactive Payload Generator with 6 payload types
  • Language-Specific Prevention for Java, .NET, PHP, Python, Node.js, Ruby, and Go
  • Real-World Code Examples (vulnerable and secure implementations)
  • Testing Methodology with tools and techniques
  • Dark Mode Support with responsive design
  • Syntax Highlighting for all code examples
  • Static Site Generation for fast, secure deployment

πŸ“– Content Coverage

Fundamentals (2 guides)

  • XML & DTD Basics
  • Entity Processing

Vulnerabilities (4 guides)

  • Classic XXE
  • Blind XXE
  • Parameter Entities
  • File Upload XXE

Attack Vectors (4 guides)

  • File Disclosure
  • Server-Side Request Forgery (SSRF)
  • Denial of Service (Billion Laughs)
  • RCE Escalation

Application Contexts (5 guides)

  • SOAP Services
  • SAML Authentication
  • JSON-to-XML Converters
  • SVG Processors
  • Document Parsers (DOCX, XLSX, etc.)

Prevention by Language (7 guides)

  • Java (JAX-WS, JAXB, DOM, SAX)
  • .NET (XmlReader, XDocument, WCF)
  • PHP (libxml, SimpleXML, DOMDocument)
  • Python (lxml, xml.etree, defusedxml)
  • Node.js (libxmljs, fast-xml-parser)
  • Ruby (Nokogiri, REXML, Ox)
  • Go (encoding/xml, etree)

Testing & Remediation (5 guides)

  • Testing Methodology
  • Payload Design
  • Testing Tools
  • Secure Patterns
  • Defense-in-Depth Strategy

πŸš€ Quick Start

Prerequisites

  • Node.js 20.9.0 or later
  • npm 10.1.0 or later

Installation

# Clone the repository
git clone https://github.com/Wh1t3Fox/xxe.page.git
cd xxe.page

# Install dependencies
npm install

# Start development server
npm run dev

Visit http://localhost:3000 to view the site.

Build for Production

# Build static site
npm run build

# Serve production build
npm start

The static site will be generated in the out/ directory.

πŸ—οΈ Project Structure

xxe.page/
β”œβ”€β”€ components/           # React components
β”‚   β”œβ”€β”€ CodeBlock.js     # Syntax-highlighted code display
β”‚   β”œβ”€β”€ CodeComparison.js # Side-by-side vulnerable/secure code
β”‚   β”œβ”€β”€ Layout.js        # Page layout wrapper
β”‚   β”œβ”€β”€ Navigation.js    # Top navigation bar
β”‚   β”œβ”€β”€ Sidebar.js       # Collapsible guide navigation
β”‚   β”œβ”€β”€ SeverityBadge.js # CVSS severity indicators
β”‚   └── TabbedCode.js    # Multi-language code tabs
β”‚
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ guides/          # 27 comprehensive guide JSON files
β”‚   β”‚   β”œβ”€β”€ xml-basics.json
β”‚   β”‚   β”œβ”€β”€ classic-xxe.json
β”‚   β”‚   β”œβ”€β”€ java-prevention.json
β”‚   β”‚   └── ...
β”‚   └── navigation.json  # Site navigation structure
β”‚
β”œβ”€β”€ lib/
β”‚   └── guideLoader.js   # Guide data loading utilities
β”‚
β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ _app.js          # Next.js app wrapper
β”‚   β”œβ”€β”€ index.js         # Home page
β”‚   β”œβ”€β”€ about.js         # About page
β”‚   β”œβ”€β”€ payloads.js      # Interactive payload generator
β”‚   β”œβ”€β”€ references.js    # External references
β”‚   └── guide/
β”‚       └── [...slug].js # Dynamic guide pages (SSG)
β”‚
β”œβ”€β”€ styles/
β”‚   └── globals.css      # Global styles with Tailwind
β”‚
β”œβ”€β”€ public/              # Static assets
β”œβ”€β”€ out/                 # Production build output
β”œβ”€β”€ tailwind.config.js   # Tailwind CSS configuration
└── next.config.js       # Next.js configuration

🎨 Features

Interactive Payload Generator

The payload generator (/payloads) allows security professionals to create custom XXE test payloads:

  • Payload Types:

    • File Disclosure (classic XXE)
    • Blind XXE (out-of-band exfiltration)
    • SSRF (Server-Side Request Forgery)
    • Parameter Entity (advanced blind XXE)
    • Error-Based XXE
    • Billion Laughs (DoS)
  • Customization:

    • Platform selection (Linux/Windows)
    • Target file selection with presets
    • Callback URL configuration
    • Protocol selection (file://, php://, expect://)
    • Custom entity names
    • Encoding options
  • Export Options:

    • Copy to clipboard
    • Download as XML file
    • Live preview with syntax highlighting

Code Examples

Every guide includes:

  • Vulnerable code demonstrating the security issue
  • Secure code showing proper mitigation
  • Attack payloads for testing
  • Prevention checklists
  • Language-specific configurations

Responsive Design

  • Mobile-friendly layouts
  • Collapsible navigation on small screens
  • Dark mode support
  • Optimized typography for readability
  • Touch-friendly interactive elements

πŸ› οΈ Development

Tech Stack

  • Framework: Next.js 16 (React 19)
  • Styling: Tailwind CSS 3.4
  • Syntax Highlighting: react-syntax-highlighter
  • Markdown: react-markdown with remark-gfm
  • Build: Static Site Generation (SSG)

Development Commands

# Start development server with hot reload
npm run dev

# Build for production
npm run build

# Serve production build locally
npm start

# Lint code (if configured)
npm run lint

Adding New Guides

  1. Create a new JSON file in data/guides/:
{
  "id": "guide-slug",
  "category": "vulnerabilities",
  "title": "Guide Title",
  "description": "Brief description",
  "severity": "critical",
  "cvssScore": 9.0,
  "sections": [
    {
      "id": "section-id",
      "title": "Section Title",
      "type": "text",
      "content": "Markdown content here..."
    },
    {
      "id": "code-example",
      "title": "Code Example",
      "type": "code",
      "code": {
        "language": "java",
        "code": "// Code here",
        "isVulnerable": true,
        "filename": "Example.java"
      }
    }
  ],
  "relatedTopics": ["other-guide-slug"],
  "references": [
    {
      "title": "Reference Title",
      "url": "https://example.com"
    }
  ]
}
  1. Add the guide to data/navigation.json

  2. Rebuild the site: npm run build

πŸ“¦ Deployment

Static Hosting

The site is built as a static export and can be deployed to any static hosting platform:

GitHub Pages:

npm run build
# Push the 'out' directory to gh-pages branch

Netlify:

# Build command: npm run build
# Publish directory: out

Vercel:

# Framework Preset: Next.js
# Output Directory: out

AWS S3 + CloudFront:

npm run build
aws s3 sync out/ s3://your-bucket-name

Environment Variables

No environment variables are required for basic deployment. The site is fully static.

πŸ§ͺ Testing

All guides include practical, testable examples:

  1. Code Examples: Both vulnerable and secure implementations
  2. Test Payloads: Ready-to-use XXE payloads for authorized testing
  3. Validation Steps: How to verify vulnerabilities and fixes
  4. Prevention Checklists: Actionable security measures

⚠️ Security Notice: All payloads and techniques are for authorized security testing only. Unauthorized testing is illegal and unethical.

🀝 Contributing

Contributions are welcome! Here's how you can help:

  1. Report Issues: Found a bug or error? Open an issue
  2. Suggest Guides: Ideas for new content? Create a feature request
  3. Submit Pull Requests:
    • Fork the repository
    • Create a feature branch (git checkout -b feature/new-guide)
    • Commit your changes
    • Push to the branch
    • Open a Pull Request

Contribution Guidelines

  • Follow existing guide structure and formatting
  • Include both vulnerable and secure code examples
  • Provide references to authoritative sources (OWASP, CWE, vendor docs)
  • Test all code examples before submission
  • Ensure markdown renders correctly
  • Update navigation.json when adding guides

πŸ“„ License

This project is open source and available for educational purposes. All content is provided for security education and authorized testing only.

πŸ™ Acknowledgments

  • OWASP for XXE prevention guidelines and cheat sheets
  • PortSwigger for XXE research and testing methodology
  • Security community for vulnerability disclosures and research
  • Next.js team for the excellent framework
  • Tailwind CSS for the utility-first CSS framework

πŸ“ž Contact

  • GitHub Issues: For bugs, questions, and feature requests
  • Security Reports: Responsible disclosure appreciated

⚠️ Disclaimer

This project is for educational purposes only. The tools, techniques, and payloads provided are intended for:

  • Authorized security testing with explicit permission
  • Security research in controlled environments
  • Educational training for security professionals
  • Defensive security implementation

Unauthorized use is illegal and unethical. Always obtain proper authorization before testing any system you do not own or have explicit permission to test.


Built with ❀️ for the security community

Last Updated: December 2024

About

A comprehensive guide to XML External Entity injection vulnerabilities. Learn how attackers exploit XXE, and how to defend your applications with secure XML parsing configurations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •