Skip to content

Instantly share code, notes, and snippets.

@tanaka-geek
Created January 31, 2021 22:12
Show Gist options
  • Save tanaka-geek/de58bb8dc3f58a709261eec3f6b7f3f9 to your computer and use it in GitHub Desktop.
Save tanaka-geek/de58bb8dc3f58a709261eec3f6b7f3f9 to your computer and use it in GitHub Desktop.
Copy the resultant of "Invoke_Kerberoast.ps1" to $1.txt and it will parse the text into crackable form for hashcat -a 0 -m 13100
#!/bin/bash
if [ $# -eq 0 ]
then
echo "Usage: ./tgsparse.sh hash.txt"
exit
fi
cat $1 | tr -d ' ' | grep -vP '(SamAccountName|DistinguishedName|ServicePrincipalName|TicketByteHexStream)' | grep -a -e '[^\ ]\{16,\}' | tr -d '\n' | sed -z 's/Hash:/\n\n/g' > "$1.parsed"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment