Skip to main content

PASSCODE/PIN PROTECTION BYPASS



Hello Guys , today I'm gonna teach you  pass code /pin protection bypass in android application. that is applied in android application to authenticate in application.


1.WHAT IS PIN PROTECTION AND WHY IS APPLIED?
_____________________________________________________________________ ____________

Pin protection is 4 digit pin  that  implemented on android application start/resume activity  (on every start/resume activity  first pin activity started after supplying right pin user is authenticated).Pin Protection is applied to secure the account from unauthorized use. For Example: Someone finds your lost phone, or lost your phone and if phone is unlocked. then without pin protection that person access your any application and can do whatever he want.so  pin protection  a new layer of security in which application ask  4 digit pin to authenticate  user.


WHERE PIN PROTECTION IS APPLIED?
___________________________________________________________________________________________

pin protection is applied on application login screen . After inputting username and password pin protection is applied for future use.IF user  reopen the application then application only ask 4 digit pin to login into application.

BYPASS METHOD



CONDITION FOR BYPASSING:
_______________________________________________________________


Application running on rooted device or application backup enabled or application debug enabled 


Among three of them if one condition is true pin protection may be bypassed.



METHOD:1


1. If application back up enabled then you have to first create application backup 

            adb backup -f <backup-name.ab> <app-package-name>

2. after creating backup extract this backup by android-backup-extractor tool that you can download from  given below link.



3.After extracting backup their application package data shown like shared_prefs, database, file etc.
4. Go to shared_prefs and see in which xml file there any pin protection check is applied.
like

 <string name= "CLIENT_ONLY_PASSCODE"> </string>
<Boolean name="has_user_entered_pin" value="false" />

etc.


HERE two scenario comes.
_______________________________________________________________________________

First Scenario:

a. sometime application save all user details in plain text in shared_prefs  like token and pin.
so in backup you see  4 digit pin in plain text and easily login into account .

Second Scenario:

if an application saving all data (like access  token and pin in encrypted format). then do same process  that is  given above and edit that xml file in which pin_lock checks applied.

Simpy remove the checks and save and restore the backup and you see app is opened without pin.


METHOD:2:

1. if any application running on rooted device then simply connect by adb  and go to /data/data/package_name -> shared_prefs and remove the pin lock protection check from the xml file and save it . 

reopen the application . application is opened without pin.


METHOD:3:

if application debug is enabled then connect device by adb and run command 

adb shell

now run-as <package_name>  and remove the pin lock protection check from the xml file and save it . 


reopen the application . application is opened without pin




Comments

negativewives said…
This comment has been removed by the author.

Popular posts from this blog

Exploitation of Improper Export of Activities In Android Application

In android You know that every GUI interface is an  separate activity. An activity represents a single screen with a user interface just like window or frame of Java. In An application there are many activities depend on application functionalities. Let's take a example : An application that have   three modules login , register and   dashboard . For that there are there are three different activities for all these modules. What is export Means Here? In Android Application there is an attribute android: exported =true or false . This attribute is used in android   to provide an access to   other third party application to start their service , activities   and receive broadcast   messages. Like for an Example : If an application    have broadcast receiver to receive any events or message , if in that application exported attribute is set to true then this    broadcast message   can also receive by other thi...

Passcode Protection Bypass By Brute Forcing On zoho (Cliq Application)

First We discuss about what is passcode and Why it is Implemented in  Mobile Applications. PASSCODE Implemented in Mobile Application to protect Applications from an Unauthorized Access.like for example your cliq or any application account is logged in mobile phone .any your friend ask you to give phone , your friend try to open cliq application to see your message, but your friend cant open the application without entering passcode . he have to enter passcode for open, so it is an extra layer security in  applications. Passcode protection implemented in Android Application is an extra layer security to protect an unauthorized access. How Passcode Protection is bypassed by Bruteforcing? You know that passcode protection or pin protection in mobile applications have some attempt to enter passcode , if you enter  wrong passcode more than 5 times or 10 times based on application security , User logged out automatically and redirected to login page.but due to some ...

A New Way Of Brute force Passcode/Pin Protection By deep link

DESCRIPTION : AS you know already that what is passcode protection and why it is applied ? And how it is bypassed normally ? If you don’t know please read my previous blog:   https://negativewives.blogspot.com/2020/04/passcode-protection-bypass-by-brute.html                                                                                When any passcode protection is implemented first check any activity is exported or not ? Here we  only talking the scenario where no activity is exported in application   PROCEDURE : Open Application after implementing passcode protection. You see that passcode activity is launched first Go to AndroidMainfest.xml file and check launch mode of passcode activity . Question Arises in your mind   - ...