Pages

Wednesday, April 16, 2014

Bruteforce dm-crypt using shell expansion

$ for a in {p,P}{a,A,4}{s,S,5}{s,S,5}; do echo $a|cryptsetup luksOpen /dev/sda5 $a && echo KEY FOUND: $a; done

Lost your luks passphrase? You can always bruteforce from the command line. See the sample output, a simple command for the "pass" word, using combinations of upper/lowercase or number replacement. The generated combinations are:


for a in {p,P}{a,A,4}{s,S,5}{s,S,5}; do echo $a; done


pass


pasS


pas5


paSs


paSS


paS5


...




commandlinefu.com


by David Winterbottom (codeinthehole.com)






from All commands http://ift.tt/1j1sXmS

No comments:

Post a Comment