Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
xpath — xpath is a fast, multi-technique XPath injection scanner written in Nim. It focuses on practical detection, response comparison, visible extraction, blind extraction. | Kitploit
Tools/GitHubGitHub/blue0x1/xpath
Vulnerability ScannersWeb Application ExploitationInformation GatheringWAF BypassWeb SecurityPenetration Testing
GitHubblue0x1/xpath

xpath

xpath is a fast, multi-technique XPath injection scanner written in Nim. It focuses on practical detection, response comparison, visible extraction, blind extraction.

View Repository
21 month agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

xpath

xpath

Advanced XPath injection scanner for authorized security testing.

version language license platform

Coded by Chokri Hammedi (blue0x1) · MIT Licensed


Overview

xpath is a fast, multi-technique XPath injection scanner written in Nim. It focuses on practical detection, response comparison, visible extraction, blind extraction, and payload coverage for real-world XML-backed applications.

It has no external runtime dependencies beyond the Nim standard library.

Capabilities

Installation

Nimble

root@kitploit:~
nimble install xpath

This installs the latest package from the official Nim package list.

Build From Source

root@kitploit:~
git clone https://github.com/blue0x1/xpath.git
cd xpath
make linux
make test

The Linux binary is written to:

root@kitploit:~
dist/xpath-linux-amd64

Install System-Wide

root@kitploit:~
sudo make install

By default this installs:

root@kitploit:~
/usr/local/bin/xpath

To change the install prefix:

root@kitploit:~
sudo make install PREFIX=/usr

Debian Package

root@kitploit:~
make deb
sudo dpkg -i dist/xpath_1.0.0_amd64.deb

Windows Cross Build

root@kitploit:~
make windows

The Windows binary is written to:

root@kitploit:~
dist/xpath-windows-amd64.exe

On Linux, the Windows build requires MinGW:

root@kitploit:~
sudo apt install mingw-w64

Quick Start

Scan a GET parameter:

root@kitploit:~
xpath -u "http://target.local/search?q=test" -p q

Scan all detected query parameters:

root@kitploit:~
xpath -u "http://target.local/search?q=test&id=1"

Scan a POST body:

root@kitploit:~
xpath -u "http://target.local/login" -m POST -d "user=*&pass=test"

Run all techniques and extract visible or blind data when possible:

root@kitploit:~
xpath -u "http://target.local/search?q=test" -p q -t A -x

Use a proxy:

root@kitploit:~
xpath -u "http://target.local/search?q=test" -p q --proxy http://127.0.0.1:8080

Save JSON output:

root@kitploit:~
xpath -u "http://target.local/search?q=test" -p q -t A -o report.json -f json

Usage

root@kitploit:~
USAGE
  xpath [OPTIONS] -u <URL>

TARGET
  -u, --url <URL>           Target URL
  -m, --method <METHOD>     HTTP method: GET or POST
  -d, --data <DATA>         POST body, use * to mark injection point
  -p, --param <PARAM>       Parameter(s) to test, comma-separated
  -c, --cookie <COOKIE>     Cookie string
  -H, --header <HEADER>     Extra header, repeatable

DETECTION
  -t, --technique <FLAGS>   E, B, T, U, P, or A
  -l, --level <1-5>         Payload thoroughness level
  -x, --extract             Extract data after confirming injection
      --xpath <EXPR>        XPath expression for extraction

OUTPUT
  -o, --output <FILE>       Save report
  -f, --format <FMT>        text or json
  -v, --verbose             Verbose output

Techniques

Error-Based

Sends malformed XPath payloads and detects framework-specific error signatures from Java, .NET, PHP, libxml2, Saxon, Xalan, and W3C XQuery error codes.

root@kitploit:~
xpath -u "http://target.local/item?id=1" -p id -t E

Boolean-Based Blind

Compares paired TRUE/FALSE payload responses using body similarity and size deltas. This is useful when results are not directly printed but application behavior changes.

root@kitploit:~
xpath -u "http://target.local/search?q=test" -p q -t B

Time-Based Blind

Uses computationally expensive XPath expressions to create measurable response-time differences when content-based signals are unavailable.

root@kitploit:~
xpath -u "http://target.local/search?q=test" -p q -t T --time-sec 3

Union / Node Selection

Tests whether a selector-like parameter can be unioned with absolute or relative XPath paths, such as //text(), ../../..//text(), //@*, and indexed paths.

root@kitploit:~
xpath -u "http://target.local/search?q=INVALID&field=name" -p field -t U -x

Authentication Bypass

Checks predicate-breaking payloads, position-based payloads, role substring payloads, boolean functions, and context-aware bypass forms.

root@kitploit:~
xpath -u "http://target.local/login" -m POST -d "username=*&password=test" -t P

Extraction

When -x is enabled, xpath chooses the best available extraction mode:

ModeDescription
Visible auth response

Example:

root@kitploit:~
xpath -u "http://target.local/query?q=test" -p q -t A -x

Custom expression:

root@kitploit:~
xpath -u "http://target.local/query?q=test" -p q -x --xpath "name(/*[1])"

Payload Levels

Build Targets

Project Layout

root@kitploit:~
src/
  xpath.nim
  core/
    analyzer.nim
    crawler.nim
    extractor.nim
    http.nim
    payloads.nim
    reporter.nim
    scanner.nim
  utils/
    cli.nim
    config.nim
    logger.nim

Buy Me A Coffee

License

MIT License. See LICENSE.

Legal Notice

This tool is for authorized security testing only. Use it only on systems you own or have explicit written permission to test.

Download Tool
AreaSupport
DetectionError-based, boolean-based blind, time-based blind, auth bypass, union/node-selection
ExtractionVisible HTML parsing, selector union extraction, blind XPath data extraction
PayloadsClassic, predicate, function-based, path breakout, encoded, entity, mixed-case variants
DiscoveryURL parameter detection and HTML form crawling
EvasionWAF/IDS indicators, URL-encoded and entity-based bypass payloads
OutputHuman-readable terminal report and JSON report export
TransportCookies, headers, proxy, retry, timeout, User-Agent, redirect controls
Parses new rows, links, redirects, and rendered values from successful bypass responses
Visible union pathsExtracts newly rendered text from union/node-selection payloads
Blind extractionUses string-length(), substring(), name(), and count() to infer XML data
LevelFocus
1Fast classic payloads
2Common real-world predicate breaks
3Default balanced scan
4Encoded, entity, and path-breakout payloads
5Maximum coverage and exotic variants
TargetOutput
make linuxdist/xpath-linux-amd64
make windowsdist/xpath-windows-amd64.exe
make testRuns the Nim test suite
make installInstalls to $(PREFIX)/bin/xpath
make debdist/xpath_1.0.0_amd64.deb
make cleanRemoves build/ and dist/