Frida

Frida is a powerful and extensible instrumentation toolkit – among its many strengths, it is ideally suited to testing and evaluating native Android apps. Frida allows you to intercept data received and sent by apps and inject your own code into the process. If you’ve had any experience with Dex2Jar, JD-GUI or Baksmali, you’ll soon appreciate Frida’s versatility. (if you haven’t, check out our article here [link to Dex2Jar article]

We’ll be running through a quick walkthrough to decompile an apk and inject some arbitrary code into the process.

Requirements:

  • Frida (pip install frida / npm install frida)
  • Frida Server (available at https://github.com/frida/frida/releases)
    • Make sure Frida-Server is the same version as your Frida install. To check this, simply execute ‘frida –version’
  • Dex2Jar
  • JD-GUI
  • adb (Available from the official Google repository – just google “platform-tools adb”
  • A rooted android phone or emulator running at least Android 4.4 (We used Nox Player 6 for this walkthrough)
  • A downloaded APK file (we’re using Sieve [com.mwr.example.sieve]) available from https://github.com/as0ler/Android-Examples/blob/master/sieve.apk

Let’s dive right in – ensure your Android device is plugged in and rooted with Developer options and USB Debugging enabled.

  1. Open a command window and find your connected Android device:

  2. Push Frida-server to your device using “adb push frida-server /data/local/tmp” – we’re placing the Frida-server in a temp directory for ease of use. Note: In the image below, I’m specifically sending to my MEmu emulator – if you’re using a normal phone, just the command above will be fine.

  3. Open a shell session to your device by executing ‘adb.exe shell,’ chmod your Frida-server so that it’s executable and run it!

    As you can see above, there’s no output from running Frida-server but rest assured that it’s listening in the background. We’re ready to start exploring (Read more...)

*** This is a Security Bloggers Network syndicated blog from InfoSec Resources authored by Rob Valentine. Read the original post at: http://feedproxy.google.com/~r/infosecResources/~3/g428IBSWGIs/

Recent Posts

NewDay Scores with TigerGraph Cloud to Fight Financial Fraud

Leading UK Credit Card Consumer Finance Company Uses Advanced Graph Analytics to Intercept Fraudulent Credit Card Applications, Boost Anti-Fraud Efforts…

18 mins ago

VMRay Closes $25 Million Series B

Digital+ Partners Leads Continuation Funding Round in Growing Automated Threat Analysis & Detection Provider, Closing its Series B Round at…

2 hours ago

The Hacker Mind Podcast: Hacking OpenWRT

For three years OpenWRT had a severe validation problem with its download package manager, until a fuzz tester found and…

2 hours ago

Goodbye to Flash – if you’re still running it, uninstall Flash Player now

It’s time to say a final “Goodbye” to Flash. (Or should that be “Good riddance”?) With earlier this week seeing…

3 hours ago

Being a Defender

1. Be a student of (information security, network security, cyber security). Always strive to know what the latest tactics, trends,…

3 hours ago

Smart DNS: Delivering the Best Subscriber Experience

This is the second in a series of blog posts that discuss how smart DNS resolvers can enhance ongoing network…

3 hours ago