java>> x8>> 返回
项目作者: Sh1Yo

项目描述 :
Hidden parameters discovery suite
高级语言: Rust
项目地址: git://github.com/Sh1Yo/x8.git
创建时间: 2021-04-27T14:43:22Z
项目社区:https://github.com/Sh1Yo/x8

开源协议:GNU General Public License v3.0

下载


Twitter
stars
issues

Latest Version
crates.io
crates_downloads
github_downloads

x8

Hidden parameters discovery suite written in Rust.

The tool aids in identifying hidden parameters that could potentially be vulnerable or reveal interesting functionality that may be missed by other testers. Its high accuracy is achieved through line-by-line comparison of pages, comparison of response codes, and reflections.

Documentation

The documentation that explains every feature can be accessed at https://sh1yo.art/x8docs/. The source of the documentation is located at /docs.md.

Tree

Features

  • Fast.
  • Offers flexible request configuration through the use of templates and injection points.
  • Highly scalable, capable of checking thousands of URLs per run.
  • Provides higher accuracy compared to similar tools, especially in difficult cases.
  • Capable of discovering parameters with non-random values, such as admin=true.
  • Highly configurable with a wide range of customizable options.
  • Achieves almost raw requests through external library modification.

Examples

Check parameters in query

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

With default parameters:

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

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

Send parameters via body

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

Or with a custom body:

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

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

Check multiple urls in paralell

  1. x8 -u "https://example.com/" "https://4rt.one/" -W0

Custom template

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

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

Percent encoding

Sometimes parameters should be encoded. It is also possible:

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

Search for headers

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

Search for header values

You can also target single headers:

  1. x8 -u "https://example.com" --headers -H "Cookie: %s" -w <wordlist>

Test site

You can check the tool and compare it with other tools on the following urls:

https://4rt.one/level1 (GET)

https://4rt.one/level3 (GET)

Usage

  1. USAGE:
  2. x8 [FLAGS] [OPTIONS]
  3. FLAGS:
  4. --append Append to the output file instead of overwriting it.
  5. -B Equal to -x http://localhost:8080
  6. --check-binary Check the body of responses with binary content types
  7. --disable-additional-checks Private
  8. --disable-colors
  9. --disable-custom-parameters Do not automatically check parameters like admin=true
  10. --disable-progress-bar
  11. --disable-trustdns Can solve some dns related problems
  12. --encode Encodes query or body before making a request, i.e & -> %26, = -> %3D
  13. List of chars to encode: ", `, , <, >, &, #, ;, /, =, %
  14. -L, --follow-redirects Follow redirections
  15. --force Force searching for parameters on pages > 25MB. Remove an error in case there's 1
  16. worker with --one-worker-per-host option.
  17. -h, --help Prints help information
  18. --headers Switch to header discovery mode.
  19. NOTE Content-Length and Host headers are automatically removed from the list
  20. --invert By default, parameters are sent within the body only in case PUT or POST methods
  21. are used.
  22. It's possible to overwrite this behavior by specifying the option
  23. --mimic-browser Add default headers that browsers usually set.
  24. --one-worker-per-host Multiple urls with the same host will be checked one after another,
  25. while urls with different hosts - are in parallel.
  26. Doesn't increase the number of workers
  27. --reflected-only Disable page comparison and search for reflected parameters only.
  28. --remove-empty Skip writing to file outputs of url:method pairs without found parameters
  29. --replay-once If a replay proxy is specified, send all found parameters within one request.
  30. --strict Only report parameters that have changed the different parts of a page
  31. --test Prints request and response
  32. -V, --version Prints version information
  33. --verify Verify found parameters.
  34. OPTIONS:
  35. -b, --body <body> Example: --body '{"x":{%s}}'
  36. Available variables: {{random}}
  37. -c <concurrency> The number of concurrent requests per url [default: 1]
  38. --custom-parameters <custom-parameters>
  39. Check these parameters with non-random values like true/false yes/no
  40. (default is "admin bot captcha debug disable encryption env show sso test waf")
  41. --custom-values <custom-values>
  42. Values for custom parameters (default is "1 0 false off null true yes no")
  43. -t, --data-type <data-type>
  44. Available: urlencode, json
  45. Can be detected automatically if --body is specified (default is "urlencode")
  46. -d, --delay <Delay between requests in milliseconds> [default: 0]
  47. -H <headers> Example: -H 'one:one' 'two:two'
  48. --http <http> HTTP version. Supported versions: --http 1.1, --http 2
  49. -j, --joiner <joiner>
  50. How to join parameter templates. Example: --joiner '&'
  51. Default: urlencoded - '&', json - ', ', header values - '; '
  52. --learn-requests <learn-requests-count> Set the custom number of learn requests. [default: 9]
  53. -m, --max <max>
  54. Change the maximum number of parameters per request.
  55. (default is <= 256 for query, 64 for headers and 512 for body)
  56. -X, --method <methods> Multiple values are supported: -X GET POST
  57. -o, --output <file>
  58. -O, --output-format <output-format> standart, json, url, request [default: standart]
  59. -P, --param-template <parameter-template>
  60. %k - key, %v - value. Example: --param-template 'user[%k]=%v'
  61. Default: urlencoded - <%k=%v>, json - <"%k":%v>, headers - <%k=%v>
  62. -p, --port <port> Port to use with request file
  63. --progress-bar-len <progress-bar-len> [default: 26]
  64. --proto <proto> Protocol to use with request file (default is "https")
  65. -x, --proxy <proxy>
  66. --recursion-depth <recursion-depth>
  67. Check the same list of parameters with the found parameters until there are no new parameters to be found.
  68. Conflicts with --verify for now.
  69. --replay-proxy <replay-proxy>
  70. Request target with every found parameter via the replay proxy at the end.
  71. -r, --request <request> The file with the raw http request
  72. --save-responses <save-responses>
  73. Save request and response to a directory when a parameter is found
  74. --split-by <split-by>
  75. Split the request into lines by the provided sequence. By default splits by \r, \n and \r\n
  76. --timeout <timeout> HTTP request timeout in seconds. [default: 15]
  77. -u, --url <url>
  78. You can add a custom injection point with %s.
  79. Multiple urls and filenames are supported:
  80. -u filename.txt
  81. -u https://url1 http://url2
  82. -v, --verbose <verbose> Verbose level 0/1/2 [default: 1]
  83. -w, --wordlist <wordlist>
  84. The file with parameters (leave empty to read from stdin) [default: ]
  85. -W, --workers <workers>
  86. The number of concurrent url checks.
  87. Use -W0 to run everything in parallel [default: 1]

Wordlists

Parameters:

Headers:

Burp Suite integration

The burpsuite integration is done via the send to extension.

Setting up

  1. Launch Burp Suite and navigate to the ‘Extender’ tab.
  2. Locate and install the ‘Custom Send To’ extension from the BApp Store.
  3. Open the ‘Send to’ tab and click on the ‘Add’ button to configure the extension.

Give a name to the entry and insert the following line into the command:

  1. /path/to/x8 --progress-bar-len 20 -c 3 -r %R -w /path/to/wordlist --proto %T --port %P

You can also add your frequently used arguments like --output-format,--replay-proxy, --recursion-depth, ..

NOTE if the progress bar doesn’t work properly —- try to reducing the value of --progress-bar-len.

Switch from Run in background to Run in terminal.

image

If you encounter issues with font rendering in the terminal, you can adjust the xterm options in Send to Miscellaneous Options. Simply replace the existing content with xterm -rv -fa 'Monospace' -fs 10 -hold -e %C, or substitute xterm with your preferred terminal emulator.

Now you can go to the proxy/repeater tab and send the request to the tool:

image

In the next dialog, you can modify the command and execute it in a new terminal window.

image

After executing the command, a new terminal window will appear, displaying the running tool.

image

Installation

NOTE: Starting with v4.0.0, installing via cargo install uses the crate branch instead of main. This branch includes the original reqwest library that performs HTTP normalizations and prevents sending invalid requests. If you want to use the modified reqwest version without these limitations, I recommend installing via the Releases page or building the sources.

  • Docker

    • installation
      1. git clone https://github.com/Sh1Yo/x8
      2. cd x8
      3. docker build -t x8 .
    • usage
  • Linux

    • from releases
    • from blackarch repositories (repositories should be installed)
      1. # pacman -Sy x8
    • from source code (rust should be installed)
      1. git clone https://github.com/sh1yo/x8
      2. cd x8
      3. cargo build --release
      4. # move the binary to $PATH so you can use it without specifying the full path
      5. cp ./target/release/x8 /usr/local/bin
      6. # if it says that /usr/local/bin doesn't exists you can try
      7. # sudo cp ./target/release/x8 /usr/bin
    • via cargo install
      1. cargo install x8
  • Mac

    • from source code (rust should be installed)
      1. git clone https://github.com/sh1yo/x8
      2. cd x8
      3. cargo build --release
      4. # move the binary to $PATH so you can use it without specifying the full path
      5. cp ./target/release/x8 /usr/local/bin
    • via cargo install
      1. cargo install x8
  • Windows

    • from releases