Skip to main content

Attacking android application activity by repackaging ٩(ↀДↀ)۶ (day 8)

I think that most of the android developer forgot about danger of the open source nature of android application. Because the fact that once their application is posted in any play store in the world. There are no guarantee that anyone could tweak your application.



In this post i will show you how to attacking android application component(activity) by repackaging the application. I hope it will open developer eye about how easy for anyone to change your application structure.

To start the post,

You guys may be familiar with Androidmanifest.xml file in APK file right?!(if you not ? do your research m8)

Long story short the file is the one that responsible for any permission and components use in android application and it pretty much show like this.



as you can see from the following image there are 3 activities contain in the application and all of them cannot be query outside of the application. So what are we going to do? lets try to modify the file as shown below



we change the export component function into true with that means that any application could call the activity. Once you edit the Androidmanifest.xml it is time to repackage the application. I repackage the application using apktool



After the application is done building we are not done. In order for the application to be installed completely in the device you need to sign the application to new certification. I suggest that you use appium-sign tools it really convenient and save your time. now we are ready to install the application inside the device. (link to tool: https://github.com/appium/sign)



Now to test the application i will use drozer tool. Think drozer as metasploit for android application (i will talk more about drozer in the other post for now just shut up and follow along)



as you can see from the image above that all of the application could be called by drozer. (scary right?!)




To called activity without sending any data use the following command.



But if the activity need data send from one activity to another activity you could use the following command. To anyone wonder what is parameter that need to be follow along the command well it depends on the application activity. If you take a look in my application below


as you can see from the image above that the third activity put extra function that use for moving data into another activity and we could see there are parameter value1 and value2 those two are the flag that is use for the received application to get the the data.

cool right ? but it is not enough for me i try to create my own application exploit that will called the application and send data to the application.


i reuse the source code from my previous post of https://court-of-testing-analysing.blogspot.com/2018/11/exploit-activities-in-android.html

if you run my application it will show like this



Thank you and have a good day

link for the file:

the vulnerable application => https://github.com/acaciaworld80/100dayofpentesting/blob/master/packed_exercise(day%208).apk

Comments

Popular posts from this blog

Having fun analyzing nginx log to find malicious attacker in the net (ง'̀-'́)ง (day 37)

  What makes you sleepless at night? is it because of a ghost or scary stories? is it because you have an important meeting tomorrow? or is it because you have an exam? For me, what keeps me up all night is that I keep thinking about what happens to a website that I just created, is it safe from an attacker (certainly not) or did I missing some security adjustments that lead to vulnerability? well I'm not the best secure programmer in the world, I'm still learning and there is a big possibility that I can make a mistake but for me, a mistake can be a valuable investment to myself or yourself to be better so from this idea, I want to know more about what attackers casually do when attacking a website. Here in this post, I'm going to show you how I analyzed attack to the website that I have permission to design and also some interesting findings that I could get from the analysis Background: All of this analysis comes from the traffic that is targeted to th...

Utilize Pwntools for crafting ROP chain :') (day 69)

who doesn't like pwntools? it is a very versatile tool and can be customized according to our need using the python script but did you need to know that pwntools itself can help us to automatically craft a rop chain for us? so in this post, I will show you how to make rop chain less painful and make pwntools do all the heavy lifting. To demonstrate this I will use the binary challenge callme 64 bit from ropemporium link: https://ropemporium.com/challenge/callme.html Crashing the app: Like any other exploitation process, we need to crash the program by generating a long string pattern to determine the offset. based on the information from the above figure we can see that we required to provide 40 bytes of offset Fun stuff: now this where the fun stuff began write the following python script: as in the guideline of the challenged said we need to chain the function call by first to call the callme_one function, callme_two function and then callme_three funct...

Easy Web Application Security Machine: CSharp VulnJSON ಠ_ಠ (day 101)

Hi everyone! Welcome back to another vulnhub machine walkthrough. In this post, we will try to solve the the Csharp VulnJSON machine, this particular machine are focus on introducing some key concept of known web application attacks. We will go through each of the vulnerability and we will see how we can elevate this into a working exploit. Background: Setting up this machine is easy, the author provide us with .ova file and all we have to do is just import the file then we good to go.     Information Gathering: first, we need to find out what is the machine ip address, to do this I used nmap to do ping sweep on my local network. from the result above we can see that the target machine is with 192.168.1.7. Now that we have our target IP address, let's proceed with scanning the open port on the machine. cool! so the machine only open port 80 and this will make it much more simple. If we go to the web server, we are welcomed with two forms: first is used for create a user and th...