All Projects → dxwu → Binderfilter

dxwu / Binderfilter

Licence: mit
A Linux kernel IPC firewall and logger for Android and Binder

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Binderfilter

Mylinux
myLinux is a small UNIX like OS for embedded systems based on Westermo NetBox
Stars: ✭ 53 (-24.29%)
Mutual labels:  kernel
Memstrack
A memory allocation tracer combined with stack trace.
Stars: ✭ 60 (-14.29%)
Mutual labels:  kernel
Shadow Box For Arm
Shadow-Box: Lightweight and Practical Kernel Protector for ARM (Presented at BlackHat Asia 2018)
Stars: ✭ 64 (-8.57%)
Mutual labels:  kernel
Turtlebot3
Autonomous delivery robot with turtlebot3 and Jetson TX2
Stars: ✭ 54 (-22.86%)
Mutual labels:  kernel
Cs140e
CS140e without Rust is not CS140e. Sergio Benitez plz come back.
Stars: ✭ 57 (-18.57%)
Mutual labels:  kernel
Sutekh
An example rootkit that gives a userland process root permissions
Stars: ✭ 62 (-11.43%)
Mutual labels:  kernel
Kendogridbinderex
This is a ModelBinder designed to consume an http request and build a json serializable object for the Kendo UI Grid datasource. AutoMapper is used to support mapping from ViewModel <> Entity.
Stars: ✭ 52 (-25.71%)
Mutual labels:  binder
Androidlearn
Android Custom Views
Stars: ✭ 66 (-5.71%)
Mutual labels:  binder
Jupyter Rise
Auto-launching the RISE plugin for Binder presentations.
Stars: ✭ 58 (-17.14%)
Mutual labels:  binder
Traceshark
This is a tool for Linux kernel ftrace and perf events visualization
Stars: ✭ 63 (-10%)
Mutual labels:  kernel
Skift
🥑 A simple, handmade, operating system with a graphical user interface.
Stars: ✭ 1,068 (+1425.71%)
Mutual labels:  kernel
Redshirt
🧑‍🔬 Operating system
Stars: ✭ 1,082 (+1445.71%)
Mutual labels:  kernel
Wnfun
WNF Utilities 4 Newbies (WNFUN)
Stars: ✭ 63 (-10%)
Mutual labels:  kernel
Pvekclean
Easily remove old/unused PVE kernels on your Proxmox VE system
Stars: ✭ 54 (-22.86%)
Mutual labels:  kernel
Simplefs
A simple file system for Linux kernel
Stars: ✭ 65 (-7.14%)
Mutual labels:  kernel
Dennix
Dennix is a unix-like hobbyist operating system written from scratch.
Stars: ✭ 53 (-24.29%)
Mutual labels:  kernel
Oneos
oneOS
Stars: ✭ 60 (-14.29%)
Mutual labels:  kernel
Linux
Armbian kernel mirrors
Stars: ✭ 66 (-5.71%)
Mutual labels:  kernel
Toaru Nih
NOTICE: The ToaruOS-NIH Project has been MERGED UPSTREAM. This repository is now archived.
Stars: ✭ 66 (-5.71%)
Mutual labels:  kernel
Binder
Binder metapackage for usage, docs, and chat
Stars: ✭ 63 (-10%)
Mutual labels:  binder

BinderFilter

BinderFilter is a Linux kernel message firewall for Android. It is written as a kernel driver that implements reading, blocking, and modifying Android IPC messages. Our BinderFilter kernel driver hooks Android Binder's kernel driver in /drivers/staging/android/binder.c.

Android's Binder IPC system completely mediates all inter-application messages, including requests by applications for private user data. We give users control and visibility over all such IPC messages, including dynamic permission blocking, with our open source BinderFilter project. This includes userland filtering, blocking, and logging of any IPC message in Android. Userland policy can be informed by the system's context, i.e. environmental data such as GPS location and wifi network, which addresses the current lack of native Android support for context-based security policies.

alt tag

Parsing

BinderFilter parses kernel IPC messages, which are often unencrpyted and assumed by applications to be secure - as demonstrated here. These messages include Intents sent to system services, and Intents to start new activities. An example IPC message from the GPS system service is shown below.

{(0)@(29)(0)android.content.IIntentSender(0)(0)(0)(1)(0)(255)(255)(255)(255)(0)(0)(255)(255)(255)(255)(0)(0)(255)(255)(255)(255)(255)(255)(255)(255)(0)(0)(0)(0)(0)(0)(0)(0)(254)(255)(255)(255)(224)(4)(0)BNDL(3)(0)8(0)com.google.android.location.internal.EXTRA_LOCATION_LIST(0)(0)(11)(0)(1)(0)(4)(0)(25)(0)android.location.Location(0)(7)(0)network(0)(192)(191)(187)(145)T(1)(0)@(165)R(132)\(0)(177)(237)(254)(194)(60)(218)(69)(64)(121)(189)(234)(183)(101)(18)(82)(192)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(0)(1)(0)u(19)(...}

The GPS coordinates of interest are re-cast below.

*(double*)({177,237,254,194,60,218,69,64}) = 43.704979
*(double*)({121,189,234,183,101,18,82,192}) = -72.287458

Documentation

See the wiki for documentation. For the writeup and slides, see http://binderfilter.org/.

Usage

See https://github.com/dxwu/BinderFilter/wiki/Usage

Setup

Because we hook an existing Linux driver, BinderFilter code requires a recompilation of the Linux source tree and flashing this new kernel onto an Android phone. We have tested and verified this method on a Google Nexus 7 (2013- flo). For development setup, see the related documentation. To install the pre-compiled kernel image:

  1. Root your Android phone

  2. Enable USB debugging

  3. Unlock bootloader

  4. Download fastboot and adb

  5. Connect your phone to the laptop with USB debugging enabled

adb reboot bootloader
fastboot flash boot ./resources/kernel-image.img
  1. Press start
  2. Phone will reboot, then install picky apk (adb install picky.apk) or the command line tools.

Cross-compiling for Android

This is a complex process. Please see "Compile linux kernel for android" in ./documentation/cross-compiling/cross_compiling.txt and https://github.com/dxwu/BinderFilter/wiki/Setup

Picky

Picky is the Android application that allows users to set firewall policy. See github.com/dxwu/Picky.

Presentations

This project has been presented at Summercon 2016 and Shmoocon 2017.

Contributors

This project started as a Senior Honors Thesis at Dartmouth College. Sergey Bratus advised and designed the project, and David Wu is the main contributer. Ionic Security has provided funding for testing phones and tablets.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].