日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > windows >内容正文

windows

在Windows上编译最新版本的Hashcat

發(fā)布時(shí)間:2024/9/5 windows 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 在Windows上编译最新版本的Hashcat 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

最新版本V5.0.0下載地址:

可執(zhí)行程序:https://hashcat.net/files/hashcat-5.0.0.7z

源代碼:https://hashcat.net/files/hashcat-5.0.0.tar.gz

開發(fā)版:github.com/hashcat/hashcat

GPU驅(qū)動要求:

  • AMD GPUs on Linux require “RadeonOpenCompute (ROCm)” Software Platform (1.6.180 or later)
  • AMD GPUs on Windows require “AMD Radeon Software Crimson Edition” (15.12 or later)
  • Intel CPUs require “OpenCL Runtime for Intel Core and Intel Xeon Processors” (16.1.1 or later)
  • Intel GPUs on Linux require “OpenCL 2.0 GPU Driver Package for Linux” (2.0 or later)
  • Intel GPUs on Windows require “OpenCL Driver for Intel Iris and Intel HD Graphics”
  • NVIDIA GPUs require “NVIDIA Driver” (367.x or later)

新特性(官方加粗顯示突出特性)

  • World’s fastest password cracker
  • World’s first and only in-kernel rule engine
  • Free (軟件可以免費(fèi)使用)
  • Open-Source (MIT License)? (程序源代碼公開)
  • Multi-OS (Linux, Windows and macOS)
  • Multi-Platform (CPU, GPU, DSP, FPGA, etc., everything that comes with an OpenCL runtime)
  • Multi-Hash (Cracking multiple hashes at the same time)
  • Multi-Devices (Utilizing multiple devices in same system)
  • Multi-Device-Types (Utilizing mixed device types in same system)
  • Supports password candidate brain functionality
  • Supports distributed cracking networks (using overlay) (支持分布式網(wǎng)絡(luò)離散破解)
  • Supports interactive pause / resume?? (交互式的暫停和重啟)
  • Supports sessions
  • Supports restore
  • Supports reading password candidates from file and stdin
  • Supports hex-salt and hex-charset
  • Supports automatic performance tuning? (自動化的性能調(diào)優(yōu))
  • Supports automatic keyspace ordering markov-chains
  • Built-in benchmarking system
  • Integrated thermal watchdog (完整的日志輸出流)
  • 200+ Hash-types?implemented with performance in mind
  • … and much more

wget https://hashcat.net/files/hashcat-5.0.0.tar.gz

或者git clone github.com/hashcat/hashcat? 下載源代碼。

一、下載編譯軟件Msys2

32位版本:http://repo.msys2.org/distrib/i686/msys2-i686-20180531.exe

64位版本:http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20180531.exe

配置軟件軟件源。

32位軟件安裝源頭:配置文件D:\msys64\etc\pacman.d\mirrorlist.mingw32內(nèi)容如下:

##
## 32-bit Mingw-w64 repository mirrorlist
##

## Primary
## msys2.org
Server = http://mirrors.ustc.edu.cn/msys2/mingw/i686/
Server = http://repo.msys2.org/mingw/i686/
Server = https://sourceforge.net/projects/msys2/files/REPOS/MINGW/i686/
Server = http://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/
Server = https://mirror.yandex.ru/mirrors/msys2/mingw/i686/

64位軟件安裝源頭:配置文件D:\msys64\etc\pacman.d\mirrorlist.mingw64內(nèi)容如下:

##
## 64-bit Mingw-w64 repository mirrorlist
##

## Primary
## msys2.org
Server = http://mirrors.ustc.edu.cn/msys2/mingw/x86_64/
Server = http://repo.msys2.org/mingw/x86_64/
Server = https://sourceforge.net/projects/msys2/files/REPOS/MINGW/x86_64/
Server = http://www2.futureware.at/~nickoe/msys2-mirror/mingw/x86_64/
Server = https://mirror.yandex.ru/mirrors/msys2/mingw/x86_64/

系統(tǒng)軟件安裝源:配置文件D:\msys64\etc\pacman.d\mirrorlist.mingw內(nèi)容如下:

##
## MSYS2 repository mirrorlist
##

## Primary
## msys2.org
Server = http://mirrors.ustc.edu.cn/msys2/msys/$arch/
Server = http://repo.msys2.org/msys/$arch/
Server = https://sourceforge.net/projects/msys2/files/REPOS/MSYS2/$arch/
Server = http://www2.futureware.at/~nickoe/msys2-mirror/msys/$arch/
Server = https://mirror.yandex.ru/mirrors/msys2/msys/$arch/

打開 mingw32.exe ,運(yùn)行以下命令。

pacman -Syu pacman -S mingw-w64-i686-gcc pacman -S make git patch pacman -S mingw-w64-i686-cmake pacman -S mingw-w64-i686-pkg-config

打開mingw64.exe,運(yùn)行以下命令。

pacman -Syu pacman -S mingw-w64-x86_64-gcc pacman -S mingw-w64-x86_64-cmake pacman -S mingw-w64-x86_64-pkg-config

二、編譯win-iconv

打開mingw32.exe,(編譯32位程序)

下載源代碼:git clone http://github.com/win-iconv/win-iconv

在hashcat\tools目錄下有兩個(gè)補(bǔ)丁文件win-iconv-32.diff和win-iconv-64.diff,分別對應(yīng)patch相對應(yīng)的32位和64位的Makefile。

#cd win-iconv

#patch <../hashcat/tools/win-iconv-32.diff

#make -j4

報(bào)錯(cuò)信息如下:

make:i686-w64-mingw32-ar:命令未找到
make: *** [Makefile:40:libiconv.a] 錯(cuò)誤 127

這是因?yàn)樵趍sys2中i686-w64-mingw32-ar這個(gè)命令不存在,正確的命令應(yīng)該是

i686-w64-mingw32-gcc-ar,

將makefile中的i686-w64-mingw32-ar改成i686-w64-mingw32-gcc-ar。

將i686-w64-mingw32-ranlib改成i686-w64-mingw32-gcc-ranlib。

i686-w64-mingw32-dlltool這個(gè)程序也不存在,我們可以通過Pacman的搜索功能來過濾這個(gè)程序所在的軟件包binutils,查看目前需要的32位版本是否安裝。

$ pacman -Ss binutils
mingw32/mingw-w64-i686-binutils 2.30-5 (mingw-w64-i686-toolchain) [已安裝: 2.31.1-2]
A set of programs to assemble and manipulate binary and object files (mingw-w64)
mingw64/mingw-w64-x86_64-binutils 2.30-5 (mingw-w64-x86_64-toolchain) [已安裝: 2.31.1-2]
A set of programs to assemble and manipulate binary and object files (mingw-w64)
msys/binutils 2.30-1 (msys2-devel)
A set of programs to assemble and manipulate binary and object files
msys/mingw-w64-cross-binutils 2.30-1 (mingw-w64-cross-toolchain mingw-w64-cross)
A set of programs to assemble and manipulate binary and object files

使用pacman -Ql mingw-w64-i686-binutils這個(gè)命令來查詢軟件包文件的路徑。

將Makefile中的i686-w64-mingw32-dlltool改成/mingw32/i686-w64-mingw32/bin/dlltool.exe,

將Makefile中prefix ?= /usr/bin改成prefix ?= /opt/win-iconv-32。

重新Make,編譯通過,然后使用make install命令安裝程序到指定目錄。

#cd ../hashcat

#make win32?? 編譯32位版本的Hashcat,編譯64位hashcat時(shí)請參考32編譯流程,本文將不再贅述。

運(yùn)行Hashcat使用GPU破解需要安裝相應(yīng)的顯卡驅(qū)動程序。

linux驅(qū)動下載地址:https://software.intel.com/en-us/articles/opencl-drivers#latest_linux_driver

Windows驅(qū)動下載地址:

A卡:http://support.amd.com/en-us/download/auto-detect-tool

N卡:https://www.nvidia.cn/Download/index.aspx?lang=cn

安裝驅(qū)動遇到的問題:https://hashcat.net/wiki/doku.php?id=frequently_asked_questions#how_does_one_install_the_correct_driver_for_the_gpu_s

使用方法參考:https://www.freebuf.com/sectool/164507.html

(1)字典攻擊

-a 0 password.lst

(2)1到8為數(shù)字掩碼攻擊

-a 3 --increment --increment-min 1--increment-max 8 ?d?d?d?d?d?d?d?d –O hashcat64 -a 3 --increment --increment-min 1 --increment-max 8 password.txt ?d?d?d?d?d?d?d?d -O --show

hashcat64 -a 3 –increment –increment-min 4 –increment-max 8 -o result.txt 00c66aaf5f2c3f49946f15c1ad2ea0d3 ?d?d?d?d?d?d?d?d -O

hashcat64 -a 3 –increment –increment-min 7 –increment-max 11 password.txt -o result.txt ?d?d?d?d?d?d?d?d?d?d?d?d -O

?d代表數(shù)字,可以換成小寫字母?l,大寫字母?u,特殊字符?s,大小寫字母+特殊字符?a,–O表示最優(yōu)化破解模式,可以加該參數(shù),也可以不加該參數(shù)。

(3)8為數(shù)字攻擊

-a 3 ?d?d?d?d?d?d?d?d

同理可以根據(jù)位數(shù)設(shè)置為字母大寫、小寫、特殊字符等模式。

(4)自定義字符

現(xiàn)在純數(shù)字或者純字母的密碼是比較少見的,根據(jù)密碼專家對泄漏密碼的分析,90%的個(gè)人密碼是字母和數(shù)字的組合,可以是自定義字符了來進(jìn)行暴力破解,Hashcat支持4個(gè)自定義字符集,分別是 -1 -2 -3 -4。定義時(shí)只需要這樣-2? ?l?d ,然后就可以在后面指定?2,?2表示小寫字母和數(shù)字。這時(shí)候要破解一個(gè)8位混合的小寫字母加數(shù)字:

Hashcat.exe?-a 3 –force -2 ?l?d? hassh值或者h(yuǎn)ash文件? ?2?2?2?2?2?2?2?2

例如破解dz小寫字母+數(shù)字混合8位密碼破解:

Hashcat -m 2611? -a 3?-2 ?l?d? dz.hash??? ?2?2?2?2?2?2?2?2

(5)字典+掩碼暴力破解

Hashcat還支持一種字典加暴力的破解方法,就是在字典前后再加上暴力的字符序列,比如在字典后面加上3為數(shù)字,這種密碼是很常見的。使用第六種攻擊模式:

?? a-6 (Hybrid dict + mask)

如果是在字典前面加則使用第7中攻擊模式也即( a-7 = Hybridmask + dict),下面對字典文件加數(shù)字123進(jìn)行破解:

H.exe -a 6 ffe1cb31eb084cd7a8dd1228c23617c8? password.lst??d?d?d

假如ffe1cb31eb084cd7a8dd1228c23617c8的密碼為password123,則只要password.lst包含123即可。

(6)掩碼+字典暴力破解

H.exe -a 7? ffe1cb31eb084cd7a8dd1228c23617c8? password.lst??d?d?d

假如ffe1cb31eb084cd7a8dd1228c23617c8的密碼為123password,則只要password.lst包含password即可。

(7)大小寫轉(zhuǎn)換攻擊,對password.lst中的單詞進(jìn)行大小寫轉(zhuǎn)換攻擊

H.exe-a 2? ffe1cb31eb084cd7a8dd1228c23617c8? password.lst

轉(zhuǎn)載于:https://www.cnblogs.com/heycomputer/articles/10298844.html

總結(jié)

以上是生活随笔為你收集整理的在Windows上编译最新版本的Hashcat的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。