Learning Android Application Security Testing from scratch (Part2)

Source: Internet
Author: User

Learning Android Application Security Testing from scratch (Part2)
In the previous article, we set up a mobile penetration platform for Android applications. So far, you need to ensure that you have configured your virtual device, installed the android command line tool, and some tools (drozer, dex2jar, apktool) mentioned in the previous article ). In this article, I will show you how to decompile an Android Application, analyze the signature of the android application, and other things. If you are looking for an Android application testing platform that meets your needs, you can check out Android Tamer. Extract information from the application. First, confirm that InsecureBankv2 in your system is our latest version. Of course, we recommend that you make a git pull to merge all updates into your main branch. After that, we will analyze the apk file and copy the apk file to an independent folder. For the IPA file of iOS, the APK file is also a package file, so you can modify the file Suffix from .apkto .zip and then extract it. In the extracted file folder, you can see a lot of files for a brief description: AndroidManifest. xml -- AndroidManifest. xml is a required file in every android program. It is located in the root directory of the entire project, describing components exposed in the package (activities, services, and so on), their respective implementation classes, various data that can be processed and startup locations. From the security point of view, it contains all the components used in the application, and it also displays the permissiosns information used by the application, I strongly recommend that you read more in the Google document [the vulnerabilities we are discussing will discuss some of the Android app components. Assets -- this is used to store some original resource files. The stored items are compiled into the apk file. Res -- used to store META-INF like images, layout files, etc. -- this inside stores some information about the signature classes. dex -- this is the compiled application code. If you want to decompile the code, you must first convert the dex file to a jar file and then read it using the java compiler. The CERT that stores the Public Key Certificate. the RSA file is under the META-INF folder, find out the Public Key Certificate information, you can type the command keytool-printcert-file META-INF/CERT. note that you can modify the code in this apk file after decompiling, compiling, and re-deploying it to another device. However, once the apk file is modified, its integrity will be lost, so we need to get a new public/private key. Once the application compilation is completed, you can use the jarsigner tool to verify its integrity. Now we will use the dex2jardecompilation tool to convert dex2jarto A. APK file. After you complete the operation, you can open it in the JD-GUI and browse its source code. Now we can find some potential vulnerabilities by browsing its source code. We can clearly notice how easy it is to reverse the apk file and view its source code. Here we need to note that the reason why we can get the source code in this simple way is that this App does not perform fuzzy processing on its source code. Like the Proguard tool provided by Google, you can blur the code. Although fuzzy processing of App source code is not a foolproof method, at least it has a certain effect. In future articles, we may encounter a case of fuzzy processing of code. In this section, we learned how to extract information from an App. In the next section, we will see some different types of vulnerabilities in InsecurBankv2.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.