How to implement keyboard adjacent key insertion
#1
I am working on cracking a password where I know the user often uses keys that are adjacent on the keyboard (semi-random passwords).
I looked at how could implement this in hashcat using rules, and it looks like the building blocks are there to implement it, but I am missing the right combination of rules, perhaps because its not documented.

For example, using rules we can replace a character with another character, but not with two characters.
Otherwise I could replace 's' with 'sa','sw','se'. So replacements appear not to be an option.
I can also extract a character or range of characters to memory 'XNM' , and even insert it at any location ' XNMI'. However, what I cannot do, or at least I cannot find documentation on it, is to extract character(s) to memory and apply a shift or replacement to effectively change it to an adjacent key on the keyboard.
Based on the presence of these rules, I assume logic or modification on memorized strings should be possible or is in the planning. I can write my own code to make such replacements but I fear it would be slow down the process since I am targeting a fast hash (1 million passwords/second).

A last option I see is to use a keyboard walking tool to generate adjacent keys and convert them into an "insert two adjacent character rule". However, I would prefer a smarter function to be present in hashcat where a character saved to memory is used as input. Since it looks like hashcat has the possibility to do so, I would ask if anyone has done something similar or if this is something I should create a "Feature Request" for.
Reply


Messages In This Thread
How to implement keyboard adjacent key insertion - by monyanus - 02-01-2024, 04:50 PM