Skip to content

Instantly share code, notes, and snippets.

@rodnt
Created June 28, 2022 22:55
Show Gist options
  • Save rodnt/ae8a44496854bffa30126ec422c710ef to your computer and use it in GitHub Desktop.
Save rodnt/ae8a44496854bffa30126ec422c710ef to your computer and use it in GitHub Desktop.
bash script to verify CVE-2017-13156
#!/bin/bash
me=`basename "$0"`
echo ":: verify CVE-2017-13156 ::"
echo ":: USAGE bash $me <filename_.apk> "
command -v apksigner >/dev/null 2>&1 || { echo >&2 "apksigner not in \$PATH. Aborting."; exit 1; }
command -v apktool >/dev/null 2>&1 || { echo >&2 "apktool not in \$PATH. Aborting."; exit 1; }
file=$1
echo "verifing signatures"
apksigner verify -verbose $file | head -50 | grep -i 'true'
echo "verify minsdk version"
apktool -f -s d $file
apk_name=$(basename $file .apk)
cat $apk_name/apktool.yml | grep -i minsdk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment