hashcat Forum
Creating Custom Password List - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Misc (https://hashcat.net/forum/forum-15.html)
+--- Forum: General Talk (https://hashcat.net/forum/forum-33.html)
+--- Thread: Creating Custom Password List (/thread-8741.html)



Creating Custom Password List - slawson - 10-23-2019

Hopefully it is ok to ask this question here, but here it is.

I am trying to create a custom password list.  The routers I am testing have a default password that uses the last 10 of LAN MAC.  It just so happens that the value of the last two digits of the LAN MAC is one less hex value than the WLAN MAC.

For example.

WLAN MAC is 112233445566, therefore I know the default WiFi password is going to be 2233445565.  

Another example
WLAN MAC is 112233abcdef, so the WiFi password will be 2233abcdee.

Of course the tricky one would be

WLAN MAC of 112233abcde0 therefore the WiFi password will be 2233abcddf

In Linux: I can easily cut digits 3-12, but is there any way to decrease the last two digits by one hex value?


RE: Creating Custom Password List - Mem5 - 10-23-2019

(10-23-2019, 10:48 PM)slawson Wrote: is there any way to decrease the last two digits by one hex value?
I would build an array and walk through it.


RE: Creating Custom Password List - slawson - 10-23-2019

Never done that before, I'll see what I can find online. Thanks.


RE: Creating Custom Password List - Kryczek - 10-24-2019

For example with Bash:

$ for WLAN_MAC in 112233445566 112233abcdef 112233abcde0; do ETH_MAC=`printf '%x' $(( 0x$WLAN_MAC - 1 ))`; echo $ETH_MAC | cut -c 3-; done
2233445565
2233abcdee
2233abcddf

What routers work like that? That's seriously terrible Smile


RE: Creating Custom Password List - slawson - 10-24-2019

Awesome. That's exactly what I was looking for. Thank you.

Since I have the MACs in a file this was my command:

for WLAN_MAC in $(cat macs.txt); do ETH_MAC=`printf '%x' $(( 0x$WLAN_MAC - 1 ))`; echo $ETH_MAC | cut -c 3-; done > macpasswords.txt

Would you mind explaining what the '%x' is there for in the printf syntax?


RE: Creating Custom Password List - Mem5 - 10-24-2019

%x tells printf to print the variable in lower-case hexadecimal, to be able then to decrease the value by 1.


RE: Creating Custom Password List - slawson - 10-25-2019

Thanks for the info. This little project worked wonderfully.