To install it, download the Crunch http://sourceforge.net/projects/crunch-wordlist/
cd /path/to/downloaded/archive
tar -xvf crunch_archive.tgz
cd /path/to/extracted/folder/
sudo make && make install
Troubleshooting:
If you get this error:
Building binary... /usr/bin/gcc -Wall -lm -pthread -std=c99 crunch.c -o crunch crunch.c: In function ‘PrintPercentage’: crunch.c:1006:20: warning: variable ‘finall’ set but not used [-Wunused-but-set-variable] crunch.c: In function ‘renamefile’: crunch.c:1032:12: warning: variable ‘pidret’ set but not used [-Wunused-but-set-variable] crunch.c: In function ‘main’: crunch.c:1805:8: warning: variable ‘loaded’ set but not used [-Wunused-but-set-variable] /tmp/ccqWIgti.o: In function `count_strings': crunch.c:(.text+0x1c1e): undefined reference to `pow' crunch.c:(.text+0x1dd5): undefined reference to `pow' crunch.c:(.text+0x1fd1): undefined reference to `pow' collect2: ld returned 1 exit status make: *** [crunch] Error 1
Then the math librarys aren't included, to fix it, simply run this command:
# /usr/bin/gcc -Wall -lm -pthread -std=c99 -m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 crunch.c -o crunch -lm
[If you are on 64-bit platform, change "-m32" to "-m64"]
Crunch generates wordlist out of a characterset that you give it. F. ex.
./crunch 8 8 0123456789 -o 8Digit.ls
This will launch Crunch, make a wordlist named 8Digit.lst, only 8 character words, and the characterset is 0-9.
A neat little feature with Crunch, is that it displays the amount of words it will generate, how much space the wordlist will use and it has a sleep timer of 3 seconds, so if the wordlist is to big you can stop Crunch.
Crunch has the following options:
-b Maximum bytes to write per file, so using this option the wordlist to be created can be split into various
sizes such as KB / MB / GB (must be used in combination with "-o START" switch)
-c Number of lines to write to output file, must be used together with "-o START"
-d Limits the number of consecutive identical characters (crunch v3.2)
-e Specifies when crunch should stop early (crunch v3.1)
-f Path to the charset.lst file to use, standard location is '/pentest/passwords/crunch/charset.lst
to be used in conjunction with the name of the desired charset list, such as 'mixalpha-numeric-space'
-i Inverts the output sequence from left-to-right to right-to-left
(So instead of aaa, aab, aac, aad etc, output would be aaa baa caa daa)
-l When specifying custom patterns with the -t option, the -l switch allows you to identify which of the characters
should be taken as a literal character instead of a place holder ( @,%^ )
-o Allows you to specify the file name / location for the output, e.g. /media/flashdrive/wordlist.txt
-p Prints permutations of the words or characters provided in the command line.
-q Prints permutation of the words or characters found in a specified file
-r Resumes from a previous session, exact same syntax to be used followed by -r
-s Allows you to specify the starting string for your wordlist.
-t Allows you to specify a specific pattern to use. Probably one of the most important functions !
Place holders for fixed character sets are ;
@ -- lower case alpha characters
, -- upper case alhpa characters
% -- numeric characters
^ -- special characters (including space)
-u Supresses the output of wordlist size & linecount prior starting wordlist generation.
-z Adds support to compress the generation output, supports gzip, bzip & lzma
If you are creating big wordlists, Crunch also supports compression in gzip, bzip2 and lzma.
./crunch 6 6 0123456789 -o 8Digit.lst -z lzma

Also another neat feature, is that you can pipe the outputs of Crunch to AirCrack-ng for example.
./crunch 8 8 0123456789 | aircrack-ng -e test -w - capture.cap
[Little picturefail here, I used the command mentioned above.]
This one is a little crazy :-P
To learn more about Crunch, in terminal, type "man crunch".


Ingen kommentarer:
Legg inn en kommentar