NVidia CUDA for Bruteforce Attacks - DefCamp 2012

download NVidia CUDA for Bruteforce Attacks - DefCamp 2012

of 16

  • date post

  • Category


  • view

  • download


Embed Size (px)



Transcript of NVidia CUDA for Bruteforce Attacks - DefCamp 2012

  • 1. History Ian Buck, Dir. of GPU Computing, received hisPhD from Stanford for his research on GPPM in2004 Started working for Nvidia to commercializeGPU computing First start was in 2006, Nvidia released CUDA v1.0 for G80 In spring 2008, CUDA 2.0 was released togetherwith GT200

2. About With CUDA, normal applications can beported to GPU for higher performance No low level or 3D programmingknowledge required, CUDA works with C 3. CPU vs GPU A CPU core can execute 4 32-bit instructions perclock, whilst a GPU can execute 3200 32-bitinstructions per clock A CPU is designed primarily to be an executiveand make decisions A GPU is different, it has a large number ofALUs(Arithmetic/Logic Units), a lot more than aCPU. 4. Structure In CUDA, you are required to specify thenumber of blocks and threads in eachblock. One block can contain up to 512 threads. Each thread on each block is executedseparately. 5. Structure 6. Syntax Key parts: Identifying a GPU function (__global__,__device__) Calling a GPU function, specifying numberof blocks and threads per blockfunction(param); 7. Syntax CPU Code: Calling function: 8. Syntax GPU Code: Calling function: 9. Bruteforce As a lot of information is processed at thesame time, parallel programming has abig impact on bruteforce Number of tries increases drastically on aGPU than on a CPU 10. Examples Lets say we have a password to break,and the only thing we know is it haslength=3 A simple bruteforce would be: 11. Examples A GPU bruteforce: Called like this: 12. Examples A more efficient GPU bruteforce: Called like this: 13. Real Life Lets say we have an MD5 and a wordlistof 1.000.000 words A simple bruteforce would be: 14. Real Life A GPU bruteforce would be: Called like this: threadIdx.x+blockIdx.x*blockDim.x is the threadID (ranging from 1 to 1.000.000) 2000*500=1.000.000 threads