Skip to content
masterzorag edited this page Mar 31, 2017 · 12 revisions

bruteforge

A selective data combinator.

License: GPL v3 master

How does it works

  • Parses a custom configuration file
  • Uses parsed data combining all possibilities, just like a bruteforce algorithm does
  • Write to STDOUT, according to output mode

Help screen

  bruteforge, a selective data combinator.
  -----------
  
  -c  pass a valid config file
  -l  set word lenght (default = max possible)
  -n  generate just n words
  -x  use HEX mode    (default = CHAR)
  
  Output:
  -b  binary output
  -w  print out wordlist
  -q  quiet run

Config file

It's a simple text file, containing single charsets that will be used, one per line: each indexed charset will be used for the related indexed chars in forged word.
This way, order locks sorting and sets single (composing) data values.
You can use one file to store composing data for different tasks, then use to generate plaintext wordlist or hexadecimal binary as well as (hashes) wordlist, or raw binary data, as well as reproduce targeted test (check test folder for examples).
Use -c config_file to read your data from file.

Locale and Codepage

The character encoding is relevant: since bruteforge works on single byte value, it can support 256 characters, defaulting to codepage ISO-8859-1.
When using Extended ASCII Codes just make sure you have set locale, codepage and font able to support ISO-8859-1, or you will get confused about generated terminal's output:

$ unset LANG LC_ALL; LC_CTYPE=en_US.iso88591 export LC_CTYPE  
$ locale  

After saving your config_file, checks character encoding:

$ file test/test_4.ISO-8859-1
test/test_4.ISO-8859-1: ISO-8859 text

Characters or hex values

Use -x to parse and use data as hexadecimal values.

Word length

Use -l to lock word length.

Request number of combinations

Use -n to ask for just a fixed number of words.

Output mode

Output modes are mutually exclusive, you can select just one from:

  • Write wordlist with -w
  • Write binary data with -b
  • Test your configuration running in quiet mode with -q, you can dump at any time by sending USR1 signal

Examples

  • parse config, using extended ASCII codes
    $ ./bf -c test/test_4.ISO-8859-1

  • parse config, using hexadecimal values
    $ ./bf -c test/test_3.HEX -x

  • write wordlist to STDOUT, or test hex mode with quiet output
    $ ./bf -c test/test_4.ISO-8859-1 -w
    $ ./bf -c test/test_3.HEX -x -q

  • just ask 100 samples, as a wordlist
    $ ./bf -c test/test_1 -n 100 -w

  • hex mode, lock on 3 characters length, write wordlist, save to file
    $ ./bf -c test/test_3.HEX -x -l 3 -w > file

  • hex mode, lock on 2 characters length, write raw data, save to file, verify

$ ./bf -c test/test_3.HEX -x -l 2 -b > file.bin  
$ hexdump -C file.bin  
00000000  01 0a 01 ab 01 dd 02 0a  02 ab 02 dd 03 0a 03 ab  |................|  
00000010  03 dd                                             |..|  
  • hex mode, lock on 20 characters length, write raw data, pipe in your program
    $ ./bf -c test/test_3.HEX -x -l 20 -b | ./test/read_stdin_demo -l 20
  • Parse config
    just parse
  • Marking last changed
    Mark
  • Sending -USR1 signal
    sending -USR1 signal
  • Extended ASCII Codes
    Extended ASCII Codes
  • Save last generated
    save
Clone this wiki locally