Sei sulla pagina 1di 7

Inicialmente gostaria de declarar que no tenho a inteno de fazer deste trabalho um tema

final sobre o assunto. Este aqui apenas uma traduo, conforme podero ver as referencias
no final do arquivo. Ainda tem algumas coisas para terminar de traduzir, no conclui por
falta de tempo, pois fui traduzindo manualmente cada pargrafo. Se mais algum puder
ajudar, fique a vontade em enviar a mim, mesmo que seja feito o mnimo e eu referenciarei
aqui. Meu email rafig38@gmail.com . Podem me chamar de rafig.
CRUNCH
NOME:crunch
DESCRIO:
Crunch pode criar uma lista de palavras baseada no critrio especificado por voc. A sada do
crunch pode ser enviada para a tela, para um arquivo ou para outro programa.
Sintaxe: crunch <min-len> <max-len> [charset OR -f /path/to/charset.lst charset-name] [-o
wordlist.txt] [-t [FIXED]@@@@] [-s startblock] [-c number]
OBS: Aqui vai uma boa dica de informtica. Numa sintaxe, todo valor que vier entre < e > so
valores obrigatrios e todo valor que vier entre [ e ] so valores opcionais.
PARAMETROS:
min-len o comprimento mnimo da palavra que voc quer fazer o crunch iniciar. Esta opo
exigida mesmo para parmetros os quais no sero usados.
max-len o comprimento maximo da palavra que voc quer fazer o crunch terminar. Esta opo
exigida mesmo para parmetros os quais no sero usados.
[charset] opcional. Voc pode especificar o conjunto de caracteres para o crunch usar diretamente
na linha de comando ou se voc deixar em branco, o crunch usar o conjunto de caracteres padro.
A ordem dever ser caracteres minsculos, maisculos, nmeros e smbolos. Se voc no seguir
esta ordem, voc no ir obter o resultado esperado. Voc deve especificar tambm valores para o
tipo de caracter ou um sinal de mais.
OBS.: Se voc quiser usar espaos em branco no conjunto de caracteres especificados por voc,
ento dever coloc-lo entre aspas, assim: abc . Veja os exemplos 3, 11, 12 e 13.
[-b number[type]] opcional e especifica o tamanho do arquivo gerado. Somente funciona se usar a
opo -o START. Exemplo: Vamos gerar um arquivo de 60MB:
# . / crunch 4 5 -b 20mib o START
O resultado ser a gerao de 4(quatro) arquivos: aaaa-gvfed.txt, gvfee-ombqy.txt, ombqz-wcydt.txt,
wcydu-zzzzz.txt.
Os valores vlidos so do tipo kb, mb, gb, kib, mib, e gib. Os primeiros 3(trs) tipos so baseados
em 1000, enquanto que os 3(tres) ltimos so baseados em 1024.
OBS.: No existe espao entre o nmero e o tipo. Por exemplo, 500mb est correto, 500 mb no
est correto.
[-c number] opcional e especifica o nmero de linhas do arquivo gerado. Somente funciona se
usar a opo -o START. Exemplo: Vamos gerar um arquivo de 60 linhas:
#./crunch 1 1 -f /pentest/password/crunch/charset.lst mixalpha-numeric-all-space -o START -c 60
O resultado sero 2(dois) arquivos:
a-7.txt and 8-\ .txt. A razo da barra invertida no segundo arquivo que o comando ls gera um
scape quando imprimi na tela nomes de arquivos com espaos em branco no nome. Voc sempre

precisar colocar uma \ (barra invertida) quando especificar o nome de um arquivo em que o ltimo
caracter um espao em branco.

[-f /path/to/charset.lst charset-name] opcional e permite a voc especificar o conjunto de


caracteres baseado no arquivo charset.lst. Abra com um editor de texto qualquer, o arquivo
charset.lst e veja os tipos de conjunto de caracteres especificados l, so exatamente um destes que
voc ir escolher.
[-i] inverte a saida. Ao invs de aaa,aab,aac,aad, etc, voc obter aaa,baa,caa,daa,aba,bba, etc.
[-l] quando voc usa a opo t esta opo fala ao crunch que o smbolo dever ser tratado como
literalmente como letra e no como smbolo. Esta opo permitir a voc usar os espaos reservados
como letras no padro. Veja o exemplo 15.
[-m] esta opo foi substituida por p. Usar p ao invs de m.
[-o wordlist.txt] opcional e permite a voc especificar o nome do arquivo de sada.
[-p charset] OU [-p word1 word2 ...] opcional e fala ao crunch gerar palavras que no devem se
repetir.
Por padro o crunch geraria uma quantidade de palavras correspondente a potencia:
(conjunto_de_caracteres)^(max_comprimento). Ao invs disso o crunch ir gerar uma quantidade
de palavras correspondentes a um binomio igual ao nmero de letras do conjunto_de_caracteres.
Por exemplo:
Se voc declarar o conjunto_de_caracteres como sendo abc e o comprimento maximo sendo 4, o
Crunch por padro geraria a potencia: 3^4=81 palavras. Ao invs disso ele ir gerar 3! = 6 (
binmio de 3 = a, b e c  3 letras). Isto quer dizer, 3! = 3.2.1 = 6 palavras (abc, acb, bac, bca, cab,
cba). ESTA DEVER SER A LTIMA OPO!
Esta opo no usa a opo s e ela tambm ignora o min e max comprimento, entretanto estes
dois valores ainda devero ser especificados.
[-q filename.txt] opcional e fala ao crunch para ler o arquivo filename.txt e permutar o que for
lido. Esta opo semelhante a opo p, exceto por obter a entrada do arquivo filename.txt.
[-r] opcional e fala ao crunch para gerar palavras de onde parou. Voc dever usar o mesmo
comando anterior usado originalmente para gerar as palavras. A nica exceo a opo s. Se seu
comando original usava a opo s voc dever remover esta opo antes de novamente comear a
gerar palavras usando agora a opo r.
Basta adicionar a opo r no final do comando original.
[-s startblock] opcional e permite a voc especificar a string inicial. Exemplo: 03god22fs
[-t @,%^] opcional e permite a voc especificar o padro. Ex.: @@god@@@@ onde somente
@, % e ^ sero mudados.
O caracter @ ir inserir caracteres minsculos e maisculos, o % ir inserir nmeros e o ^ ir
inserir smbolos.
[-u] opcional. Por padro o crunch informar a voc quantos dados e quantas linhas sero gerados.
A opo u suprime esta informao e com o uso do | (pipe) voc poder jogar a sada para um

outro programa.
[-z gzip, bzip2, or lzma] opcional e comprime a sada do arquivo gerado com a opo o. Os
parmetros vlidos so gzip, bzip2, ou lzma.
Gzip mais rpido mas tem uma compresso mnima. Bzip mais lento que gzip mas tem melhor
compresso que gzip. Izma o mais lento mas o que tem melhor compresso.
EXEMPLOS
Exemplo 1:
crunch 1 8
crunch mostrar na tela uma wordlist que comea em a e termina em zzzzzzzz.
Exemplo 2:
crunch 1 6 abcdefg
crunch mostrar na tela uma wordlist usando o conjunto de caracter abcdefg que comea em a e
termina em gggggg.

Exemplo 3:
crunch 1 6 abcdefg\
there is a space at the end of the character string. In order for crunch to use the space you will need
to escape it using the \ character. In this Exemplo you could also put quotes around the letters and
not need the \, i.e. "abcdefg ".
Crunch will display a wordlist using the character set abcdefg that starts at a and ends at (6 spaces)
Exemplo 4:
crunch 1 8 -f charset.lst mixalpha-numeric-all-space -o wordlist.txt
crunch will use the mixalpha-numeric-all-space character set from charset.lst and will write the
wordlist to a file named wordlist.txt. The file will start with a and end with " "
Exemplo 5:
crunch 8 8 -f charset.lst mixalpha-numeric-all-space -o wordlist.txt -t @@dog@@@ -s cbdogaaa
crunch should generate a 8 character wordlist using the mixalpha-number-all-space characterset
from charset.lst and will write the wordlist to a file named wordlist.txt. The file will start at
cbdogaaa and end at " dog "
Exemplo 6:
crunch 2 3 -f charset.lst ualpha -s BB
crunch with start generating a wordlist at BB and end with ZZZ. This is useful if you have to stop
generating a wordlist in the middle. Just do a tail wordlist.txt and set the -s parameter to the next
word in the sequence.
Be sure to rename the original wordlist BEFORE you begin as crunch will overwrite the existing
wordlist.
Exemplo 7:
crunch 4 5 -p abc
Os numeros no so processados mas so necessrios.
crunch gerar abc, acb, bac, bca, cab, cba.
Exemplo 8:
crunch 4 5 -p dog cat bird

Os numeros no so processados mas so necessrios.


crunch gerar birdcatdog, birddogcat, catbirddog, catdogbird, dogbirdcat, dogcatbird.

Exemplo 9:
crunch 1 5 -o START -c 6000 -z bzip2
crunch gerar o arquivo bzip2 comprimido com cada arquivo contendo 6000 palavras. O nome do
arquivo comprimido ser primeira_palavra-ultima_palavra.txt.bz2

# time ./crunch 1 4 -o START -c 6000 -z gzip


real 0m2.729s
user 0m2.216s
sys 0m0.360s
# time ./crunch 1 4 -o START -c 6000 -z bzip2
real 0m3.414s
user 0m2.620s
sys 0m0.580s
# time ./crunch 1 4 -o START -c 6000 -z lzma
real 0m43.060s
user 0m9.965s
sys 0m32.634s
size filename
30K aaaa-aiwt.txt
12K aaaa-aiwt.txt.gz
3.8K aaaa-aiwt.txt.bz2
1.1K aaaa-aiwt.txt.lzma
Exemplo 10:
crunch 4 5 -b 20mib -o START
Gerar 4 arquivos: aaaa-gvfed.txt, gvfee-ombqy.txt, ombqz-wcydt.txt, wcydu-zzzzz.txt
Os primeiros tres arquivos so de 20MBs (real power of 2 MegaBytes) e os ltimos so de 11MB.
Exemplo 11:
crunch 3 3 abc + 123 !@# -t @%^
will generate a 3 character long word with a character as the first character, and number as the
second character, and a symbol for the third character. The order in which you specify the characters
you want is important. You must specify the order as lower case character, upper case character,
number, and symbol. If you aren't going use a particular
character set you use a plus sign as a placeholder. As you can see I am not using the upper case
character set so I am using the plus sign placeholder. The above will start at a1! and end at c3#
Exemplo 12:
crunch 3 3 abc + 123 !@# -t ^%@
Gerar 3 palavras de 3 caracteres comeando com !1a e terminando com #3c
Exemplo 13:

crunch 4 4 + + 123 + -t %%@^


the plus sign (+) is a placeholder so you can specify a character set for the character type. crunch
will use the default character set for the character type when crunch encounters a + (plus sign) on
the command line. You must either specify values for each character type or use the plus sign. I.E. if
you have two characters types you MUST either specify values for each type or use a plus sign. So
in this Exemplo the character sets will be:
abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ
123
!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/
Existe um espao no final da string acima. A sada comear em 11a! e terminar em "33z ". A aspa
mostra o espao no final da string.
Exemplo 14:
crunch 5 5 -t ddd@@ -o j -p dog cat bird any character other than one of the following: @,%^
is the placeholder for the words to permute. The @,%^ symbols have the same function as -t.
If you want to use @,%^ in your output you can use the -l option to specify which character you
want crunch to treat as a literal.
So the results are:
birdcatdogaa
birdcatdogab
birdcatdogac
<skipped>
dogcatbirdzy
dogcatbirdzz
Exemplo 15:
crunch 7 7 -t p@ss,%^ -l @
crunch tratar o simbolo @ como um caracter literal e no substituir o caracter por uma letra
maiscula.
Ser gerado:
p@ssA0!
p@ssA0@
p@ssA0#
p@ssA0$
<skipped>
p@ssZ9
OBSERVAO:
1. Starting in version 2.6 crunch will display how much data is about to be generated. In 2.7 it will
also display how many lines will be generated. Crunch will now wait 3 seconds BEFORE it begins
generating data to give you time to press Ctrl-C to abort crunch if you find the values are too large
for your application.
2. I have added hex-lower (0123456789abcdef) and hex-upper (0123456789ABCDEF) to
Charset.lst.
3. Several people have requested that I add support for the space character to crunch. crunch has
always supported the space character on the command line and in the charset.lst. To add a space on
the command line you must escape it using the / character. See Exemplo 3 for the syntax. You may
need to escape other characters like ! or # depending on your operating system.

4. Starting in 2.7 if you are generating a file then every 10 seconds you will receive the % done.
5. Starting in 3.0 I had to change the -t * character to a , as the * is a reserved character. You could
still use it if you put a \ in front of the *. Yes it breaks crunch's syntax and I do my best to avoid
doing that, but in this instance it is easier to make the change for long term support.
6. Some output is missing. A file didn't get generated.
The mostly explaination is you ran out of disk space. If you have verified you have plenty of disk
space then the problem is most likely the filename begins with a period. In Linux filenames that
begin with a period are hidden.
To view them do a ls -l .*
7. Crunch says The maximum and minimum length should be the same size as the pattern you
specified, however the length is set correctly.
This usually means your pattern contains a character that needs to be escaped. In bash you need to
escape the followings:
&, *, space, \, (, ), |, ', ", ;, <, >.
The escape character in bash is a \. So a pattern that has a & and a * in it would look like this:
crunch 4 4 -t \&\*d@
An alternative to escaping characters is to wrap your string with quotes. For Exemplo:
crunch 4 4 -t "&*d@"
If you want to use the " in your pattern you will need to escape it like this: crunch 4 4 -t "&*\"@"
Please note that different terminals have different escape characters and probably have different
characters that will need escaping. Please check the manpage of your terminal for the escape
characters and characters that need escaping.
AUTHOR
This manual page was written by bofh28@gmail.com
Crunch version 1.0 was written by mimayin@aciiid.ath.cx all later versions of crunch have been
updated by bofh28@gmail.com
FILES
GPL.TXT
Makefile
charset.lst
crunch.1
crunch.c
$Home/pentest/passwords/crunch
BUGS
If you find any please email bofh28@gmail.com or post to http://www.backtrack-linux.org
COPYRIGHT
2009, 2010, 2011 bofh28 bofh28@gmail.com
This file is a part of Crunch.
Crunch is free software: you can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation, version 2 only of the
License.
Crunch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Crunch. If not,

see http://www.gnu.org/licenses/ .

Potrebbero piacerti anche