Binder Trace: a tool for intercepting and parsing Android Binder messages Prakash, 5, June 20235, June 2023 TABLE OF CONTENTS1 Binder Trace2 ⚙️ Installation3 Arguments4 ▶️ Starting binder trace5 ⌨️ Controls6 🔎 Filtering6.1 About The Author6.1.1 Prakash6.2 RelatedBinder TraceBinder Trace is a tool for intercepting and parsing Android Binder messages. Think of it as “Wireshark for Binder”.⚙️ InstallationYou’ll need a rooted Android device or emulator.(Linux only) – install xclip or xsel for “copy to clipboard” functionalitysudo apt-get install xclipsudo apt-get install xselClone the repo and install python dependenciespip install -r binder_trace/requirements.txtCheck which version of frida is installed (make sure you’ve pip installed the requirements)pip list | grep fridaDownload the matching version of frida-server from the frida releases pageMake sure adb is running as root, push frida-server to your device and run itadb rootadb push frida-server /data/local/tmpchmod u+x /data/local/tmp/frida-serveradb shell /data/local/tmp/frida-serverArgumentsArgumentDescription-hPrints the argument help.-d DEVICEThe device to attach to e.g. “emulator-5554”. Use adb devices to list available devices. If not provided defaults to the USB device.-p PIDThe pid of the process on DEVICE to attach to.-n NAMEThe name of the process on DEVICE to attach to e.g. “Messaging”.-s STRUCTPATHThe path to the directory of structure files.▶️ Starting binder traceTo start binder trace we need to pick a device and process to attach to. In the following example we use adb and frida-ps to identify a process to attach to on a local emulator. As it’s an Android 11 emulator we choose the Android 11 structs directory. Pick the struct directory that most closely matches your version of Android. If you would like structures for a different version of Android, please let us know. Once it’s running start using the target app to generate some binder transactions.> adb devices List of devices attached emulator-5554 device > frida-ps -Ua PID Name Identifier ---- ------------- ---------------------------- 8334 Messaging com.android.messaging 7941 Phone com.android.dialer 9607 Settings com.android.settings > cd binder_trace > python -m binder_trace -d emulator-5554 -n Messaging -s ../structs/android11 ⌨️ ControlsKeyActionupMove updownMove downshift + upPage upshift + downPage downhomeGo to topendGo to bottomtabNext paneshift + tabPrevious panectrl + cCopy pane to clipboardfOpen filter optionshOpen helpqQuit🔎 FilteringIf you’re interested in specific messages you can filter the displayed results with the following options.Interface – limit results to interfaces that contain the case sensitive search string e.g. “com.android” or “Sms”.Method – limit results to function names containing the specified case sensitive string.Type – Limit results to certain types of messages e.g. requests or responses.Once you’ve entered your filter options just press Enter to apply them.DownloadAlso Read:Reportly: is an AzureAD user activity report tool.The Best Kali Linux Tools for Ethical HackersPentestGPT: A GPT-empowered penetration testing toolCan Linux Be Hacked? Debunking the Myths and FactsAbout The Author Prakash See author's posts Related Hacking Linux Best Ethical Hacking Toolslinux tools
Hacking The 6 Best Programming language for hacking 27, June 202312, September 2023The world of hacking has become a source of immense curiosity and excitement in today’s digital landscape. Programming language play an important part in executing advanced hacking tactics behind the scenes of cybersecurity and penetration testing. This article looks into the world of hacking programming languages, analyzing their distinct characteristics,… Read More
Cyber Security 10 Best Troubleshooting Commands to Use in Linux 26, March 202326, March 2023Troubleshooting commands in Linux are a set of commands that can help you identify and troubleshoot any issues with your system. These commands provide detailed information about the system’s hardware, software, and configuration. They can also be used to diagnose problems with applications or services running on the system. By… Read More
Hacks Advance Linux terminal commands for The Power users 11, July 202211, July 2022One of the aspects of being a power user is to do even the simplest GUI-based tasks from the terminal. While this may seem like an unnecessary complication for some tasks, it is actually good practice to do even the simplest things from the terminal. This allows you to become… Read More