Уроки Юзим HashCat для херачивания хешей.


Бюджетный Бюджет

Уважаемый пользователь
Форумчанин
Регистрация
24.10.2022
Сообщения
25
Репутация
19
1668042543311.png

Я долгое время не был на форуме по причине того, что мой ноутбук помер.
Причина тому проста, я удалил английскую раскладку и не смог войти в систему XD.
Пока я пытаюсь установить BlackArch, пишу эту статью на свою компудахтере шиндос.
(Полностью важная информация.)


Здравствуйте! Сегодня будем изучать всякие аргументы для Hashcat и что это вообще такое.
Видюха встроенная, AMD Radeon RX Vega 11 Graphics.
CPU AMD Ryzen 5 2400G 3.60GHz.
ОЗУ 8ГБ (5ГБ доступно)
Windows 10 Pro 64.
Tabby.SH терминальчик.
HashCat v6.2.5

Качаем тут!

Жмяким hashcat.exe --help, получаем всякое страшное.


hashcat (v6.2.5) starting in help mode

Usage: hashcat [options]... hash|hashfile|hccapxfile [dictionary|mask|directory]...

- [ Options ] -

Options Short / Long | Type | Description | Example
================================+======+======================================================+=======================
-m, --hash-type | Num | Hash-type, references below (otherwise autodetect) | -m 1000
-a, --attack-mode | Num | Attack-mode, see references below | -a 3
-V, --version | | Print version |
-h, --help | | Print help |
--quiet | | Suppress output |
--hex-charset | | Assume charset is given in hex |
--hex-salt | | Assume salt is given in hex |
--hex-wordlist | | Assume words in wordlist are given in hex |
--force | | Ignore warnings |
--deprecated-check-disable | | Enable deprecated plugins |
--status | | Enable automatic update of the status screen |
--status-json | | Enable JSON format for status output |
--status-timer | Num | Sets seconds between status screen updates to X | --status-timer=1
--stdin-timeout-abort | Num | Abort if there is no input from stdin for X seconds | --stdin-timeout-abort=300
--machine-readable | | Display the status view in a machine-readable format |
--keep-guessing | | Keep guessing the hash after it has been cracked |
--self-test-disable | | Disable self-test functionality on startup |
--loopback | | Add new plains to induct directory |
--markov-hcstat2 | File | Specify hcstat2 file to use | --markov-hcstat2=my.hcstat2
--markov-disable | | Disables markov-chains, emulates classic brute-force |
--markov-classic | | Enables classic markov-chains, no per-position |
-t, --markov-threshold | Num | Threshold X when to stop accepting new markov-chains | -t 50
--runtime | Num | Abort session after X seconds of runtime | --runtime=10
--session | Str | Define specific session name | --session=mysession
--restore | | Restore session from --session |
--restore-disable | | Do not write restore file |
--restore-file-path | File | Specific path to restore file | --restore-file-path=x.restore
-o, --outfile | File | Define outfile for recovered hash | -o outfile.txt
--outfile-format | Str | Outfile format to use, separated with commas | --outfile-format=1,3
--outfile-autohex-disable | | Disable the use of $HEX[] in output plains |
--outfile-check-timer | Num | Sets seconds between outfile checks to X | --outfile-check=30
--wordlist-autohex-disable | | Disable the conversion of $HEX[] from the wordlist |
-p, --separator | Char | Separator char for hashlists and outfile | -p :
--stdout | | Do not crack a hash, instead print candidates only |
--show | | Compare hashlist with potfile; show cracked hashes |
--left | | Compare hashlist with potfile; show uncracked hashes |
--username | | Enable ignoring of usernames in hashfile |
--remove | | Enable removal of hashes once they are cracked |
--remove-timer | Num | Update input hash file each X seconds | --remove-timer=30
--potfile-disable | | Do not write potfile |
--potfile-path | File | Specific path to potfile | --potfile-path=my.pot
--encoding-from | Code | Force internal wordlist encoding from X | --encoding-from=iso-8859-15
--encoding-to | Code | Force internal wordlist encoding to X | --encoding-to=utf-32le
--debug-mode | Num | Defines the debug mode (hybrid only by using rules) | --debug-mode=4
--debug-file | File | Output file for debugging rules | --debug-file=good.log
--induction-dir | Dir | Specify the induction directory to use for loopback | --induction=inducts
--outfile-check-dir | Dir | Specify the outfile directory to monitor for plains | --outfile-check-dir=x
--logfile-disable | | Disable the logfile |
--hccapx-message-pair | Num | Load only message pairs from hccapx matching X | --hccapx-message-pair=2
--nonce-error-corrections | Num | The BF size range to replace AP's nonce last bytes | --nonce-error-corrections=16
--keyboard-layout-mapping | File | Keyboard layout mapping table for special hash-modes | --keyb=german.hckmap
--truecrypt-keyfiles | File | Keyfiles to use, separated with commas | --truecrypt-keyf=x.png
--veracrypt-keyfiles | File | Keyfiles to use, separated with commas | --veracrypt-keyf=x.txt
--veracrypt-pim-start | Num | VeraCrypt personal iterations multiplier start | --veracrypt-pim-start=450
--veracrypt-pim-stop | Num | VeraCrypt personal iterations multiplier stop | --veracrypt-pim-stop=500
-b, --benchmark | | Run benchmark of selected hash-modes |
--benchmark-all | | Run benchmark of all hash-modes (requires -b) |
--speed-only | | Return expected speed of the attack, then quit |
--progress-only | | Return ideal progress step size and time to process |
-c, --segment-size | Num | Sets size in MB to cache from the wordfile to X | -c 32
--bitmap-min | Num | Sets minimum bits allowed for bitmaps to X | --bitmap-min=24
--bitmap-max | Num | Sets maximum bits allowed for bitmaps to X | --bitmap-max=24
--cpu-affinity | Str | Locks to CPU devices, separated with commas | --cpu-affinity=1,2,3
--hook-threads | Num | Sets number of threads for a hook (per compute unit) | --hook-threads=8
--hash-info | | Show information for each hash-mode |
--example-hashes | | Alias of --hash-info |
--backend-ignore-cuda | | Do not try to open CUDA interface on startup |
--backend-ignore-opencl | | Do not try to open OpenCL interface on startup |
-I, --backend-info | | Show info about detected backend API devices | -I
-d, --backend-devices | Str | Backend devices to use, separated with commas | -d 1
-D, --opencl-device-types | Str | OpenCL device-types to use, separated with commas | -D 1
-O, --optimized-kernel-enable | | Enable optimized kernels (limits password length) |
-M, --multiply-accel-disable | | Disable multiply kernel-accel with processor count |
-w, --workload-profile | Num | Enable a specific workload profile, see pool below | -w 3
-n, --kernel-accel | Num | Manual workload tuning, set outerloop step size to X | -n 64
-u, --kernel-loops | Num | Manual workload tuning, set innerloop step size to X | -u 256
-T, --kernel-threads | Num | Manual workload tuning, set thread count to X | -T 64
--backend-vector-width | Num | Manually override backend vector-width to X | --backend-vector=4
--spin-damp | Num | Use CPU for device synchronization, in percent | --spin-damp=10
--hwmon-disable | | Disable temperature and fanspeed reads and triggers |
--hwmon-temp-abort | Num | Abort if temperature reaches X degrees Celsius | --hwmon-temp-abort=100
--scrypt-tmto | Num | Manually override TMTO value for scrypt to X | --scrypt-tmto=3
-s, --skip | Num | Skip X words from the start | -s 1000000
-l, --limit | Num | Limit X words from the start + skipped words | -l 1000000
--keyspace | | Show keyspace base:mod values and quit |
-j, --rule-left | Rule | Single rule applied to each word from left wordlist | -j 'c'
-k, --rule-right | Rule | Single rule applied to each word from right wordlist | -k '^-'
-r, --rules-file | File | Multiple rules applied to each word from wordlists | -r rules/best64.rule
-g, --generate-rules | Num | Generate X random rules | -g 10000
--generate-rules-func-min | Num | Force min X functions per rule |
--generate-rules-func-max | Num | Force max X functions per rule |
--generate-rules-func-sel | Str | Pool of rule operators valid for random rule engine | --generate-rules-func-sel=ioTlc
--generate-rules-seed | Num | Force RNG seed set to X |
-1, --custom-charset1 | CS | User-defined charset ?1 | -1 ?l?d?u
-2, --custom-charset2 | CS | User-defined charset ?2 | -2 ?l?d?s
-3, --custom-charset3 | CS | User-defined charset ?3 |
-4, --custom-charset4 | CS | User-defined charset ?4 |
--identify | | Shows all supported algorithms for input hashes | --identify my.hash
-i, --increment | | Enable mask increment mode |
--increment-min | Num | Start mask incrementing at X | --increment-min=4
--increment-max | Num | Stop mask incrementing at X | --increment-max=8
-S, --slow-candidates | | Enable slower (but advanced) candidate generators |
--brain-server | | Enable brain server |
--brain-server-timer | Num | Update the brain server dump each X seconds (min:60) | --brain-server-timer=300
-z, --brain-client | | Enable brain client, activates -S |
--brain-client-features | Num | Define brain client features, see below | --brain-client-features=3
--brain-host | Str | Brain server host (IP or domain) | --brain-host=127.0.0.1
--brain-port | Port | Brain server port | --brain-port=13743
--brain-password | Str | Brain server authentication password | --brain-password=bZfhCvGUSjRq
--brain-session | Hex | Overrides automatically calculated brain session | --brain-session=0x2ae611db
--brain-session-whitelist | Hex | Allow given sessions only, separated with commas | --brain-session-whitelist=0x2ae611db

[Это только аргументы!]

Смотрим чуть ниже, понимаем что тут нам нужно.
Attack- | Hash- |
Mode | Type | Example command
==================+=======+==================================================================
Wordlist | $P$ | hashcat -a 0 -m 400 example400.hash example.dict
Wordlist + Rules | MD5 | hashcat -a 0 -m 0 example0.hash example.dict -r rules/best64.rule
Brute-Force | MD5 | hashcat -a 3 -m 0 example0.hash ?a?a?a?a?a?a
Combinator | MD5 | hashcat -a 1 -m 0 example0.hash example.dict example.dict
Association | $1$ | hashcat -a 9 -m 500 example500.hash 1word.dict -r rules/best64.rule


-a, (--attack-mode) = Аттак моде.
0 | Straight - Атака по словарю.
1 | Combination - Этот режим позволяет добавлять каждое слово, содержащееся в списке слов, в конец каждого слова-контейнера во втором списке слов.
3 | Brute-force - Рандомит пароли. Удалили метод.
6 | Hybrid Wordlist + Mask - Словарь и перебор паролей.
7 | Hybrid Mask + Wordlist - Атака по маске - это усовершенствование атаки перебором, направленное на разработку "интеллектуальных" атак перебором, в которых пользователь имеет контроль над процессом генерации пароля-кандидата. Например, атака Mask позволяет пользователям задавать такие шаблоны, как заглавная буква только для первой позиции кандидата на пароль, или добавление даты в конце кандидата на пароль, или перед ним, и т.д. Режим 6 позволяет использовать гибридный список слов + маска, а режим 7 - гибридную маску + список слов.
(перевод с вики, ничего я не понял.)
9 | Association - ???

Где 2? А почему оно не по порядку? Там так написано.


-m, --hash-type - Вид хеша.
(Ломает она много чего, так что приведу только пару номеров.)
0 | MD5
100 | SHA1
1400 | SHA2-256
1700 | SHA2-512
17400 | SHA3-256
17600 | SHA3-512

Следом файл с хешем, а потом словарь. (Много такого на !)
Как мы видим, хелп в хешкете очень понятный.

Шифрую тут Md5.

5416d7cd6ef195a0f7622a9c56b55e84
Зашифрую это - 1q2w3e4r

У нас, как мы видим, есть список паролей для брута.
hashcat -a 0 -m 0 hash.hash brut.dict (Вид атаки ноль, Вид хеша MD5)
hash.hash - Файл с хешем.
brut.dict - Пароли всякие.



hashcat (v6.2.5) starting

ADL2_Overdrive_Caps(): -8

ADL2_Overdrive_Caps(): -8

ADL2_Overdrive_Caps(): -8

ADL2_Overdrive_Caps(): -8

ADL2_Overdrive_Caps(): -8

ADL2_Overdrive_Caps(): -8

ADL_Overdrive5_FanSpeed_Get(): -100

ADL_Overdrive5_Temperature_Get(): -100

OpenCL API (OpenCL 2.1 AMD-APP (3075.13)) - Platform #1 [Advanced Micro Devices, Inc.]
======================================================================================
* Device #1: AMD Radeon(TM) RX Vega 11 Graphics, 1824/4126 MB (883 MB allocatable), 11MCU

Minimum password length supported by kernel: 0
Maximum password length supported by kernel: 256

Hashes: 1 digests; 1 unique digests, 1 unique salts
Bitmaps: 16 bits, 65536 entries, 0x0000ffff mask, 262144 bytes, 5/13 rotates
Rules: 1

Optimizers applied:
* Zero-Byte
* Early-Skip
* Not-Salted
* Not-Iterated
* Single-Hash
* Single-Salt
* Raw-Hash

ATTENTION! Pure (unoptimized) backend kernels selected.
Pure kernels can crack longer passwords, but drastically reduce performance.
If you want to switch to optimized kernels, append -O to your commandline.
See the above message to find out about the exact limits.

Watchdog: Temperature abort trigger set to 90c

Host memory required for this attack: 141 MB

Dictionary cache built:
* Filename..: brut.dict
* Passwords.: 51
* Bytes.....: 456
* Keyspace..: 51
* Runtime...: 0 secs

The wordlist or mask that you are using is too small.
This means that hashcat cannot use the full parallel power of your device(s).
Unless you supply more work, your cracking speed will drop.
For tips on supplying more work, see:

Approaching final keyspace - workload adjusted.

5416d7cd6ef195a0f7622a9c56b55e84:1q2w3e4r

Session..........: hashcat
Status...........: Cracked
Hash.Mode........: 0 (MD5)
Hash.Target......: 5416d7cd6ef195a0f7622a9c56b55e84
Time.Started.....: Thu Nov 10 11:02:11 2022 (0 secs)
Time.Estimated...: Thu Nov 10 11:02:11 2022 (0 secs)
Kernel.Feature...: Pure Kernel
Guess.Base.......: File (brut.dict)
Guess.Queue......: 1/1 (100.00%)
Speed.#1.........: 12767 H/s (0.07ms) @ Accel:256 Loops:1 Thr:64 Vec:1
Recovered........: 1/1 (100.00%) Digests
Progress.........: 51/51 (100.00%)
Rejected.........: 0/51 (0.00%)
Restore.Point....: 0/51 (0.00%)
Restore.Sub.#1...: Salt:0 Amplifier:0-1 Iteration:0-1
Candidate.Engine.: Device Generator
Candidates.#1....: !QAZ2wsx -> zxcvbnm
Hardware.Mon.#1..: Util: 44% Core:1240MHz Mem:1067MHz Bus:16

Started: Thu Nov 10 11:01:52 2022
Stopped: Thu Nov 10 11:02:13 2022

Всё свидетельствует о том, что мы смогли взломать хеш. За пару секунд.
Status...........: Cracked
5416d7cd6ef195a0f7622a9c56b55e84:1q2w3e4r
1668046059275.png

1668046019039.png

Поздравляю вас!
 

MKII

Уважаемый пользователь
Форумчанин
Регистрация
03.10.2022
Сообщения
252
Репутация
175
Для мд5, можно не использовать лист с паролями, у него и так скорость бомбовая.
8 символов брутит меньше секунды.)
 

Бюджетный Бюджет

Уважаемый пользователь
Форумчанин
Регистрация
24.10.2022
Сообщения
25
Репутация
19

Бюджетный Бюджет

Уважаемый пользователь
Форумчанин
Регистрация
24.10.2022
Сообщения
25
Репутация
19

MKII

Уважаемый пользователь
Форумчанин
Регистрация
03.10.2022
Сообщения
252
Репутация
175

MKII

Уважаемый пользователь
Форумчанин
Регистрация
03.10.2022
Сообщения
252
Репутация
175

Бюджетный Бюджет

Уважаемый пользователь
Форумчанин
Регистрация
24.10.2022
Сообщения
25
Репутация
19
Это может занять много времени.
На сколько мне известно, там низкий хешрейт будет из за сложности.
Жду результаты.)
Только что попытался взломать свой пароль.
1668047971758.png

Time.Estimated...: Thu Dec 08 09:59:09 2022 (27 days, 22 hours)
Всё еще немного доволен.
 

MKII

Уважаемый пользователь
Форумчанин
Регистрация
03.10.2022
Сообщения
252
Репутация
175

Бюджетный Бюджет

Уважаемый пользователь
Форумчанин
Регистрация
24.10.2022
Сообщения
25
Репутация
19
Это радует.)
Но маловато для VC.
Использовал
hashcat -a 3 -m 0 -w 1 --opencl-device-types 2 hash.hash ?d?d?d?d?d?d?d?d?d?d?u?h?h?s
Нагрузка минимальная, не VC а просто пароль. Верочку буду после работки ломать, будни жеж сегодня.
 
Верх Низ