Invalid mask length followed by segmentation fault
#1
Hello all, I am new to hashcat and ran directly into trouble Smile

I am running Debian 11.4
Tried the included 6.1.1 version, the 6.2.5 binary, the 6.2.5 self compiled and git cloned latest.

It also does not matter if use the CPU or the GPU

called with hashcat -a 3 -m 10400 -D 2

hashcat (v6.1.1) starting...

/usr/share/hashcat/OpenCL/m10400_a3-optimized.cl: Pure kernel not found, falling back to optimized kernel
* Device #1: WARNING! Kernel exec timeout is not disabled.
            This may cause "CL_OUT_OF_RESOURCES" or related errors.
            To disable the timeout, see: https://hashcat.net/q/timeoutpatch
* Device #2: WARNING! Kernel exec timeout is not disabled.
            This may cause "CL_OUT_OF_RESOURCES" or related errors.
            To disable the timeout, see: https://hashcat.net/q/timeoutpatch
CUDA API (CUDA 11.4)
====================
* Device #1: NVIDIA GeForce RTX 3070, 6311/7974 MB, 46MCU

OpenCL API (OpenCL 3.0 CUDA 11.4.231) - Platform #1 [NVIDIA Corporation]
========================================================================
* Device #2: NVIDIA GeForce RTX 3070, skipped

OpenCL API (OpenCL 1.2 pocl 1.6, None+Asserts, LLVM 9.0.1, RELOC, SLEEF, DISTRO, POCL_DEBUG) - Platform #2 [The pocl project]
=============================================================================================================================
* Device #3: pthread-AMD Ryzen 7 3700X 8-Core Processor, skipped


...

ends up in:

Quote:Invalid mask length.

O�<��hԹ��mask '�g^u�H
        �.֚B]U�E��m��)ei3|Dձ+^�yW��I��@��Qn�s�)�Qm�)' because it is larger than the maximum password length.

Syntax error in mask: ���
                        ���A��q��s��
                                    �r��?��vgg�����E�G�-�%'����O�ۓ�F�&��Tdt�Q��gg�r/�.�K��%�ՉZ�������!�F�_��C�!���C}�����!m��Jl�a�Zo���Q�'�l���.�C�!�d��E�w}[��e53J�s[UbS8���;K�wq��r.>��;�/3oLB����JU�
                                                                    ��јE���D����Z�sL�n28h;#�]��r� �bqx
                                                                                                            �;��3>�y�.S�m��z�eD�CD8�.�_G)s�O4��Ic(9HR%���rh���j'�ob�4k�

Syntax error in mask: ��ƠU�"�Z�B�늷�2:�U�<�m��Pð���%�t
                                                      G� 4
                                                            ��`���������"��J99 ?�r<a

The wordlist or mask that you are using is too small.
This means that hashcat cannot use the full parallel power of your device(s).
Unless you supply more work, your cracking speed will drop.
For tips on supplying more work, see: https://hashcat.net/faq/morework

Approaching final keyspace - workload adjusted.         

Session..........: hashcat                               
Status...........: Exhausted
Hash.Mode........: 10400 (PDF 1.1 - 1.3 (Acrobat 2 - 4))
Hash.Target......: $pdf$1*2*40*-60*1*16*81e541e751de6bd733a82ea38386eb...ba1be7
Time.Started.....: Sat Jul 23 19:56:16 2022 (0 secs)
Time.Estimated...: Sat Jul 23 19:56:16 2022 (0 secs)
Kernel.Feature...: Optimized Kernel
Guess.Mask.......: �ä�y��K��>�w���܏��H [25]
Guess.Queue......: 595/1893 (31.43%)
Speed.#1.........:    3087 H/s (0.02ms) @ Accel:1024 Loops:1 Thr:32 Vec:1
Recovered.Total..: 0/1 (0.00%) Digests
Progress.........: 1/1 (100.00%)
Rejected.........: 0/1 (0.00%)
Restore.Point....: 1/1 (100.00%)
Restore.Sub.#1...: Salt:0 Amplifier:0-1 Iteration:0-1
Candidate.Engine.: Device Generator
Candidates.#1....: $HEX[a3c3a4e37917048304974bf2ee3e8f7780d01895dc8fc9d448] -> $HEX[a3c3a4e37917048304974bf2ee3e8f7780d01895dc8fc9d448]
Hardware.Mon.#1..: Temp: 47c Fan: 30% Util: 11% Core:1755MHz Mem:6800MHz Bus:16

Segmentation fault

any advice?
Reply
#2
What is the full command you gave it?
Reply
#3
(07-24-2022, 05:16 AM)cyberomak Wrote: What is the full command you gave it?

./hashcat -a 3 -m 10400 -D 2 '$pdf$1*2*40*-60*1*16*81e541e751de6bd733a82ea38386eb96*32*18c398bb7xxxxx496de999c518cf240fbd157616ce380cdb501e73cff9d3d4a8*32*9xxxxxxx729748bee8fdac2abxxxx2bcd65b3bedcxxxxxxa5a202309ba1be7' ../some_random_old.pdf

also tried without -D 2 and with addtional -O
it doesn't matter if run on GPU or CPU
Reply
#4
If you run the brute force attack mode, you need to give it something to use for characters and a length. This is done using a ? followed by the character to indicate if you want all lower case, all upper, numbers, special characters, or a combo. You also use one of these for each character. So, say you wanted to brute force a password eight characters long that used all options, in the command you would have to have: ?a?a?a?a?a?a?a?a. Here's the chart for the character list:

? | Charset
===+=========
l | abcdefghijklmnopqrstuvwxyz [a-z]
u | ABCDEFGHIJKLMNOPQRSTUVWXYZ [A-Z]
d | 0123456789 [0-9]
h | 0123456789abcdef [0-9a-f]
H | 0123456789ABCDEF [0-9A-F]
s | !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
a | ?l?u?d?s
b | 0x00 - 0xff

If you want to run a dictionary attack you would just use -a 0.
Reply
#5
(07-24-2022, 08:22 AM)Smirftsch Wrote:
(07-24-2022, 05:16 AM)cyberomak Wrote: What is the full command you gave it?

./hashcat -a 3 -m 10400 -D 2 '$pdf$1*2*40*-60*1*16*81e541e751de6bd733a82ea38386eb96*32*18c398bb7xxxxx496de999c518cf240fbd157616ce380cdb501e73cff9d3d4a8*32*9xxxxxxx729748bee8fdac2abxxxx2bcd65b3bedcxxxxxxa5a202309ba1be7' ../some_random_old.pdf

also tried without -D 2 and with addtional -O
it doesn't matter if run on GPU or CPU

This command means "use the contents of ../some_random_old.pdf as my mask definitions", which is almost certainly what you intended.
Reply