Created
May 25, 2022 10:45
-
-
Save konstruktoid/0639dc55e0ca4409c5c1e9b4033b8da5 to your computer and use it in GitHub Desktop.
Brute force a VeraCrypt container when algorithms aren't known
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
#!/bin/bash | |
# So sorry it had to come to this, this is slow. | |
# Note that pim and keyfiles etc is static and needs to be modified if used. | |
# veracrypt --text --dismount --slot 1 | |
set -eu -o pipefail | |
CONTAINER="" | |
MOUNTDIR="" | |
WORDLIST="" | |
grep -v '^$' "${WORDLIST}" | while read -r PASSWORD; do | |
echo "Trying ${PASSWORD}" | |
if echo -n "${PASSWORD}" | veracrypt --text --stdin --mount "${CONTAINER}" "${MOUNTDIR}" --pim 0 --keyfiles "" --protect-hidden no --slot 1 --verbose --non-interactive 2>/dev/null; then | |
veracrypt --text --list | grep "${CONTAINER}" | |
echo | |
echo "RESULT: ${PASSWORD}" | |
echo | |
exit 0 | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment