The application is a PoC that helps in identifying modern bankers, potentially malicious and remote controlling applications abusing Android AccessibilityService.

Overview

Motivation

Project aims to help in:

  • identifying keyloggers and events hijacking malicious applications such as Anubis/TeaBot,
  • identifying a "fake bank consultant scenario" when a victim is requested to install a remote control application and then log in to a bank account,
  • identifying other suspicious applications abusing Android AccessibilityService mechanisms

The methods implemented in RemoteDetector class should not be considered as a comprehensive list of checks. It's a PoC that provides you a way to collect more pieces of information about potentially suspicious applications and implement propper checks. However, some of the presented checks may be highly effective in your environments.

Furthermore, you may want to implement your custom checks to outpace bad actors.

Demos

Anubis Detection

DemoAnubisPoC.mp4

Remote Control App Detection

DemoTeamViewerPoC.mp4

Description

The project aims to provide a way to detect when an Android device might be controlled or some events hijacked/keylogged. The application is a PoC that helps in identifying modern bankers such as Anubis/TeaBot, potentially malicious and remote controlling applications abusing Android AccessibilityService.

Modern banker apps abuse AccessibilityService that was created to assist users with disabilities in using Android devices and apps. They run in the background and receive callbacks by the system when AccessibilityEvents are fired. Such events denote some state transition in the user interface, for example, the focus has changed, a button has been clicked, etc.

RemoteDetector Java class allows to:

  • list suspicious applications (configurable by a list of packages)
  • list installed applications with suspicious AccessibilityService capabilities
  • list applications with enabled AccessibilityService which uses suspicious capabilities
  • list applications that uses suspicious ports (PoC currently works for Android < 10)
  • list suspicious applications installed in last 15minutes
  • list suspicious applications that installTime is similar to AccessibilityService package installTime (if different packages)

Usage

Example usage can be found in MainActivity class. Specifically, the following code performs checks if a suspicious application was installed in last 15minutes and is currently enabled as AccessibilityService:

Set<String> appsWithSuspiciousASvcsEnabled = remoteDetector.getSuspiciousAccessibilityServicesEnabled();
Set<String> appsInstalledInLastQuarter = remoteDetector.getAvailabilityServicesInstalledInLastQuarter();
Set<String> appsWithCorrelatedInstallTimesWithSuspiciousApps = remoteDetector.getAppsWithCorrelatedInstallTimesWithSuspiciousApps();

if (Sets.intersection(
                Sets.intersection(appsWithSuspiciousASvcsEnabled, appsInstalledInLastQuarter),
                appsWithCorrelatedInstallTimesWithSuspiciousApps).size() > 0) {
            Log.d(logTag, "Recently installed and enabled suspicious AccessibilityService!");
        }

Another example that may aid with detection malicious application that can draw over other apps:

Set<String> accessibilityServicesPermittedToOverlay = remoteDetector.getAccessibilityServicesPermittedToOverlay();
Set<String> appsWithSuspiciousASvcsSettings = remoteDetector.getAccessibilityServicesWithSuspiciousSettingsInstalled();

if (Sets.intersection(
                Sets.intersection(remoteDetector.getAccessibilityServiceIDsEnabled(), appsWithSuspiciousASvcsSettings),
                accessibilityServicesPermittedToOverlay)
                .size() > 0) {
            Log.d(logTag, "Suspicious AccessibilityService enabled and can draw over apps");
            ((Switch) findViewById(R.id.switch31)).setChecked(true);
        }

List of detectable remote control application can be configured via /res/raw/appconfigs.json file

More methods can be found in "RemoteDetector" class.

Details

The RemoteDetector uses information provided by Android API, especially by AccessiblityManager and PackageManager.

AccessibilityServices currently enabled on a device can be listed via getEnabledAccessibilityServiceList.

To obtain capabilities used by AccessibilityServices getCapabilities method is used. For example, to verify if a service can perform gestures, the following code returns true:

if ((svc.getCapabilities() & CAPABILITY_CAN_PERFORM_GESTURES) != 0)
    return true;

Specific pieces of information about suspicious applications are obtained from PackageManager class.

To draw over application the SYSTEM_ALERT_WINDOW is commonly utilised by malicious applications.

Documentation

Code contains document comments, especially in RemoteDetector class.

Credits to

All Android malware analytics publishing their researches, especially for:

You might also like...
ICSx⁵ is an Android app to subscribe to remote or local iCalendar files (like time tables of your school/university or event files of your sports team).

ICSx⁵ ICSx⁵ is an Android app to subscribe to remote Webcal feeds / iCalendar files (like time tables of your school/university or event files of your

PortalController - A rudimentary TeamViewer-like remote control app for Android, using ws.

PortalController A TeamViewer-like app for Android-to-Android remote control, using node.js and websockets (ws). Some insight The reason I call it rud

Usages of Factory Method for Data Source Layer (Local/Remote - Repository) with DI & MVVM [Android].

Usages of Factory Method for Data Source Layer (Local/Remote - Repository) with DI & MVVM [Android] Stacks: MVVVM DI (Hilt) Factory Method (Design Pat

Clean architecture dictionary app fetching remote data with local caching

ComposeDictionary Clean architecture dictionary app fetching remote data with local caching Installation Clone this repository and import into Android

This component allows you to interact with remote machine via SSH. You can execute commands or run scripts located on that machine

th2 act ssh (1.2.0) Overview Provides user with the ability to execute specified scripts or commands with the parameter he needs Custom resources for

Unicopy is an application for Android devices and helps users to copy useful special characters

Unicopy Android Application Unicopy is an application for Android 'Phone' Devices. This helps you to copy and paste some special and complicated Unico

WeatherApp is an Android application that helps you to get the forecast and temperature for specific locations
WeatherApp is an Android application that helps you to get the forecast and temperature for specific locations

WeatherApp2 WeatherApp is an Android application that helps you to get the forecast and temperature for specific locations , This app is based on the

Simple Application that helps individuals prioritize by directly comparing items in a list and ranking their importance to the individual

Analysis.Paralysis Simple Application that helps individuals prioritize by directly comparing items in a list and ranking their importance to them. Cu

M-OV-ies - An Android Application that helps users find where to stream their favorite movies

Stream-ON Video Demo: Description: Final Project for CS50 - 2021: An Android App

Releases(v1,0)
Owner
Krzysztof Pranczk
Software engineer and security researcher
Krzysztof Pranczk
STxMobile is a proof of concept of an Android app for remotely controlling the Raymarine ST2000+ tiller pilot from an Android phone.

STxMobile STxMobile is a proof of concept of an Android app for remotely controlling the Raymarine ST2000+ tiller pilot from an Android phone. The app

Marco 8 Sep 1, 2022
A dummy application used for POC for Future of Furniture application using AR serivces provided by Google.

Furture A dummy application used for POC for Future of Furniture application using AR serivces provided by Google. Demo video.mp4 Splash Home Sofa Cha

Kapil Yadav 8 Nov 28, 2022
Mobile application for Decentralized ML POC: Spotify Recommendation

Mobile application for Decentralized ML POC: Spotify Recommendation This repo co

Datax 1 Dec 29, 2021
Mobile application for Decentralized ML POC: Spotify Recommendation

Mobile application for Decentralized ML POC: Spotify Recommendation This repo contains mobile applications to perform training on Spotify listening hi

Morigin Network 0 Jan 14, 2022
Changelog - a android library, it helps developers display the history of changes in their applications

Changelog is a android library, it helps developers display the history of changes in their applications. Supports Locales, Layout direction

Amirhosein Barati 2 Aug 1, 2022
Movies-db-example - Sample Android application that loads movies data from a remote server

Movies Application Sample Android application that loads movies data from a remo

Bilal Ibrahim Hairab 0 Feb 8, 2022
Poc-sealed-secrets - An alternative to store sensitive data in the template Secrets Kubernetes an encrypted way

POC Sealed Secrets Overview Proof of concept with the objective of showing an al

Cainã Ferreira da Silva 2 Jan 28, 2022
PoC 결과 사내 발표 자료 - Choreography Saga Pattern (with SQS, SNS)

PoC-Choreography-Saga-Pattern-Kotlin PoC 및 사내 발표 자료 - Choreography Saga Pattern (with SQS, SNS) 아쉽게도 Multi-Module은 아니고.. 그냥 나눠져 있던 프로젝트들을 한 폴더로 합치기만 했

SeokHyun Kim 6 Dec 11, 2022
Environmental-Monitoring-Android-App - This Android App is used to monitor environmental parameters data from remote sensors

Environmental-Monitoring-Android-App - This Android App is used to monitor environmental parameters data from remote sensors. Parameters includes but not limited to temperature, humidity, air quality, level of Ionizing radiation, ...

Francisco Pascal Elias TAMBASAFIDY 0 Jan 4, 2022
remote technical interview Android challenge app

Android challenge We would like to learn more about how you approach a challenge as an Android Engineer. There is a simple app that isn’t made with be

GetYourGuide 0 Jan 9, 2023