mirror of
https://github.com/RfidResearchGroup/miLazyCracker.git
synced 2026-05-12 11:20:09 -07:00
use a patch instead of local changes
sooooooooooo lazy
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -2,18 +2,17 @@
|
||||
Mifare Classic Plus - Hardnested Attack Implementation for SCL3711 LibNFC USB reader
|
||||
|
||||
This tool is comprised of work from:
|
||||
- Aram Verstegen (https://github.com/aczid/crypto1_bs)
|
||||
|
||||
Aram Verstegen (https://github.com/aczid/crypto1_bs)
|
||||
- Carlo Meijer and Roel Verdult: (http://www.cs.ru.nl/~rverdult/Ciphertext-only_Cryptanalysis_on_Hardened_Mifare_Classic_Cards-CCS_2015.pdf)
|
||||
|
||||
Carlo Meijer and Roel Verdult: (http://www.cs.ru.nl/~rverdult/Ciphertext-only_Cryptanalysis_on_Hardened_Mifare_Classic_Cards-CCS_2015.pdf)
|
||||
- Iceman Proxmark Branch: https://github.com/iceman1001/proxmark
|
||||
|
||||
Iceman Proxmark Branch: https://github.com/iceman1001/proxmark
|
||||
- Piwi Proxmark Branch - https://github.com/pwpiwi/proxmark3/tree/hard_nested
|
||||
|
||||
Piwi Proxmark Branch - https://github.com/pwpiwi/proxmark3/tree/hard_nested
|
||||
- Blahpost Solver
|
||||
|
||||
Blahpost Solver
|
||||
- MFOC - https://github.com/nfc-tools/mfoc
|
||||
|
||||
MFOC - https://github.com/nfc-tools/mfoc
|
||||
|
||||
MFCUK - https://github.com/nfc-tools/mfcuk
|
||||
- MFCUK - https://github.com/nfc-tools/mfcuk
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,71 @@
|
||||
#!/bin/bash
|
||||
|
||||
mfoc -O /tmp/asdf1234zxcvqwerlkjh0978.mfd
|
||||
mfocResult=$?
|
||||
prngNotVulnerable=9
|
||||
keepTrying=1
|
||||
foundKeysForMFOC=" "
|
||||
|
||||
while [ $keepTrying -eq 1 ]
|
||||
do
|
||||
#echo "MFOC result: $mfocResult"
|
||||
if [ "$mfocResult" == "$prngNotVulnerable" ];then
|
||||
echo "MFOC not possible, detected hardened Mifare Classic"
|
||||
if [ "$mfocResult" -eq 9 ];then
|
||||
FILENAME="/tmp/unknownMfocSectorInfo_123456asdfqwer.txt"
|
||||
count=0
|
||||
while read LINE
|
||||
do
|
||||
let count++
|
||||
#echo "$count $LINE"
|
||||
done < $FILENAME
|
||||
|
||||
arr=(`echo $LINE | tr ';' ' '`)
|
||||
#echo ${arr[0]}
|
||||
#echo ${arr[1]}
|
||||
#echo ${arr[2]}
|
||||
#echo ${arr[3]}
|
||||
#echo ${arr[4]}
|
||||
|
||||
knownKey=${arr[0]}
|
||||
knownSectorNum=${arr[1]}
|
||||
knownKeyLetter=${arr[2]}
|
||||
unknownSectorNum=${arr[3]}
|
||||
unknownKeyLetter=${arr[4]}
|
||||
knownBlockNum=$(($knownSectorNum * 4))
|
||||
unknownBlockNum=$(($unknownSectorNum * 4))
|
||||
echo "Trying HardNested Attack..."
|
||||
mycmd=(libnfc_crypto1_crack "$knownKey" "$knownBlockNum" "$knownKeyLetter" "$unknownBlockNum" "$unknownKeyLetter")
|
||||
echo "${mycmd[@]}"
|
||||
"${mycmd[@]}"
|
||||
else
|
||||
echo "mfoc returned: $mfocResult"
|
||||
keepTrying=0
|
||||
fi
|
||||
|
||||
cryptoCrackResult=$?
|
||||
if [ "$cryptoCrackResult" -eq 0 ];then
|
||||
FILENAME="/tmp/foundKey_Crapto1_Libnfc_1234567890qwerasdf.txt"
|
||||
while read LINE
|
||||
do
|
||||
echo "$LINE"
|
||||
done < $FILENAME
|
||||
|
||||
#arr=(`echo $LINE | tr ';' ' '`)
|
||||
#echo ${arr[0]}
|
||||
#echo ${arr[1]}
|
||||
#echo ${arr[2]}
|
||||
#foundKeysForMFOC="$foundKeysForMFOC-k ${arr[0]} "
|
||||
mycmd=(mfoc -f "$FILENAME" -O /tmp/asdf1234zxcvqwerlkjh0978.mfd)
|
||||
echo "${mycmd[@]}"
|
||||
"${mycmd[@]}"
|
||||
mfocResult=$?
|
||||
fi
|
||||
else
|
||||
keepTrying=0
|
||||
fi
|
||||
done
|
||||
|
||||
rm -rf /tmp/asdf1234zxcvqwerlkjh0978.mfd
|
||||
rm -rf /tmp/foundKey_Crapto1_Libnfc_1234567890qwerasdf.txt
|
||||
rm -rf /tmp/unknownMfocSectorInfo_123456asdfqwer.txt
|
||||
@@ -0,0 +1,26 @@
|
||||
#run this from inside miLazyCracker git repo
|
||||
|
||||
sudo apt-get install git
|
||||
sudo apt-get install libnfc-bin
|
||||
sudo apt-get install autoconf
|
||||
sudo apt-get install libnfc-dev
|
||||
|
||||
#install MFOC
|
||||
git clone https://github.com/nfc-tools/mfoc.git
|
||||
cd mfoc
|
||||
cp ../mfoc.c src/ #copy in modified mfoc.c
|
||||
sudo autoreconf -vfi
|
||||
./configure
|
||||
sudo make
|
||||
sudo make install
|
||||
|
||||
cd ..
|
||||
|
||||
#install Hardnested Attack Tool
|
||||
git clone https://github.com/aczid/crypto1_bs
|
||||
cd crypto1_bs
|
||||
cp ../libnfc_crypto1_crack.c . #copy in modified .c
|
||||
make get_craptev1
|
||||
make get_crapto1
|
||||
make
|
||||
sudo cp libnfc_crypto1_crack /usr/bin
|
||||
Reference in New Issue
Block a user