Skip to content

Instantly share code, notes, and snippets.

@sheran
Created August 28, 2020 06:32
Show Gist options
  • Save sheran/949b66587b0bd63eb8781b62bd040c49 to your computer and use it in GitHub Desktop.
Save sheran/949b66587b0bd63eb8781b62bd040c49 to your computer and use it in GitHub Desktop.
Shell script to find out if an APK file uses Android SafetyNet Attestation
#!/bin/zsh
for apk in *.apk; do
unzip -q $apk "classes*.dex"
for dex in *.dex; do
gg=`dextra -M $dex |grep "attest\t"|cut -f5 -d":"|grep Task|xargs|cut -f1 -d" "`
if [ ${#gg} -gt 0 ]; then echo "$apk,$dex,$gg"; fi
rm $dex
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment