CPU can crack the password but GPU can't
#1
Hi.
I have problem on Hybrid attack mode (-a 6). When i try to crack an md5crypt hash with -a 6, Hashcat can't crack the password using only GPU. But if i force to use only CPU (-D 1) with the same attack mode, it cracks the password without any problem.

The command i use:
hashcat hash.txt -m 500 -a 6 word.txt ?d?d

hash.txt content:
root:$1$XX$.XXXXXXXXXXXXXXXXg1KQ0:0:0:root:/root/:/bin/psh

word.txt content:
testpsw
XXXXXXXXXXpav


The correct password is XXXXXXXXXXpav33, but hashcat can't crack it using only GPU. I also tried replacing the lines. It tries the correct password, but can't crack it:


Code:
Candidate.Engine.: Device Generator
Candidates.#1....: testpsw33 -> XXXXXXXXXXpav33


If i force to use only CPU, it cracks without any problem:


Code:
hashcat hash.txt -m 500 -a 6 word.txt ?d?d -D 1

$1$XX$.XXXXXXXXXXXXXXXXg1KQ0:XXXXXXXXXXpav33


Another interesting thing is, when i add any character to the testpsw (for example testtpsw), it cracks the password on GPU too. So when there is another line in the word.txt file which is 7 characters long, it fails to crack. When its length lower than 7 or higher than 7, it cracks the password on GPU too.

Hashcat version info
Code:
hashcat -I
hashcat (v6.2.6) starting in backend information mode

OpenCL Info:
============

OpenCL Platform ID #1
  Vendor..: Intel(R) Corporation
  Name....: Intel(R) OpenCL HD Graphics
  Version.: OpenCL 3.0

  Backend Device ID #1
    Type...........: GPU
    Vendor.ID......: 8
    Vendor.........: Intel(R) Corporation
    Name...........: Intel(R) UHD Graphics
    Version........: OpenCL 3.0 NEO
    Processor(s)...: 80
    Clock..........: 1300
    Memory.Total...: 3146 MB (limited to 786 MB allocatable in one block)
    Memory.Free....: 1536 MB
    Local.Memory...: 64 KB
    OpenCL.Version.: OpenCL C 1.2
    Driver.Version.: 31.0.101.3959

OpenCL Platform ID #2
  Vendor..: Intel(R) Corporation
  Name....: Intel(R) OpenCL
  Version.: OpenCL 3.0 WINDOWS

  Backend Device ID #2
    Type...........: CPU
    Vendor.ID......: 8
    Vendor.........: Intel(R) Corporation
    Name...........: 12th Gen Intel(R) Core(TM) i5-1240P
    Version........: OpenCL 3.0 (Build 0)
    Processor(s)...: 16
    Clock..........: 0
    Memory.Total...: 7865 MB (limited to 1966 MB allocatable in one block)
    Memory.Free....: 3900 MB
    Local.Memory...: 256 KB
    OpenCL.Version.: OpenCL C 3.0
    Driver.Version.: 2025.19.3.0.17_230222

I tried the same attack mode with the same files (which fails to crack on Hashcat) on John the Ripper using only GPU (format=md5crypt-opencl), it cracks without any problem.
Reply
#2
You don't have  a "real" GPU, you have an integrated CPU/GPU

These integrated Intel CPU/GPU opencl drivers are known to be broken, (at least for the GPU part) first they are old, see this line for your GPU part

OpenCL.Version.: OpenCL C 1.2

Second, there is no difference in speed for integrated CPU/GPU, so clamp hashcat to use the CPU opencl driver

OpenCL.Version.: OpenCL C 3.0
Reply
#3
(04-08-2025, 04:47 PM)Snoopy Wrote: Second, there is no difference in speed for integrated CPU/GPU, so clamp hashcat to use the CPU opencl driver

When using pure kernels, CPU is faster than GPU. But when using optimized kernels with -O, GPU is faster than CPU.

Test results for an md5crypt hash:

hashcat test.txt -m 500 -a 3 ?a?a?a?a?a?a -D 1 -O
Time.Estimated...: Wed Jun 25 18:50:58 2025 (77 days, 21 hours)

hashcat test.txt -m 500 -a 3 ?a?a?a?a?a?a -D 2 -O
Time.Estimated...: Sat Apr 19 16:00:15 2025 (10 days, 18 hours)


hashcat test.txt -m 500 -a 3 ?a?a?a?a?a?a -D 1
Time.Estimated...: Wed Aug 06 15:34:27 2025 (119 days, 18 hours)

hashcat test.txt -m 500 -a 3 ?a?a?a?a?a?a -D 2
Time.Estimated...: Tue Apr 13 08:02:16 2027 (2 years, 4 days)
Reply
#4
please show output of

hashcat -b -m0 -D1,2 -d1,2

i could remember wrong but i thought -D only works with -d and last time i checked on integrated CPU/GPU there was no difference in speed at all
Reply
#5
(04-09-2025, 04:37 PM)Snoopy Wrote: please show output of

hashcat -b -m0 -D1,2 -d1,2

i could remember wrong but i thought -D only works with -d and last time i checked on integrated CPU/GPU there was no difference in speed at all

Code:
hashcat -b -m0 -D1,2 -d1,2
hashcat (v6.2.6) starting in benchmark mode

Benchmarking uses hand-optimized kernel code by default.
You can use it in your cracking session by setting the -O option.
Note: Using optimized kernel code limits the maximum supported password length.
To disable the optimized kernel code in benchmark mode, use the -w option.

OpenCL API (OpenCL 3.0 ) - Platform #1 [Intel(R) Corporation]
=============================================================
* Device #1: Intel(R) UHD Graphics, 1536/3146 MB (786 MB allocatable), 80MCU

OpenCL API (OpenCL 3.0 WINDOWS) - Platform #2 [Intel(R) Corporation]
====================================================================
* Device #2: 12th Gen Intel(R) Core(TM) i5-1240P, 3900/7865 MB (1966 MB allocatable), 16MCU

Benchmark relevant options:
===========================
* --backend-devices=1,2
* --opencl-device-types=1,2
* --optimized-kernel-enable

-------------------
* Hash-Mode 0 (MD5)
-------------------

Speed.#1.........:  1526.9 MH/s (50.47ms) @ Accel:32 Loops:256 Thr:128 Vec:4
Speed.#2.........:  388.9 MH/s (10.87ms) @ Accel:1024 Loops:256 Thr:1 Vec:8
Speed.#*.........:  1915.8 MH/s

Started: Fri Apr 11 01:58:43 2025
Stopped: Fri Apr 11 01:58:55 2025
Reply