Configuration environment, development tools, test machine or virtual machine, adb
Unzip the apk file
Output certificate content keytool -printcert -file META-INF/CERT.RSA View the signature file content cat META-INF/CERT.SF View the certificate openssl pkcs7 -inform DER -in META-INF/CERT.RSA -noout -print_certs -text
Generate keystore keytool -genkey -alias demo.keystore -keyalg RSA -validity 40000 -keystore demo.keystore Re-sign the APK jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore demo.keystore -signedjar demo_signed.apk
Verify the APK signature jarsigner -verify -verbose demo_signed.apk
Integrated environment: Santoku (based on Ubuntu, integrating some mobile security tools)
drozer
Start drozer agent adb forward tcp:31415 tcp:31415 drozer console connect run app.package.list run app.package.list -f app namerun app.package.info -a package namerun app.activity.info -a package namerun app.provider.info -a package namerun app.service.info -a package namerun app.broadcast.info -a package namerun app.package.attacksurface package namerun app.activity.start --action *** --category *** --component ***
Writing the drozer module
java To dex javac -source 1.6 -target 1.6 Example.java #dx path: D:\AndroidSDK\build-tools\22.0.1\lib\dx.jar dx --dex --output=Example.dex Example.class dex file format dex file parsing: #dexdump path: D:\AndroidSDK\build-tools\22.0.1\dexdump dexdump Example.dex dx --dex --verbose-dump --dump-to=outfile.txt Example.class dex To smali baksmali.jar Example.dex -o out smali To dex smali.jar out -o out.dex dex2java dex2jar Example.dex jd-gui NDK so library objdump -D ×××.so gdbserver+gdb