Now, I don't know if you noticed it, but each time that I've successfully logged in, the new activity
contains a message saying that the device is routed.
So we can also bypass route detection mechanisms just by changing the source code.
You I see how you can do it.
This time, we're going to use the APIC lab extension for source code modification and signing.
So go to Visual Studio Code.
And to open the command pallette press command shift P or for Windows Control P.
Click on RPK Lab.
And the APK file of insecure bank.
Select decompiled Java as your option.
And look at that, it's decompiled now.
So it opens in a new window.
And here is the Java source code.
Open com and Android folder's.
So there's also assembly code under the assembly folder.
After the signing process, we'll need to change the family code to see the modifications in the RPK
file.
And won't change the post login activity.
So first off, let's have a look at the Java source code to understand exactly what this method does.
So there's a method that's called cheroot status and that returns a message based on whether the device
is routed or not.
And then looking at this method.
Do method's called does super user APIC exist and does S2 exist, and these are used to determine if
the device has been routed, the bypass route detection.
We can force a jump to always at device not rooted just by changing the conditional loop.
So let's open the assembly code and make the changes.
Search for connection to.
On line for 50, there's a conditional loop.
So it means that when, if not equal, jump to the device, not routed tag.
You follow mapping this to the previously decompiled job of files.
This is a loop where if two methods are true, then jump to route a device or else jump to device not
rooted.
So to force a jump to always at device not rooted, we can change the conditional loop into a go to
loop.
So first, we just need to disable this line.
So to make this line comment, just add a sharp character.
Then at a go to loop, to jump to condition to directly.
And don't forget to add a space after go to.
Now, save the changes.
All right, so we're ready to rebuild and reassign the APK file, so just right click on the AK toolbag,
why Amelle file and rebuild the APK file selected the option for Saul.
OK, so APK Lab is rebuilding.
Using RPK to.
I'm going to merge the emulator and Vaskov screens so that you can see it better.
And what you're looking at is a U.K. lab has signed a line and verify the APK file all in one step.
New APIC file is under the desk folder, so now we're ready to install the epic file to the device,
just make sure that you uninstall the old one before installing this new one.
So we'll go to the disk folder and.
Right.
Click on the new RPK file, install the APK.
OK, so the installation is successful.
Let's open the app.
Continue and OK.
Now log into the app with the default credentials.
And make sure that you can figure the server IP.
All right, click on Log in.
And yep, just like that, you can see that we see the device not routed message on the screen.
What does that mean?
We have bypass route detection mechanisms successfully.