# Check Android Architecture
$ adb shell getprop | grep abi
# Try to use this command to get simple output :)
$ adb shell getprop ro.product.cpu.abi
# List all application already installed
$ adb shell pm list packages -f | grep -i 'testing'
# Tracing log on android
$ adb logcat | grep com.app.testing
# Install application to device
$ adb install app.testing.apk
# Get the full path of an application
$ adb shell pm path com.example.someapp
# Upload File to development machine
$ adb push frida-server /data/local/tmp/
# Download the apk to development machine
$ adb pull /data/app/com.example.someapp-2.apk
# Dump activity on app
$ adb shell dumpsys activity top | grep ACTIVITY
# Create new file in adb shell
$ cat > filename.xml
You can add lines to a text files using:
$ cat >> filename.xml
Both commands can be terminated using ctrl-D.
# Dump Memory
$ adb shell dumpsys meminfo com.package.name
# Disable verification adb
$ adb shell settings put global verifier_verify_adb_installs 0
# Disable verification package
$ adb shell settings put global package_verifier_enable 0
# Connect Frida to an iPad over USB and list running processes
$ frida-ps -U
# List running applications
$ frida-ps -Ua
# List installed applications
$ frida-ps -Uai
# Connect Frida to the specific device
$ frida-ps -D 0216027d1d6d3a03
# Trace recv* and send* APIs in Safari
$ frida-trace -i "recv*" -i "send*" Safari
# Trace ObjC method calls in Safari
$ frida-trace -m "-[NSView drawRect:]" Safari
# Launch SnapChat on your iPhone and trace crypto API calls
$ frida-trace -U -f com.app.testing -I "libcommonCrypto*"
#Frida trace every open function while program start
$ frida-trace -U -i open com.app.testing
$ java -jar FridaAndroidTracer.jar
-a,--expand-array expand array values
-c,--classes <arg> classes to be hooked
-j,--jars <arg> jar files to be included
-o,--output <arg> output script path
-p,--include-private include private methods
-s,--skip <arg> methods to be skipped
Frida Trick
Bypass Root Detection:
Bypass anti-root detection in android application try to using different data type to break the logic flaws.
Running Objection with script objection --gadget "com.application.id" explore --startup-script antiroot.js
Inject Frida Gadget into APK with Objection objection patchapk --source apkname.apk
After run application, the application will be paused and show the white screen at this moment you should run objection explore to resume the application.
AndBug - For Enumerate Class And Method On Application
$ unzip open_gapps-x86_64******.zip 'Core/*'
$ rm Core/setup*
$ lzip -d Core/*.lz
$ for f in $(ls Core/*.tar); do
tar -x --strip-components 2 -f $f
done
This command for run emulator from android studio, make you have already install android studio before.
if you want to root android emulator, please using system without (Google API's) or (Google Play)
# List all emulator
$ emulator.exe -list-avds
# Run Emulator
$ emulator.exe -avd [EmulatorName]
Download https://github.com/linkedin/qark
For quick analyze application on android with scanning the apk or java file and create Proof Of Concept of vulnerability.
Install QARK:
$ git clone https://github.com/linkedin/qark
$ cd qark
$ pip install -r requirements.txt
$ pip install . --user # --user is only needed if not using a virtualenv
$ qark --help
SCREEN MIRRORING ANDROID DEVICE TO LAPTOP OR COMPUTER
I believe you want to mirroring android screen to your laptop or computer, you can buy a software to do that or you can use this tool SCRCPY for free :D
请发表评论