Skip to content
This repository has been archived by the owner on Oct 1, 2022. It is now read-only.

Latest commit

 

History

History

input_simulator

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Input Simulator

Input Simulator is a tool that can be used to simulate events like taps on the touch screen.

It has been used for our ARMageddon: Cache Attacks on Mobile Devices paper by Lipp, Gruss, Spreitzer, Maurice and Mangard that has been published at the Usenix Security Symposium 2016 and presented at Black Hat Europe 2016.

Table of content

Installation

The tool is shipped with a Makefile and can be compiled by running:

make

The tool can be installed on the host system:

make install

Dependencies

By default it uses the toolchains provided by the Android NDK if built for armv7 or armv8.

  • Android NDK - Android Native Development Kit (optional, for ARM builds)

Build Configuration

The build system makes use of several configuration files. The parameters can be adjusted by modifying the files accordingly or by passing them to make (make ARCH=x86). The most important properties are the following:

  • ARCH: Defines the target architecture.
    • x86 (default) - Support for i386 and x86_64
    • armv7 - Support for ARMv7
    • armv8 - Support for ARMv8
  • DEVICE_CONFIGURATION: Define which device you are using to enable device specific code.

If the library is build for the ARMv7 or the ARMv8 architecture the build system uses the config-arm.mk or config-arm64.mk configuration file. By default the build system makes use of the toolchains provided by the Android NDK, thus its possible that the installation path of the NDK needs to be modified:

  • ANDROID_NDK_PATH: Path to the installation of the Android NDK.
    • /opt/android-ndk (default)
  • ANDROID_PLATFORM: Defines the used Android platform that is used.
    • android-21 (default)

If you prefer to use a different toolchain/compiler, feel free to change CC and other properties accordingly.

Usage

input-simulator [OPTIONS] <letter>

The following options are available:

  • -r, -repititions

    How often the event should be triggered. -1 means infinite repititions.

  • -d, -delay

    The delay between each triggered event.

  • -h, -help

    Show the help information.

Customization

This code needs to be customized to suite your needs. While we provide the mapping for the keyboards of three devices, they might do not match the keyboard and the device you use. Thus, you need to modify or extend the source code in key-mapping.c and simulator.c.

License

Licensed under the zlib license.

References