Hidden parameters discovery suite

Overview

x8

Hidden parameters discovery suite written in Rust.

How does it work

Firstly, it makes a few basic requests to learn the target, and then it tries to adjust the optimal amount of parameters in every request. Next requests contain parameters from the user-supplied list. If the response has unique differences - parameters from the request are split into two heaps and added to the queue for another cycle. Cycles repeat until there remains one parameter in every heap that causes a unique difference.

Features

  • A lot of things to customize: key template, value template, encodings, and even injection points.
  • Supports 6 main methods: GET, POST, PUT, PATCH, DELETE, HEAD.
  • Has built in 2 main body types: json, urlencode.
  • Able to discover parameters with not random value, like admin=true
  • Uses fast GNU diff as a response comparer.
  • Adds to every request cachebuster by default.

Examples

Send parameters via query

x8 -u "https://example.com/" -w <wordlist>

With some default parameters:

x8 -u "https://example.com/?something=1" -w <wordlist>

/?something=1 equals to /?something=1&%s

Send parameters via body

x8 -u "https://example.com/" -X POST --as-body -w <wordlist>

Or with a custom body:

x8 -u "https://example.com/" -X POST --as-body -b '{"x":{%s}}' -w <wordlist>

%s will be replaced with different parameters like {"x":{"a":"b3a1a", "b":"ce03a", ...}}

Custom template

x8 -u "https://example.com/" --param-template "user[%k]=%v&" -w <wordlist>

Now every request would look like /?user[a]=hg2s4&user[b]=a34fa&...

It is even possible to imitate not included body types, for example, application/xml:

x8 -u "https://example.com/" --as-body --param-template "<%k>%v</%k>" -H "Content-Type: application/xml" -b "<?xml version="1.0" ?>%s" -w <wordlist>

Variables

In the next example, something will take on new values every request:

x8 -u "https://example.com/?something={{random}}&%s" -w <wordlist>

Percent encoding

Sometimes parameters should be encoded. It is also possible:

x8 -u "https://example.com/?path=..%2faction.php%3f%s%23" --encode -w <wordlist>
GET /?path=..%2faction.php%3fWTDa8%3Da7UOS%26rTIDA%3DexMFp...%23 HTTP/1.1
Host: example.com

Test

Feel free to check whether the tool works as expected and compare it with other tools at https://4rt.one/. There are 2 reflected parameters, 4 parameters that change code/headers/body, and one extra parameter with a not random value.

Usage

USAGE:
    x8 [FLAGS] [OPTIONS]

FLAGS:
        --as-body                        Send parameters via body.
                                         Built in body types that can be detected automatically: json, urlencode
        --disable-cachebuster
        --disable-colors
        --disable-custom-parameters      Do not check automatically parameters like admin=true
        --disable-progress-bar
    -c, --disable-response-correction    Do not beautify responses before processing. Reduces accuracy.
        --encode                         Encodes query or body before a request, i.e & -> %26, = -> %3D
                                         List of chars to encode: ", `, , <, >, &, #, ;, /, =, %
    -L, --follow-redirects               Follow redirections
        --force                          Ignore 'binary data detected', 'the page is too huge', 'param_template lacks
                                         variables' error messages
    -h, --help                           Prints help information
        --insecure                       Use http instead of https when the request file is used
        --is-json                        If the output is valid json and the content type does not contain 'json'
                                         keyword - specify this argument for a more accurate search
        --replay-once                    If replay proxy is specified, send all found parameters within one request
        --test                           Prints request and response
    -V, --version                        Prints version information

OPTIONS:
    -b, --body <body>                                       Example: --body '{"x":{%s}}'
                                                            Available variables: {{random}}
    -t, --body-type <body type>
            Available: urlencode, json. (default is "urlencode")
            Can be detected automatically if --body is specified
    -l, --diff-location <custom-diff-location>              Default: takes from $PATH
        --custom-parameters <custom-parameters>
            Check these parameters with non-random values like true/false yes/no
            (default is "admin bot captcha debug disable encryption env show sso test waf")
        --custom-values <custom-values>
            Check custom parameters with these values (default is "1 0 false off null true yes no")

    -d, --delay <Delay between requests in milliseconds>
    -H, --header <headers>                                  Example: -H 'one:one' 'two:two'
        --learn-requests <learn_requests_count>             Set the custom number of learning requests. (default is 10)
    -m, --max <max>
            Change the maximum number of parameters. (default is 128/192/256 for query and 512 for body)

    -X, --method <method>
            Available: GET, POST, PUT, PATCH, DELETE, HEAD. (default is "GET")

    -o, --output <file>
    -P, --param-template <parameter_template>
            %k - key, %v - value. Example: --param-template 'user[%k]=%v&'

    -x, --proxy <proxy>
        --replay-proxy <replay-proxy>
            Request target with every found parameter via replay proxy at the end

    -r, --request <request>                                 The file with raw http request
        --save-responses <save-responses>                   Save matched responses to a directory
        --tmp-directory <tmp-directory>                     Directory for response comparing. Default: /tmp
    -u, --url <url>                                         You can add a custom injection point with %s
        --value-size <value_size>
            Custom value size. Affects {{random}} variables as well (default is 5)

    -v, --verbose <verbose>                                 Verbose level 0/1/2 (default is 1)
    -w, --wordlist <wordlist>                               The file with parameters

Installation

You need gnu diff. If you are using a Linux distributive then most likely it is already installed in your system. You can check whether it is installed or not by running diff --help if you see command not found: diff install diffutils package. Unfortunately, Windows does not support gnu diff.

  • Linux

    • from releases
    • from source code (rust should be installed)
      git clone https://github.com/Sh1Yo/x8
      cd x8
      cargo build --release
  • Mac

    • currently, there are no binaries for Mac OS
    • from source code (rust should be installed)
      git clone https://github.com/Sh1Yo/x8
      cd x8
      cargo build --release
  • Windows

    • Windows is not supported for this moment, but it is still possible to run the tool via wsl.

Donation

Want to support the project? You can donate to the following addresses:

Monero: 46pni5AY9Ra399sivBykVucaK6KdU3rYiSqFsZinfaEgd3qUkeZvRxjEdhPPmsmZQwTDPBSrvSpkaj4LsHqLH6GG7zMmgiW

Bitcoin: bc1q8q9hfmejxd65jcrszwpgj7xnwhy32gpxay2h604xwvjwtw8jh8vq8kev5r

Comments
  • error ssl  verification

    error ssl verification

    Hello,

    danger_disable_hostname_verification() some website use old ssl cert or wrong ..etc better use this func thank you

    reqwest::Error { kind: Request, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Ipv4(555)), port: None, path: "", query: Some(""), fragment: None }, source: hyper::Error(Connect, Custom { kind: Other, error: "invalid dnsname" }) }

    enhancement 
    opened by Ph33rr 13
  • Some servers throw errors with HTTP/2 requests

    Some servers throw errors with HTTP/2 requests

    So Request Of Burp Suite Was

    GET / HTTP/2
    Host: www.google.com
    Cookie: ******
    

    So When Use Burp Suite Extension "Send To" , x8 Will Parse The Request Like That

    GET https://www.google.com HTTP/2
    Host: www.google.com
    Cookie: ******
    

    So If You Tried Send This Request By Using Burp , You Will Get This Response

    HTTP/2 400 Bad Request
    Content-Type: text/html; charset=UTF-8
    Referrer-Policy: no-referrer
    Content-Length: 1555
    

    So Every Request Sent By x8 Not Correct So x8 Should Send Request Like This

    GET / HTTP/2
    Host: www.google.com
    Cookie: ******
    

    To https://www.google.com Not

    GET https://www.google.com HTTP/2
    Host: www.google.com
    Cookie: ******
    

    To https://www.google.com

    bug 
    opened by 0xAwali 11
  • support parsing from file arjument and append output

    support parsing from file arjument and append output

    Hi,

    i see the current argument -u which is accepting url as input. so could it support -file for example for multiple URLs per file.

    One more thing as temp workaround i'm running it via xargs loop BUT unfortunately it dose not append output it's overwrite the previous output

    xargs -n1 -P 10 -I {} sh -c "x8 -u {} -O url -o out-x8.txt -c 50" < file-urls.txt
    

    the problem with that loop it dose not append the found results to out-x8.txt

    opened by Sy3Omda 8
  • Support for multiple URLs

    Support for multiple URLs

    Hi

    This project looks great. I was interested in using it, but it doesn't seem like it supports scanning multiple URLs in one go. I understand you can probably just create a bash loop, but then you end up with tons of output files instead of one, without a simple way of combining them (like JSON files).

    opened by michael1026 6
  • output as raw request

    output as raw request

    amazing tool, really could you add support to output the request as raw so it can be imported directly to any other tool? example

    POST /someendpoint HTTP/1.1
    Host: example.com
    Connection: close
    Accept: */*
    User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103
    Content-Type: application/json
    
    {...discovered params here}
    

    Thanks

    enhancement 
    opened by Sy3Omda 5
  • Add support for openssl v3.0

    Add support for openssl v3.0

    Hello Sir,

    How to solve this issue in ARCH LINUX, Please help :-) ##################################################################################################### $ sudo pacman -S x8 [sudo] password for cyberghazi786: error: could not register 'multilib' database (database already registered) error: could not register 'multilib' database (database already registered) error: could not register 'multilib' database (database already registered) error: could not register 'multilib' database (database already registered) resolving dependencies... looking for conflicting packages...

    Package (1) New Version Net Change

    blackarch/x8 113.5f3b3cd-1 7.59 MiB

    Total Installed Size: 7.59 MiB

    :: Proceed with installation? [Y/n] Y (1/1) checking keys in keyring [--------------------------------] 100% (1/1) checking package integrity [--------------------------------] 100% (1/1) loading package files [--------------------------------] 100% (1/1) checking for file conflicts [--------------------------------] 100% :: Processing package changes... (1/1) installing x8 [--------------------------------] 100% :: Running post-transaction hooks... (1/1) Arming ConditionNeedsUpdate... [cyberghazi786@cyberghazi786-vmwarevirtualplatform bin]$ x8 x8: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

    #######################################################################################################

    opened by CyberGhazi786 4
  • output problem

    output problem

    I save the results of the program as -o results.txt. but if there is no parameter in a url address, it writes the same url address without parameters to the output file. I don't understand why you set it this way. If no parameter is found, it doesn't make much sense to add it to the output file. If you examine both this problem and the other issue(https://github.com/Sh1Yo/x8/issues/24) I created and update the program, the program will be much better.

    opened by Phoenix1112 4
  • wordlist from stdin

    wordlist from stdin

    beside reading wordlist from file, making x8 to read it from stdin would make it easier to pipe with other tools (like when you pipe commands to create a bug-bounty automation script). we can have it by checking --wordlist flag, if filename provided after the flag, x8 would read the file and consider it as the wordlist file. otherwise it'll read words from stdin. sth like this:

    $ x8 -u "https://example.com/" --wordlist <wordlist file>
    $ echo 'word1\nword2\nword3' | x8 -u "https://example.com/" --wordlist
    

    If you agree with it, I would be really happy to work on it and send a PR.

    enhancement 
    opened by amiremohamadi 4
  • installaing issue in parrot os

    installaing issue in parrot os

    ', /home/kali/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.72/build/find_normal.rs:180:5 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace warning: build failed, waiting for other jobs to finish... error: build failed

    opened by rohit0x5 4
  • Interesting Case and Implementation

    Interesting Case and Implementation

    gHello, first thank you very much for your tool.

    I got a lot of bountys on hackerone (https://hackerone.com/arthuraires), I would like to share a case that might be a future implementation.

    X8 noticed that a parameter modified the page's response, in case the parameter was reflected in uppercase, it didn't put it as reflected only as responsible for changing the number of items on the page.

    So adding an add comparison with the uppercase string can increase the detection rate.

    Thanks for listening!

    enhancement 
    opened by arthur4ires 4
  • [Request] include reason for potential param in the json output

    [Request] include reason for potential param in the json output

    Привет :)

    Currently, the tooling only mentions the reason a potential parameter is detected in the stdout only. It would be really helpful in cases where a user has multiple output files from the past to see which parameter was detected to reflecting back vs changing in response code, etc.

    image

    Current output format

    {"method":"GET", "url":"http://ffuf.me/cd/param/data", "parameters":["debug"]}
    

    Desired output format

    {
       "method": "GET",
        "url": "http://ffuf.me/cd/param/data",
        "parameters" : [
            {
                "param": "debug",
                "reason": "Different response code: 400 -> 200"
            }
        ]
    }
    

    So instead of just sending parameter names to futures_data, also send the message that was sent to writeln https://github.com/Sh1Yo/x8/blob/main/src/logic.rs#L216

    -- Regards, @bugbaba

    enhancement 
    opened by bugbaba 4
  • add a simple dockerfile

    add a simple dockerfile

    can be simply used like this:

    $ ls
    input.txt
    
    $ docker run -it -v $PWD:/app x8 -u https://4rt.one/level1 -w /app/input.txt
    

    or

    $ cat input.txt | docker run -i x8 -u https://4rt.one/level1 -w
    
    opened by amiremohamadi 1
  • Output is not saved sometimes

    Output is not saved sometimes

    I noticed that the output is not saved to the file from time to time when using --output <file> param (but the discovered query-param is printed to STDOUT). Also this depends on URL being tested. For the provided URL, I noticed that on the second-third run the output file gets empty.

    OS: Amazon Linux

    Steps to reproduce:

    $ ./x8 -u "https://manage.nba.com/wp-login.php" --learn-requests 1  --output temp.txt
    urls:         https://manage.nba.com/wp-login.php
    methods:      GET
    wordlist len: 0
    
    GET https://manage.nba.com/wp-login.php?%s (200) [45359] {0}
    [~] The page is not stable (body)
    reflects: redirect_to
    
    GET https://manage.nba.com/wp-login.php % redirect_to
    
    $ cat temp.txt 
    GET https://manage.nba.com/wp-login.php % redirect_to
    
    $ ./x8 -u "https://manage.nba.com/wp-login.php" --learn-requests 1  --output temp.txt
    urls:         https://manage.nba.com/wp-login.php
    methods:      GET
    wordlist len: 0
    
    GET https://manage.nba.com/wp-login.php?%s (200) [45360] {0}
    [~] The page is not stable (body)
    reflects: redirect_to
    
    GET https://manage.nba.com/wp-login.php % redirect_to
    
    $ cat temp.txt 
    # empty. 
    
    opened by ertygiq 2
  • Read wordlist asynchronously

    Read wordlist asynchronously

    when it comes to piping commands in order to read the word list (file & stdin), doing it asynchronously would be more efficient. consider sth like CeWL which extracts words from a website and creates a word list. so instead of waiting for the whole output we can read them asynchronously as they're generated. I guess this can be done with little effort as x8 itself has an async architecture.

    enhancement 
    opened by amiremohamadi 1
Releases(v4.1.0)
Owner
null
Shows how to implement USB device on RP2040 in Rust, in a single file, with no hidden parts.

Rust RP2040 USB Device Example This is a worked example of implementing a USB device on the RP2040 microcontroller, in Rust. It is designed to be easy

Cliff L. Biffle 9 Dec 7, 2022
Scriptable tool to read and write UEFI variables from EFI shell. View, save, edit and restore hidden UEFI (BIOS) Setup settings faster than with the OEM menu forms.

UEFI Variable Tool (UVT) UEFI Variable Tool (UVT) is a command-line application that runs from the UEFI shell. It can be launched in seconds from any

null 4 Dec 11, 2023
A Comprehensive Web Fuzzer and Content Discovery Tool

rustbuster A Comprehensive Web Fuzzer and Content Discovery Tool Introduction Check the blog post: Introducing Rustbuster — A Comprehensive Web Fuzzer

Francesco Soncina 467 Dec 26, 2022
A fast, simple, recursive content discovery tool written in Rust.

A simple, fast, recursive content discovery tool written in Rust ?? Releases ✨ Example Usage ✨ Contributing ✨ Documentation ?? ?? What the heck is a f

epi 3.6k Dec 30, 2022
Gossip-based cluster membership discovery (SWIM)

Foca: Cluster membership discovery on your terms Foca is a building block for your gossip-based cluster discovery. It's a small no_std + alloc crate t

null 43 Jan 3, 2023
An intent-centric, privacy-preserving protocol for decentralized counterparty discovery, solving, and multi-chain atomic settlement.

Anoma Blockchain prototye This prototype aims to reproduce the following topology: ┌────────┐ ┌───────────┐ │ ┌───────┐ │Sol

anoma 5 Dec 15, 2022
A Content Discovery Tool insipired from Feroxbuster. Work In Progress

monologue A Content Discovery Tool written in Rust, insipired from Feroxbuster. Installation Dependencies OpenSSL (If You are on linux). Rust programm

Voyage 3 Jul 20, 2023
A lambda extension to hot reload parameters from SSM Parameter Store, Secrets Manager, DynamoDB, AppConfig

A lambda extension to hot reload parameters from SSM Parameter Store, Secrets Manager, DynamoDB, AppConfig

Jake Scott 7 Jun 12, 2022
A handy way to handle sh/bash cli parameters

Argc A handy way to handle sh/bash cli parameters. How Argc works To write a command line program with Argc, we only need to do two things: Describe t

null 398 Jan 3, 2023
Generates a unique hash/identifier for a system given a set of parameters.

uniqueid ?? Generates a unique hash/identifier for a system given a set of parameters. Example usage use uniqueid; pub fn main() { let data = vec

Checksum 2 Aug 19, 2022
Rust Lambda Extension for any Runtime to preload SSM Parameters as 🔐 Secure Environment Variables!

?? Crypteia Rust Lambda Extension for any Runtime to preload SSM Parameters as Secure Environment Variables! Super fast and only performaned once duri

Custom Ink 34 Jan 7, 2023
Anchor Design of contract - Accounts, Parameters

MarketplaceDesign Anchor Design of contract - Accounts, Parameters Main Instructions are Initialize ListForSale AcceptOffer CancelList MakeOffer Cance

James Johnson 8 Sep 1, 2022
A black-box raw calldata decoder using only calldata to guess types and parse parameters.

Calldata Decoder A black-box raw calldata decoder using only calldata. Based off the topics discussed in DeGatchi's article, Reverse The EVM: Raw Call

DeGatchi 78 Jan 24, 2023
Poisson intensity of limit order execution, calibration of parameters A and k using level 1 tick data

Poisson intensity of limit order execution, calibration of parameters A and k using level 1 tick data Description A limit order placed at a price St ±

0xCuteSocks 6 Apr 9, 2023
An NLP-suite powered by deep learning

DeepFrog - NLP Suite Introduction DeepFrog aims to be a (partial) successor of the Dutch-NLP suite Frog. Whereas the various NLP modules in Frog wre b

Maarten van Gompel 16 Feb 28, 2022
Terra development suite

rover Terra development suite Planned features Usage Commands Planned features Includes a starter smart contract, can be cw-template or similar. Has a

Jason Stallings 3 Nov 9, 2021
A suite of programs for Solana key management and security.

?? goki Goki is a suite of programs for Solana key management and security. It currently features: Goki Smart Wallet: A wallet loosely based on the Se

Goki Protocol 157 Dec 8, 2022
Suite for automatically testing algorithm questions from the Polish Algorithm Olympiad.

oisuite Your number #1 tool to managing your algo questions! This software only works on UNIX-based operating systems (macOS, Linux, BSD, etc.) Projec

null 3 Nov 25, 2021
Coppers is a custom test harnass for Rust that measures the energy usage of your test suite.

Coppers Coppers is a test harness for Rust that can measure the evolution of power consumptions of a Rust program between different versions with the

Thijs Raymakers 175 Dec 4, 2022
A mail suite written in rust meant to be easy to use.

Erooster A mail suite written in rust meant to be easy to use. Getting started Currently the setup is quite rough. You need some certificates for your

Marcel 33 Dec 19, 2022