Skip to main content

Common problems that i faced in android pentesting (╯ ͠° ͟ʖ ͡°)╯┻━┻ (day 23)

Image result for problem meme

It's an ideal day for pentester when their tools are run as it supposed to be, no bug, no error, everything runs smoothly and the end of the day you can have good night sleep (well who am I kidding, sleep is for the weak)

Unfortunately, it does not always turn out like this right?

In this post I will tell you some of the issues that I usually encounter when I try to do some application testing in android and of course how to solve it, so you don't have to go to google and read a bunch of documentation issues from the official website. It works for me but I cannot assure you that it will 100% work for you have to dig it up by yourself if it's not working.

1st problem: APKTOOL 


"apktool" is a tool to reverse engineer your android application, in short, it will convert your apk file into smali bytecode, you can edit it and recompile it back again. But sometimes when i try to build the edited apk, it gives me this bunch of long and hideous error (brut.androidlib.AndrolibException, could not exec....).

Solution:


In order to solve this issue, first you need to locate the local/share directory of apktool and try to find the framework directory and inside there is an apk file, you need to delete this.

PROBLEM SOLVED !!!

2nd problem: Java being .....


I found the following issue when I try to execute appium sign jar binary, it seems that some of the functionality of the program (NoClassDefFoundError, BASE64Encoder) is cut off due to the absent of the class method in java jdk, this is happening due to inconsistencies of java distribution.

Solution:

In order to solve this issue, you need to found the right version java that is compatible with your tools. Mine was compatible when I try to switch to java 8 because by default I use java 11.



3rd problem: failed installation due to older SDK version


This usually happens when you try to install an android application with the target SDK that is higher that your current android vm or device SDK.

[INSTALL_FAILED_OLDER_SDK]

Solution:

To solve this issue you need to lower the sdk version, you need apktool to disassemble the apk. After that go to the resulted directory and try to find apktool.yml and AndroidManifest.xml it should be in the same directory.





Lower the version value of "minsdkversion" in apktool.yml  and next is to edit the version value of "android:compileSdkVersion". Rebuild it and it will installed successfully.

Thank you, have a nice day :)

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...