Last active
March 15, 2019 00:40
-
-
Save MauroEldritch/e1f04f1399c561c2683189be9d3e3dce to your computer and use it in GitHub Desktop.
Cracking Samba passwords with John the ripper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SAMBA_HASHES => hash.dat | |
#Output: | |
#user:{{SSHA}}$HASH | |
slapcat | awk 'BEGIN{uidFound=0};$1 ~ /^uid:/{uid=$2;uidFound=1};$1 ~ /^userPassword::/ | |
&& uidFound == 1{printf uid":";system("echo " $2 "|base64 -d"); print "";uidFound=0}; | |
$0 == ""{uidFound=0}' > hash.dat | |
john --incremental hash.dat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment