1 oclHashcat build documentation
7 * Gabriele Gristina <<matrix@hashcat.net>>
8 * Christoph Heuwieser <<dropdead@hashcat.net>>
12 To compile **oclHashcat** the following third party libraries are required:
14 ADL_SDK v8.0 - http://developer.amd.com/tools-and-sdks/graphics-development/display-library-adl-sdk/
15 cuda v7.5 - https://developer.nvidia.com/cuda-downloads
16 GDK v352_55 - https://developer.nvidia.com/gpu-deployment-kit
17 NVIDIA Driver v352.21 - https://www.nvidia.com/download/driverResults.aspx/86390/en-us
18 NVAPI R352 - https://developer.nvidia.com/nvapi
19 AMD-APP-SDK v3.0 - http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/
21 To be able to compile the ocl binaries, it is required to have the latest stable driver from AMD installed.
22 (fglxr must be installed and initialized)
24 http://support.amd.com/
26 The next thing to do is download all the third party libraries listed above and put files into */opt/hashcat-deps/tmp* directory.
28 The following files are needed inside the */opt/hashcat-deps/tmp* directory:
33 NVIDIA-Linux-x86_64-352.21.run
34 gdk_linux_amd64_352_55_release.run
35 AMDAPPSDK-3.0-linux64.tar.bz2
37 Now just execute the following script to complete the installation of dependencies (check for an updated version in **docs/deps.sh**):
40 # Author: Gabriele Gristina <matrix@hashcat.net>
44 DEPS="make gcc-4.9 g++-4.9 gcc-4.9-multilib g++-4.9-multilib libc6-dev-i386 mingw-w64 build-essential unzip"
45 DOWNLOAD_DEPS="ADL_SDK8.zip R352-developer.zip cuda_7.5.18_linux.run NVIDIA-Linux-x86_64-352.21.run gdk_linux_amd64_352_55_release.run AMDAPPSDK-3.0-linux64.tar.bz2"
48 if [ $(id -u) -ne 0 ]; then
53 ## cleanup 'hashcat-deps' directories
54 rm -rf /opt/hashcat-deps/{adl-sdk,cuda-7.5,NVIDIA-Linux-x86_64-352.21,nvidia-gdk,amd-app-sdk} && \
55 mkdir -p /opt/hashcat-deps/{tmp,adl-sdk,cuda-7.5,NVIDIA-Linux-x86_64-352.21,nvidia-gdk,amd-app-sdk} && \
56 cd /opt/hashcat-deps/tmp
59 echo "! Cannot create hashcat-deps directories."
65 for d in ${DOWNLOAD_DEPS}; do
66 if [ ! -f "${d}" ]; then
67 echo "! ${d} not found."
72 if [ ${i} -gt 0 ]; then
73 echo "! Please download manually into the directory /opt/hashcat-deps/tmp"
77 ## installing needed packages
78 for pkg in ${DEPS}; do
79 apt-get -y install ${pkg}
81 echo "! failed to install ${pkg}"
87 unzip ADL_SDK8.zip -d /opt/hashcat-deps/adl-sdk-8
90 if [[ ${ret} -ne 0 ]] && [[ ${ret} -ne 1 ]]; then
91 echo "! failed to extract ADL SDK"
95 rm -rf /opt/hashcat-deps/adl-sdk && ln -s /opt/hashcat-deps/adl-sdk-8 /opt/hashcat-deps/adl-sdk
98 echo "! failed to setup ADL SDK link"
103 unzip R352-developer.zip -d /opt/hashcat-deps/
106 if [[ ${ret} -ne 0 ]] && [[ ${ret} -ne 1 ]]; then
107 echo "! failed to extract NVAPI"
112 chmod +x cuda_7.5.18_linux.run && \
113 ./cuda_7.5.18_linux.run -toolkit -silent -override --toolkitpath=/opt/hashcat-deps/cuda-7.5
115 if [ $? -ne 0 ]; then
116 echo "! failed to install CUDA SDK"
120 ## install NVIDIA Driver
121 chmod +x NVIDIA-Linux-x86_64-352.21.run && \
122 ./NVIDIA-Linux-x86_64-352.21.run -x && \
123 mv NVIDIA-Linux-x86_64-352.21 /opt/hashcat-deps/ && \
124 cd /opt/hashcat-deps/NVIDIA-Linux-x86_64-352.21 && \
125 ln -s libnvidia-ml.so.352.21 libnvidia-ml.so && \
126 ln -s libcuda.so.352.21 libcuda.so && \
128 ln -s libnvidia-ml.so.352.21 libnvidia-ml.so && \
129 ln -s libcuda.so.352.21 libcuda.so && \
130 cd /opt/hashcat-deps/tmp
132 if [ $? -ne 0 ]; then
133 echo "! failed to install NVIDIA Driver"
137 ## install NVIDIA GPU Deployment Kit
138 chmod +x gdk_linux_amd64_352_55_release.run && \
139 ./gdk_linux_amd64_352_55_release.run --silent --installdir=/opt/hashcat-deps/nvidia-gdk
141 if [ $? -ne 0 ]; then
142 echo "! failed to install NVIDIA GPU Deployment Kit"
146 ## extract AMD APP SDK
147 tar xjf AMDAPPSDK-3.0-linux64.tar.bz2 && \
148 ./AMD-APP-SDK-v3.0.130.135-GA-linux64.sh --noexec --target /opt/hashcat-deps/amd-app-sdk-v3.0.130.135
150 if [ $? -ne 0 ]; then
151 echo "! failed to extract AMD APP SDK"
155 rm -rf /opt/hashcat-deps/amd-app-sdk && ln -s /opt/hashcat-deps/amd-app-sdk-v3.0.130.135 /opt/hashcat-deps/amd-app-sdk
157 if [ $? -ne 0 ]; then
158 echo "! failed to setup ADL SDK link"
162 echo "> oclHashcat dependencies have been resolved."
164 # Building oclHashcat
165 First get a copy of **oclHashcat** repository
168 $ git clone https://github.com/hashcat/oclHashcat.git
171 Now simply jump in and type "make all"
179 - build only *Linux* binaries
183 - build only *Windows* binaries
187 - build only *AMD kernel* binaries
191 - build only *NVIDIA kernel* binaries
197 Enjoy your fresh **oclHashcat** binaries ;)