Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Root detection methodology in android which cannot be bypassed

I know that running an app which possess sensitive information on a rooted device is not secure at all. So developers usually do root detection in such cases and if the device is found rooted,then that app won't get installed. everything is ok.

The major techniques used by developers in root detection are checking for the superuser.apk file,check for chainfire,busybox,executing su command,etc. But an attacker can simply bypass these checks by several means like renaming the superuser.apk to superuser0.apk.

So what I am looking for is a unique solution for this issue where the root detection checks cannot be bypassed by attacker. Please share your views even if such a solution doesn't exists. Because the solutions from you guys might help in atleast hardening the code of root detection.

like image 833
Anonymous Platypus Avatar asked Dec 04 '14 10:12

Anonymous Platypus


People also ask

What is root detection bypass?

When a user attempts to install an application, it generates an error message and refuses to allow the application to be installed on a rooted device. During the root bypass, we make changes to the code that prevent the application from closing, resulting in the running of the application on a rooted Android device.

What is the safest way to root Android?

Fone-Root is the best app for rooting and unrooting your device without voiding the warranty. If you want systemless rooting that allows apps that rely on Android SafetNet to continue working, consider Magisk Manager. In case you want to install a custom ROM after rooting, try Odin.

What is root bypass vulnerability?

29 July, 2022. Appknox has announced two new features today – Root Detection Bypass and Jailbreak Detection Bypass. Through these features, Appknox users can identify if Root Detection has been implemented correctly in the Android applications and bypass it while running Appknox's Dynamic & API Scans.

How do I prevent apps from detecting root?

In Settings, tap on the Configure DenyList option. Now, select the app for which you want to hide root detection. In our case, we're hiding it for Google Pay. Finally, clear the data of the app that you've just selected.


2 Answers

There is an opensource library called rootbeer and a sample app which performs the following checks to detect root.

  • CheckRootManagementApps
  • CheckPotentiallyDangerousAppss
  • CheckRootCloakingApps
  • CheckTestKeys
  • checkForDangerousProps
  • checkForBusyBoxBinary
  • checkForSuBinary
  • checkSuExists
  • checkForRWSystem
like image 94
Dheeraj Vepakomma Avatar answered Sep 25 '22 23:09

Dheeraj Vepakomma


There is not "the single solution" as far as I know but you will need to check for the most common things. The following article is also useful: https://blog.netspi.com/android-root-detection-techniques/

And here are some tips ... also what you should not do: Determine if running on a rooted device

like image 34
Carsten Avatar answered Sep 22 '22 23:09

Carsten