- HackWare.ru
- Этичный хакинг и тестирование на проникновение, информационная безопасность
- Как конвертировать рукопожатие (хендшейк) в новый формат Hashcat. Решение проблемы «Old hccap file format detected! You need to update»
- Как в aircrack-ng конвертировать в формат Hashcat
- pcap and cap dump file to hccapx — instantly
- Select and Upload your .(p)cap file:
- Output:
- Notes
- How to use?
- Explanation of the format
- Credits
- Popular
- Legal Notes
- hashcat advanced password recovery
- Table of Contents
- hashcat-utils
- Description
- Current Version
- Download
- List of Utilities
- cap2hccapx
- cleanup-rules
- combinator
- combinator3
- combipow
- ct3_to_ntlm
- deskey_to_ntlm
- expander
- generate-rules
- hcstatgen
- hcstat2gen
- keyspace
- morph
- permute
- permute_exist
- prepare
HackWare.ru
Этичный хакинг и тестирование на проникновение, информационная безопасность
Как конвертировать рукопожатие (хендшейк) в новый формат Hashcat. Решение проблемы «Old hccap file format detected! You need to update»
Если вы взламываете пароль Wi-Fi в Hashcat, то вы знаете, что Hashcat не может работать напрямую с файлами сетевого захвата (.cap или .pcap), эти файлы нужно конвертировать в специальный формат Hashcat. Для конвертации в формат в формат .hccap обычно использовалась связка из программ wpaclean (для очистки лишних данных) и aircrack-ng (для самой конвертации). Но в новых версия Hashcat при попытке подобрать пароль к файлу .hccap нас встречает ошибка:
Начнём с небольшой предыстории. Обычно используемые для конвертации файлов рукопожатий в формат Hashcat программы aircrack-ng и cap2hcap не проверяют атрибут счетчика повторов, который используется для различения разных рукопожатий WPA для одной и той же точки доступа и станции. По крайней мере, они не делают это правильно. Результатом становится то, что может получиться .hccap файл, который выглядит корректным, но никогда не будет взломам, даже если в вашем словаре имеется верный пароль.
Особенно если вы запускаете атаку деаутентификации для ускорения процесса захвата рукопожатия, то возможен параллельный запуск нескольких одновременных WPA рукопожатий (и их захват) от одной и той же ТД и Станции. Каждое из них будет иметь различные nonce (случайные данные), которые являются частью расчёта, которые выполняет hashcat для верификации, является ли кандидат в пароли корректным или нет. Для осуществления успешной верификации важно использовать корректный nonce , а чтобы это было так, важно правильно проверить соответствие пакетов рукопожатия.
Об этой проблеме atom (автор hashcat) сообщил команде Aircrack-NG: http://trac.aircrack-ng.org/ticket/651
Поскольку этот тикет открыт 8 лет назад и последние изменения в cap2hccap делались 3 года назад, atom решил написать его собственный конвертер. В данный момент конвертер закончен и называется «cap2hccapx«. Он добавлен в качестве нового инструмента в hashcat-utils.
cap2hccapx делает проверку, не было ли составлено рукопожатие из нескольких.
Для взлома пароля, как известно, применяется захваченное т.н. четырёхэтапное рукопожатие (хендшейк). Оно состоит из четырёх элементов. Но не все эти элементы являются обязательным для взлома пароля. Теперь hashcat умеет взламывать и неполные хендшейки (так называемые WPA2 Half Handshake).
Эти новые возможности (точнее, новая информация) заставили создать новый формат захвата для hashcat. Разработчики назвали его «hccapx». Подробности о нём вы найдёте здесь: https://hashcat.net/wiki/hccapx (и если хотите, вы можете сравнить его со старым форматом hccap https://hashcat.net/wiki/hccap).
В общем, было добавлено несколько новых записей, позволяющих hashcat определить, является ли файл рукопожатия валидным (добавлена «HCPX» в начало файла), добавлена версия о формате и, конечно, информация о том, была ли аутентификация успешной и, следовательно, было ли захвачено третье сообщение (третий элемент рукопожатия). Если рукопожатие является полным, то hashcat будет взламывать два типа записей из рукопожатия. Это не потребует дополнительных затрат, поскольку вся верификация делается после медленной части PBKDF-HMAC-SHA1.
Формат hccapx является новым. Конечно у вас в архивах много файлов .hccap. Но без сделанных изменений нельзя было быть уверенным даже в том, что конвертированные в хеш данные вообще поддаются взлому из-за отсутствующих проверок и неправильных алгоритмов сопоставления. По этой причине абсолютно не имеет смысла конвертировать из hccap в hccapx.
Если вы использовали старый онлайн конвертер, обновите вашу ссылку на: https://hashcat.net/cap2hccapx/
Если вы предпочитаете конвертировать файлы захвата (рукопожатия) в формат hashcat у себя на компьютере, то давайте познакомимся поближе с утилитой cap2hccapx. Как уже было сказано, она является частью пакета hashcat-utils.
Инструмент используется для генерации файлов .hccapx из файлов сетевого захвата (.cap или .pcap) для взлома WPA/WPA2 аутентификаций. Файлы .hccapx используются как ввод для типа хеша -m 2500 = WPA/WPA2.
Дополнительные опции позволяют вам указать имя сети (ESSID) для фильтрации нежелательных сетей и для предоставления cap2hccapx подсказки о имени сети (ESSID) и MAC адресе точки доступа (BSSID) если не было захвачено маячков (beacon).
В Kali Linux и в BlackArch hashcat-utils утилиты имеются в стандартных репозиториях и даже предустановлены в системы. Тем не менее, на момент написания там присутствуют старые версии, в которых программа cap2hccapx ещё не добавлена.
Пакет hashcat-utils является портативным и кроссплатформенным.
После скачивания достаточно распаковать архив и запускать требуемые файлы *.bin или .exe для Windows.
Либо установить из исходных кодов.
Если в файле захвата (сохранён с именем RT-726940.cap) содержится только одно рукопожатие и я хочу конвертировать его в формат hashcat для взлома Wi-Fi пароля в файл с именем output.RT-726940.hccapx, то моя команда выглядит:
Программа напишет что-то вроде:
Рассмотрим другой случай – когда в файле захвата (/home/mial/autopwner.cap) присутствует несколько рукопожатий
Можно увидеть, что имеется рукопожатия для точек доступа RT-714241 и для RT-727674.
Если меня интересует рукопожатие только для точки доступа RT-714241 и я хочу сохранить хеш для взлома пароля в файл output.RT-714241.hccapx, то моя команда будет выглядеть так:
Соответственно, если меня интересуют рукопожатия только для RT-727674, то команда превращается в:
Если мне нужны все хеши рукопожатий, то это можно сделать так:
Как в aircrack-ng конвертировать в формат Hashcat
aircrack-ng имеет две опции для конвертации в старый и новый формат Hashcat:
Команда для конвертации имеет вид:
Обратите внимание, что первым идёт имя хеша, в который будет сконвертирован хендшейк. Причём указывать расширение .hccapx не нужно — оно будет добавлено автоматически.
Следующая команда конвертирует захваченное рукопожатие RT-725140.pcap в носовую версию хеша для взлома в последних Hashcat и сохранит его в файл с именем RT-725140.hccapx:
pcap and cap dump file to hccapx — instantly
Select and Upload your .(p)cap file:
Output:
Notes
- Uploaded files (.cap) will be deleted immediately. We do NOT store your .cap files
- Converted files (.hccapx) will be stored for 2 days before being deleted
- This site is using the best-in-class tool hcxtools to convert cap files
- The goal of this page is to make it very easy to convert .cap files to .hccapx
- We also offer a service to try to recover the WPA password, just upload your file (.cap or .hccapx) here.
- See also cap to hash converter.
How to use?
More than easy, just select and upload your .(p)cap file. If valid, the file will be converted into a .hccapx file, which is readable by Hashcat.
Explanation of the format
hccapx is a custom format, specifically developed for Hashcat, to be used for hash type -m 2500 = WPA/WPA2
An exhaustive description of this custom format can be found on their official wiki.
Credits
Credits go to hcxtools project
Online Hash Crack is an online service that attempts to recover your lost passwords:
— Hashes (e.g. MD5, NTLM, WordPress. )
— Wifi WPA handshakes
— Office encrypted files (Word, Excel. )
— Apple iTunes Backup
— ZIP / RAR / 7-zip Archive
— PDF documents
Popular
Legal Notes
By using our service you agree that you are not violating any laws or regulations on copyright or privacy issues that exist in your country. Terms & Conditions
hashcat
advanced password recovery
Table of Contents
hashcat-utils
Description
Hashcat-utils are a set of small utilities that are useful in advanced password cracking.
They all are packed into multiple stand-alone binaries.
All of these utils are designed to execute only one specific function.
Since they all work with STDIN and STDOUT you can group them into chains.
hashcat-utils is released as open source software under the MIT license.
Current Version
The current version is 1.9.
Download
The programs are available for Linux and Windows on both 32-bit and 64-bit architectures, as well as .app binaries for 64-bit OSX/macOS. The project is released as MIT-licensed open source software.
hashcat-utils does not have a dedicated homepage, but this download link always has the latest release:
List of Utilities
Each of them is described in detail in the following sections.
cap2hccapx
Tool used to generate .hccapx files from network capture files (.cap or .pcap) to crack WPA/WPA2 authentications. The .hccapx files are used as input by the hash type -m 2500 = WPA/WPA2.
The additional options allow you to specify a network name (ESSID) to filter out unwanted networks and to give cap2hccapx a hint about the name of a network (ESSID) and MAC address of the access point (BSSID) if no beacon was captured.
cleanup-rules
Strips rules from STDIN that are not compatible with a specified platform.
… where mode is 1 = CPU, 2 = GPU.
combinator
This program is a stand-alone implementation of the Combinator Attack.
Each word from file2 is appended to each word from file1 and then printed to STDOUT.
Since the program is required to rewind the files multiple times it cannot work with STDIN and requires real files.
Another option would be to store all the content from both files in memory. However in hash-cracking we usually work with huge files, resulting in a requirement that the size of the files we use does matter.
combinator3
Like combinator, but accepts three files as input, producing the combination of all three lists as output.
combipow
Produces all “unique combinations” from a short list of inputs.
ct3_to_ntlm
There are two different versions for NetNTLMv1 — one with ESS, and one without.
If you don’t have an ESS:
You can use it like this:
If you have ESS:
This program (new in hashcat-utils-0.6) is designed to cut up a wordlist (read from STDIN) to be used in Combinator attack. Suppose you notice that passwords in a particular dump tend to have a common padding length at the beginning or end of the plaintext, this program will cut the specific prefix or suffix length off the existing words in a list and pass it to STDOUT.
Example wordlist file:
Example positive offset and fixed length (first 4 characters):
Example positive offset, no length (returns remaining characters in string):
Example negative offset (last 4 characters in string):
Example negative offset, fixed length:
Remember to run sort -u on the output before using it in an attack!
deskey_to_ntlm
Forum announcement and discussion here.
expander
This program has no parameters to configure.
Each word going into STDIN is parsed and split into all its single chars, mutated and reconstructed and then sent to STDOUT.
There are a couple of reconstructions generating all possible patterns of the input word by applying the following iterations:
Important: make sure you unique the output afterwards.
This program is the heart of the Fingerprint Attack.
Each wordlist going into STDIN is parsed and split into equal sections and then passed to STDOUT based on the amount you specify. The reason for splitting is to distribute the workload that gets generated.
For example if you have an i7 CPU and want to use your dictionary with a program that is unable to handle multiple cores, you can use gate to split your dictionary into multiple smaller pieces and then run that program in multiple instances.
The two important parameters are “mod” and “offset”.
Here is an example input dictionary:
We want to split a dictionary into two equal dictionaries:
generate-rules
Stand-alone utility to generate random rules.
Usage: ./generate-rules.bin number [seed]
This command generates 10 random rules, using “42” as a seed:
hcstatgen
A tool used to generate .hcstat files for use with older hashcat’s –markov-hcstat parameter, and with the statsprocessor.
NOTE: The output generated by hcstatgen is no longer supported by current hashcat and does not support longer passwords (up to length 256). Use hcstat2gen instead.
Nothing much else to say here. Each outfile will be exactly 32.1MB in size.
hcstat2gen
A tool for generating custom Markov statistics, for use (after LZMA compression) with hashcat’s —markov-hcstat (soon to be —markov-hcstat2 ) parameter.
hcstat2gen is like its predecessor hcstatgen , but updated in sync with hashcat 4.0 to support a maximum password length up to 256 (and also added a filetype header).
To conserve space, hashcat now expects hcstat2 files to be compressed as LZMA. If the file is not compressed, you will see a “ Could not uncompress data ” error.
Common usage example:
If your lzma does not support –stdout , try:
Each raw outfile should be about 132MB in size (with variable size after compression).
Note that this newer format is not yet supported by statsprocessor.
keyspace
Calculates keyspace in a hashcat-aware manner.
Each word going into STDIN is parsed for its length and passed to STDOUT if it matches a specified word-length range.
Here is an example input dictionary:
We want only these words that have the length 2, 3 or 4:
Merges two lists.
Like rli2, the two lists must be sorted (in LC_ALL=C order).
If you use mli2 on unsorted lists, you will get unmerged results.
If you use mli2 on sorted but non-uniq’d lists, you will get sorted but non-uniq’d results.
morph
Basically morph generates insertion rules for the most frequent chains of characters from the dictionary that you provide and that, per position.
— Dictionary = Wordlist used for frequency analysis.
— Depth = Determines what “top” chains that you want. For example 10 would give you the top 10 (in fact, it seems to start with value 0 so that 10 would give the top 11).
— Width = Max length of the chain. With 3 for example, you will get up to 3 rules per line for the most frequent 3 letter chains.
— pos_min = Minimum position where the insertion rule will be generated. For example 5 would mean that it will make rule to insert the string only from position 5 and up.
-pos_max = Maximum position where the insertion rule will be generated. For example 10 would mean that it will make rule to insert the string so that it’s end finishes at a maximum of position 10.
permute
This program is a stand-alone implementation of the Permutation Attack.
It has no parameters to configure.
Each word going into STDIN is parsed and run through “The Countdown QuickPerm Algorithm” by Phillip Paul Fuchs ( see: https://permuteweb.tchs.info (Internet Archive)
See Permutation Attack for examples.
permute_exist
prepare
This program is made as an dictionary optimizer for the Permutation Attack.
Due to the nature of the permutation algorithm itself, the input words “BCA” and “CAB” would produce exactly the same password candidates.
The best way to sort out these “dupes” is to reconstruct the input word reordered by the ASCII value of each char of the word: