Showing posts with label Android Pentesting. Show all posts
Showing posts with label Android Pentesting. Show all posts

Sunday, 24 August 2014

UrduSecurity Android Hacking

Hello Readers, Whats Up? Hope You all should be fine enough to read this tutorial. As in previous Article I said that i'll demonstrate that how to attack debuggable android applications. So This tutorial is about Finding and Attacking Debuggable Android Applications.

Before i start the procedure Let's collect the requirements.


and as in previous tutorial i told that Android Tamer Have all these tools so no need to be worry just start up your android tamer and if you don't have , get it now.

Checking For Vulnerable Apps

First of all we need to learn that how to check if an app is vulnerable or no. to check this we need to find either the app is debuggable or no. and how to do it? Here comes the Role of UrduSecurity

Just Download the vulnerable apk file from above given link and provide following command in your android tamer's terminal .
  • apktool d Vulnerable.apk

UrduSecurity Android Hacking

after You have done it, You have to Check AndroidManifest.xml File in order to see either the app is debuggable or no. Provide the Following Command to do that.
  • nano Vulnerable/AndroidManifest.xml
and if you see this Line there, android:debuggable="true" , viola This app is vulnerable and you can pentest it.

UrduSecurity Android Hacking

Exploiting the Vulnerable Application

Now that You've got a vulnerable android app, Let's exploit it. start up your android emulator and launch the application. your goal is to change the text Try Again into Hacked By [UrduSecurity]. but first we have to check dalvik vm ports listening on emulator. give following command.
  • adb jdwp
UrduSecurity Android Hacking


okay now we have to find on which port our Vulnerable.apk is listening which you can find again by running the app and enumeratng the ports. Let's assume the app is litening on 1180 port so let's forward to this port and attach our terminal to the app using jdb debugger.

UrduSecurity Android Hacking


Now Let's Check the classes and methods of Vulnerable.apk and as our main class is com.example.debug.MainActivity$1 so we'll be checking the Methods of that class also. see below.

UrduSecurity Android Hacking

Now We have to set a break point at onClick(android.view.View) method so that we can step through it and exploit the vulnerability by debugging the app.

  • stop in com.example.debug.MainActivity$1.onClick(android.view.View)
and then check the position where we are by entering locals in terminal. Finally we have to move next by using the keyword next. see below.

Please click on the app manually to re run the app as jdb don't provide this functionality here.

UrduSecurity Android Hacking

as in above figure , You have to step through all the steps untill you get the desired string, as we remember we have to replace Try Again with Hacked By UrduSecurity, so we found that string here. Now its time to step in the secret = "Try Again" String.

UrduSecurity Android Hacking

and finally its time to give command run , and you'll see that the app will automatically pop up our changed message that is: Hacked By [UrduSecurity]. 

UrduSecurity Android Hacking


Yahooooooo, we just hacked the app. We can do a lot of other intresting stuff like getting a remote shell on victim and so on which we'll show you in later tutorials. Hope You've enjoyed this tutorial.

References

  • infosecinstitute.com
  • androidtamer.com
  • oracle.com
  • askubuntu.com

Android Hacking: Hacking Debuggable Android Apps

By: Adeel Chaudhary on: 11:44

Saturday, 23 August 2014

android Hacking By UrduSecurity

Hello Fans, currently Busy with a lot of things and i got exams too so i'll be lazy in updating the blog, well let's start Android Hacking as its the hottest topic to be discussed these days. This tutorial is a simple walk through of Android, adb shell & other Android Pentesting tools an sources.

Let's start it , hope you'll enjoy these Articles.

Basically all the Android devices are based on Linux Platform so A HAcker Must be aware of Linux environment in order to Play with android pentesting. There is a famous Virtual Lab Named as "Android Tamer" you can directly Download it From the Below Site.

http://androidtamer.com

i strongly suggest this Lab because it contains almost many of the tools used for android pentesting and as Hacking also means to be in touch with open source so it contains all open source tools about android aswell and for other pentesting stuff too.


after you've got your android tamer Lab Live & working. Now its time to Start Pentesting.

Rooted android device will be always a core requirement for these tutorials.

Here Starts our first tutorial about playing with basic things in android with adb shell and getting information.

Enable USB Debugging Mode and Connect your android device with your android tamer Lab. Then do the same as shown in below screenshot.

android Hacking By UrduSecurity


if you've done it without any error , you should get a screen like this, that indicates that you got an adb shell on your android device.

android Hacking By UrduSecurity


Now that You are Connected with Your android device and Have a shell, Let's try to see the avaiable files there using "ls -l" command.



okay but till now we have only shell permissions, in order to gain root permissions we'll use 'su' command. see below.

android Hacking By UrduSecurity


Now we'll look at some files out there like gesture.key for Pattern Lock , as our pattern code is saved as salt sha-1 hashed form in gesture.key so let's look there.

android Hacking By UrduSecurity

and so on, Try to inspect it more via adb shell as we do in linux. and you'll get that where the data is stored basically and how the all stuff going ahead and working. in Next tutorial i'll Post How to debug and Find Vulnerable android applications.


Till Now if you have any problem , Let me know if i can solve.  Thanks

Android Hacking: Getting Started with Android Pentesting

By: Adeel Chaudhary on: 09:39

 
Copyright © HACK | Designed by Muhammad Adeel | Founder UrduSecurity