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 these files into the *deps/tmp* directory.
28 The following files are needed inside the *deps/tmp* directory:
33 NVIDIA-Linux-x86_64-352.21.run
34 gdk_linux_amd64_352_55_release.run
35 AMD-APP-SDKInstaller-v3.0.130.135-GA-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 g++ gcc-multilib g++-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 AMD-APP-SDKInstaller-v3.0.130.135-GA-linux64.tar.bz2"
47 ## enter the deps directory
48 cur_directory=$(dirname ${0})
49 script_directory=$(cd ${cur_directory} && pwd -P)
50 deps_dir=${script_directory}/../deps
52 mkdir -p ${deps_dir} # but it should already exist (is part of the repository)
55 ## cleanup the directories under the 'deps' folder
56 rm -rf {adl-sdk,cuda-7.5,NVIDIA-Linux-x86_64-352.21,nvidia-gdk,amd-app-sdk} && \
57 mkdir -p {tmp,adl-sdk,cuda-7.5,NVIDIA-Linux-x86_64-352.21,nvidia-gdk,amd-app-sdk} && \
61 echo "! Cannot create deps directories."
67 for d in ${DOWNLOAD_DEPS}; do
68 if [ ! -f "${d}" ]; then
69 echo "! ${d} not found."
74 if [ ${i} -gt 0 ]; then
75 echo "! Please manually download all the above dependencies to the deps/tmp/ directory"
79 ## installing needed packages
80 for pkg in ${DEPS}; do
82 # check if the package is already installed
83 dpkg -s ${pkg} &>/dev/null
86 if [ $(id -u) -ne 0 ]; then
87 echo "! Must be root to install the required package '${pkg}' with apt-get"
91 apt-get -y install ${pkg}
93 echo "! failed to install ${pkg}"
100 unzip ADL_SDK8.zip -d ${deps_dir}/adl-sdk-8
103 if [[ ${ret} -ne 0 ]] && [[ ${ret} -ne 1 ]]; then
104 echo "! failed to extract ADL SDK"
108 rm -rf ${deps_dir}/adl-sdk && ln -s ${deps_dir}/adl-sdk-8 ${deps_dir}/adl-sdk
110 if [ $? -ne 0 ]; then
111 echo "! failed to setup ADL SDK link"
116 unzip R352-developer.zip -d ${deps_dir}
119 if [[ ${ret} -ne 0 ]] && [[ ${ret} -ne 1 ]]; then
120 echo "! failed to extract NVAPI"
125 chmod +x cuda_7.5.18_linux.run && \
126 ./cuda_7.5.18_linux.run -toolkit -silent -override --toolkitpath=${deps_dir}/cuda-7.5
128 if [ $? -ne 0 ]; then
129 echo "! failed to install CUDA SDK"
133 ## install NVIDIA Driver
134 chmod +x NVIDIA-Linux-x86_64-352.21.run && \
135 ./NVIDIA-Linux-x86_64-352.21.run -x && \
136 mv NVIDIA-Linux-x86_64-352.21 ${deps_dir}/ && \
137 cd ${deps_dir}/NVIDIA-Linux-x86_64-352.21 && \
138 ln -s libnvidia-ml.so.352.21 libnvidia-ml.so && \
139 ln -s libcuda.so.352.21 libcuda.so && \
141 ln -s libnvidia-ml.so.352.21 libnvidia-ml.so && \
142 ln -s libcuda.so.352.21 libcuda.so && \
145 if [ $? -ne 0 ]; then
146 echo "! failed to install NVIDIA Driver"
150 ## install NVIDIA GPU Deployment Kit
151 chmod +x gdk_linux_amd64_352_55_release.run && \
152 ./gdk_linux_amd64_352_55_release.run --silent --installdir=${deps_dir}/nvidia-gdk
154 if [ $? -ne 0 ]; then
155 echo "! failed to install NVIDIA GPU Deployment Kit"
159 ## extract AMD APP SDK
160 tar xjf AMD-APP-SDKInstaller-v3.0.130.135-GA-linux64.tar.bz2 && \
161 ./AMD-APP-SDK-v3.0.130.135-GA-linux64.sh --noexec --target ${deps_dir}/amd-app-sdk-v3.0.130.135
163 if [ $? -ne 0 ]; then
164 echo "! failed to extract AMD APP SDK"
168 rm -rf ${deps_dir}/amd-app-sdk && ln -s ${deps_dir}/amd-app-sdk-v3.0.130.135 ${deps_dir}/amd-app-sdk
170 if [ $? -ne 0 ]; then
171 echo "! failed to setup ADL SDK link"
175 echo "> oclHashcat dependencies have been resolved."
177 # Building oclHashcat
178 First get a copy of **oclHashcat** repository
181 $ git clone https://github.com/hashcat/oclHashcat.git
184 Now simply jump in and type "make all"
192 - build only *Linux* binaries
196 - build only *Windows* binaries
200 - build only *AMD kernel* binaries
204 - build only *NVIDIA kernel* binaries
210 Enjoy your fresh **oclHashcat** binaries ;)