Подбор паролей для архивов в Unix
| июня 18, 2008Если вы забыли пароль на какой-то из архивов (rar, 7z, zip), то эти два способа могут вам помочь.
ВНИАНИЕ: Пожалуйста, не используйте эти программы для не легальных целей!
Способ первый
Эта программа использует брутфорс для подбора пароля к архиву. Вы можете сами опредлелить какие из смиволов будут учавствовать в генерации пароля.
Погдготовка системы
Для начала надо установить некоторые зависимости
#apt-get install libxml2-dev build-essential
Теперь собственно скачиваем программу rarcrack
#wget http://surfnet.dl.sourceforge.net/sourceforge/rarcrack/rarcrack-0.2.tar.bz2
Извлекаем файлы из архива и собираем прогу
#tar -xjf rarcrack-0.2.tar.bz2
#cd rarcrack-0.2
#make
Теперь под sudo выполняем:
#make install
Использование Rarcrack
rarcrack имя_файла.ext [
1 --threads thread_num] [
1 --type rar|zip|7z]
Пример
rarcrack something.rar
После начала подбора пароля RarCrack будет отображать текущее состояние подбора и сохранять его в статус файл. Если надо установить параметри более специфического подбора, надо запустить RarCrack для создания XML статус файла.
Способ второй
Для подбора пароля к ZIP архивам используйте fcrackzip. fcrackzip это быстрый взломщик паролей на арахивы частично написанный на ассемблере. Он способен ломать zip файлы брутфорсом или на основе словаря паролей.
Установка fcrackzip в Ubuntu
#sudo aptitude install fcrackzip
Fcrack Syntax
fcrackzip [-bDBchVvplum2]
1 | [--brute-force] [--dictionary] [--benchmark] [--charset characterset] [--help] [--validate] [--verbose] [--init-password string/path] [--length min-max] [--use-unzip] [--method name] [--modulo r/m] |
file.
fcrack Options
-h, –help
Prints the version number and (hopefully) some helpful insights.
-v, –verbose
Each -v makes the program more verbose.
-b, –brute-force
Select brute force mode. This tries all possible combinations of the letters you specify.
-D, –dictionary
Select dictionary mode. In this mode, fcrackzip will read passwords from a file, which must contain one password per line and should be alphabetically sorted (e.g. using (1)).
-c, –charset characterset-specification
Select the characters to use in brute-force cracking. Must be one of
a include all lowercase characters [a-z]
A include all uppercase characters [A-Z]
1 include the digits [0-9]
! include [!:$%&/()=?[]+*~#]
: the following characters upto the end of the spe-
cification string are included in the character set.
This way you can include any character except binary
null (at least under unix).
For example, a1:$% selects lowercase characters, digits and the dollar and percent signs.
-p, –init-password string
Set initial (starting) password for brute-force searhcing to string, or use the file with the name string to supply passwords for dictionary searching.
-l, –length min[-max]
Use an initial password of length min, and check all passwords upto passwords of length max (including). You can omit the max parameter.
-u, –use-unzip
Try to decompress the first file by calling unzip with the guessed password. This weeds out false positives when not enough files have been given.
-m, –method name
Use method number “name” instead of the default cracking method. The switch –help will print a list of available methods. Use –benchmark to see which method does perform best on your machine. The name can also be the number of the method to use.
-2, –modulo r/m
Calculate only r/m of the password. Not yet supported.
-B, –benchmark
Make a small benchmark, the output is nearly meaningless.
-V, –validate
Make some basic checks wether the cracker works.
fcrackzip примеры
fcrackzip -c a -p aaaaaa sample.zip
взламывает зашифрованный архив sample.zip из слов в нижнем регистре состоящиз из 6 символов от aaaaaa … abaaba … ghfgrg … до zzzzzz.
fcrackzip
1 | --method cpmask --charset A --init |
AAAA test.ppm
взламывает изображение test.ppm по всевозможным кобиначиям символов. -TP fcrackzip -D -p passwords.txt sample.zip пробует подобрать все пароли из файла passwords.txt.
Оригинальные статьи:











