DES KPA printf output not as expected
#1
Hi

I'm working through the hash 14000 kernel and trying to understand how it's working. I'm using the following command with a single, fixed password just for testing.



Code:
del kernels\*.* /Q & hashcat -m 14000 <hash>:<pt> -a 3 -1 charsets/DES_full.hcchr --hex-charset 0123456789abcdef --potfile-disable --self-test-disable --force -n 1 -u 1 -T 1



From the kernel starting at line 2358 there is the following where the password guesses should be: 

https://github.com/hashcat/hashcat/blob/...a3-pure.cl



Code:
const u32 w0 = pws[gid].i[0];

const u32 w1 = pws[gid].i[1];





At line 2360 of the kernel I've inserted the following printf commands:



Code:
printf("PWD w0: %08x\n", w0);

printf("PWD w1: %08x\n", w1);



My expected output is the first 32 bits of the password in w0 and the last 32 in w1 for example


Code:
PWD w0: 67452301
PWD w1: efcdab89


However my observed output is the following:

Code:
PWD w0: 67000000
PWD w1: efcdab89





I'm unsure why 6 of the 8 bits of w0 aren't showing. The code does work correctly so I'm assuming it's a limitation of printf() or the way it is being outputted to the console. Changing the printf() to unsigned int results in the same so it's not a conversion issue. 

Any ideas why I am seeing this behaviour? Thanks
Reply


Messages In This Thread
DES KPA printf output not as expected - by Zzzz - 08-02-2021, 01:21 PM