Showing posts with label OpenCL. Show all posts
Showing posts with label OpenCL. Show all posts

Monday, December 04, 2017

HOWTO : Install HashCat on Ubuntu 16.04.3

hashcat is the world's fastest and most advanced password recovery utility, supporting five unique modes of attack for over 200 highly-optimized hashing algorithms. hashcat currently supports CPUs, GPUs, and other hardware accelerators on Linux, Windows, and macOS, and has facilities to help enable distributed password cracking.




Step 1 :

sudo apt install ocl-icd-libopencl1 git build-essential

mkdir ~/infosec
cd infosec

git clone https://github.com/hashcat/hashcat
cd hashcat
git submodule update --init

make

cd ~/infosec
git clone https://github.com/hashcat/hashcat-utils
cd hashcat-utils/src

make

cp *.bin ../bin


Step 2 :

To crack WPA/WPA2 passphrase, convert cap to hccapx :

If using WAIDPS, copy the "cap" file to "~/infosec" :

cp /.SYWorks/Saved/Handshake_F92A673ED5C2_hihi_StrictFull.cap ~/infosec

cd ~/infosec
hachcat-utils/bin/cap2hccapx.bin Handshake_F92A673ED5C2_hihi_StrictFull.cap hihi.hccapx


If you are using Kali Linux 2017.3, "cap2hccapx.bin" is located at the following :

/usr/lib/hashcat-utils/cap2hccapx.bin

Step 3 :

The following are the example usgaes of hashcat to crack WPA/WPA2 passphrase:

To crack with rockyou dictionary :

cd ~/infosec/hashcat
./hashcat -m 2500 ~/infosec/hihi.hccapx ~/rockyou.txt


To crack up to 8 digits :

./hashcat -m 2500 ~/infosec/hihi.hccapx -a 3 ?d,?d?d?d?d?d?d?d?d --increment-min 1 --increment-max 8 --increment

To crack up to 8 characters for all available characters including space :

./hashcat -m 2500 ~/infosec/hihi.hccapx -a 3 ?a,?a?a?a?a?a?a?a?a --increment-min 1 --increment-max 8 --increment

To crack with rules and rockyou dictionary :

./hashcat -m 2500 -r rules/best64.rule ~/infosec/hihi.hccapx ~/rockyou.txt

The WPA/WPA2 crack on MacBook Pro (Retina Mid 2012 - NVIDIA GeForce GT 650M and Intel HD Graphics 4000) with hashcat required about half an hour for captioned first 2 examples. The third example requires over 305 years to complete on my MacBook Pro. The forth example requires 1 day and 13 hours to complete on my MacBook Pro.

Reference

How to Perform a Mask Attack Using hashcat

That's all! See you.


Sunday, March 10, 2013

HOWTO : BitCoin Mining with nVidia GeForce on Ubuntu Desktop 12.04 LTS and 12.10

What is BitCoin?

Bitcoin is an experimental new digital currency that enables instant payments to anyone, anywhere in the world. Bitcoin uses peer-to-peer technology to operate with no central authority: managing transactions and issuing money are carried out collectively by the network. Bitcoin is also the name of the open source software which enables the use of this currency.

BitCoin Mining Benchmark

I think it is not too late for BitCoin mining. I know that AMD Radeon display card is more faster than nVidia when doing BitCoin mining and hash cracking. There is a benchmark comparsion at here. However, I have two nVidia GeForce GTX590 display card and I have no fund to buy another system for the purpose.

To install Ubuntu Desktop on nVidia system, you need to add "nomodeset" as Linux kernel parameter.

Installation

(A) BitCoin Wallet

sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install bitcoin-qt bitcoind


(B) OpenCL

sudo apt-get install ocl-icd-libopencl1

Download nvidia-opencl-icd 195.36.31-6squeeze2
http://packages.debian.org/squeeze/nvidia-opencl-icd

Download nvidia-opencl-common 195.36.31-6squeeze2
http://packages.debian.org/squeeze/nvidia-opencl-common

Download libcuda1 195.36.31-6squeeze2
http://packages.debian.org/squeeze/libcuda1

Install them with the following command :

sudo dpkg -i *.deb

sudo apt-get install python-pyopencl python-pyopencl-headers python-wxgtk2.8 python-wxtools wx2.8-i18n python-bumpy python-netifaces

* nvidia-opencl-icd, nvidia-opencl-common and libcuda1 may be fixed in Ubuntu 13.04 and you are not required to download sperately

(C) nVidia driver

sudo apt-get install jockey-common

For Ubuntu 12.10 :

Please refer to here as the Ubuntu 12.10 have a minor bug for nVidia display driver as it lack of kernel headers for building the nvidia module.

(D) GUIMiner

GUIMiner download from https://github.com/Kiv/poclbm

sudo apt-get install git
git clone https://github.com/Kiv/poclbm.git


Edit the file ioutil.py to correct something :

cd poclbm
nano ioutil.py


To make it looking like the following at the beginning of the file :

from glob import glob
#from serial.tools import list_ports
import serial


To run the GUIMiner :

cd poclbm
python guiminer.py


(E) Bonus

(1) GUIMiner for Windows (All-in-One)

GUIMiner Advanced Setup download

(2) AMD APP SDK for AMD Radeon

AMD APP SDK

(3) Ufasoft Miner (bitcoin-miner for CPU)

bitcoin-miner
bitcoin-miner for Windows
bitcoin-miner (Source Code for Linux)

(4) GUIMiner (poclbm.py) Settings

For best performance but higher temperature -
nVidia GTX590 : -v -f0 -w128
nVidia GTX460 : -v -f0 -w128

For lower temperature but lesser performance -
nVidia GTX590 : -s0.01
nVidia GTX460 : -s0.01

e.g. Two GTX590 (a total of 4 CUDA devices) running setting of -s0.01 at room temperature (21 degree) under water cooling. The temperature of each CUDA devices is around 50 degree. The performance of each CUDA device is around 73 Mhash/s. The total performance is about 292 Mhash/s. If this box is running in room temperature in summer here (around 30-33 degree), the maximum temperature of CUDA device will be around 80 degree under water cooling condition.

The performance of BitCoin mining of this box is not good at all with the high price of the GTX590. I do not recommend to use nVidia display card for BitCoin mining and hash cracking.

* each entry for each CUDA device in GUIMiner

(5) BFGMiner for AMD Radeon/CPU/ASIC

Ubuntu PPA

(6) ASIC mining is the most fastest in the world so far

(7) Make sure you have backup your BitCoin (BTC) as it is either stored in the pool server or local machine.

That's all! See you.