pdf

penTest HackFest AndroidCodeInspection.pdf

Pentest Hackfest Androidcodeinspection

Guide to static and dynamic analysis of Android applications.

Last updated:

This page contains AI generated content. Errors or omissions may be present. Use human level critical thinking.
  • Q: How can analysts perform a quick search for suspect functions after decompiling code?
    A: After obtaining Java files, analysts can perform a quick and dirty search using grep. This involves searching for permissions and function calls of interest within the directory structure. While rudimentary and subject to evasion, it serves as a good litmus test. For example, one might grep for specific Intent usage patterns like putextra android intent to identify potential security issues before importing code into Eclipse for deeper FindBugs analysis.
    Level: Advanced Topic: Android application static code analysis tools Updated:
  • Q: What are the two main approaches to extract Java code from DEX files for inspection?
    A: Analysts can utilize Apktool/smali or Dex2jar and Procyon. The Apktool/smali method results in code that can be modified and recompiled, though it is difficult to read as Java code. Conversely, Dex2jar and Procyon produce readable but non-executable Java code. Practitioners typically end up doing both methods to view the code for matching against known suspicious functions and patterns during the manual inspection phase of the assessment process.
    Level: Advanced Topic: APK disassembly and decompiler methodology Updated:
  • Q: Which automated tools are recommended for static analysis of Android applications?
    A: The source material identifies several automated tools for static assessment. Androwarn produces HTML reports based on function calls. Mobile Sandbox and Badger Application Analysis also generate online reports detailing permissions and malicious functions. Stowaway provides listings of requested versus used permissions, though it is currently offline. These tools assist in identifying potentially sensitive actions within the code without requiring manual inspection initially.
    Level: Intermediate Topic: Android static analysis tools Updated:
  • Q: What are the two primary types of assessments used for mobile applications?
    A: The methodology distinguishes between Behavioral and Static Code Analysis. Behavioral assessment utilizes a sandbox environment to watch file access, network traffic, SMS messages, and calls. This approach is easier when dealing with obfuscated code but the app may not misbehave while being watched. Static analysis is more challenging but thorough, capable of detecting latent behaviors, long running timers, and triggered events that behavioral testing might miss during execution.
    Level: Beginner Topic: Android behavioral analysis sandbox techniques Updated:
  • Q: How is the AndroidManifest.xml file utilized during manual code inspection?
    A: The AndroidManifest.xml file is a critical component contained within every Android Package (APK) alongside the Dalvik Executable and other files. During manual analysis, practitioners extract this file using tools like AXMLprinter2 to convert it into a readable text format. This allows for a review of the permissions requested by the application and verification of whether those permissions are actually utilized in the code, which is essential for identifying potential security risks associated with excessive or unnecessary access rights.
    Level: Intermediate Topic: AndroidManifest Analysis Updated:
  • Q: Which tools are recommended for converting Dalvik Executable bytecode into readable Java code?
    A: To inspect code within Android Packages, practitioners must convert Dalvik Executable bytecode into readable Java source code for analysis. The source material recommends two primary approaches for this decompilation process. First, use Apktool and Smali to obtain executable code that can be modified and recompiled. Second, utilize Dex2jar combined with the Procyon decompiler to generate readable, though non-executable, Java code suitable for importing into Eclipse or searching via grep for suspicious functions.
    Level: Intermediate Topic: APK Decompilation Tools Updated:
  • Q: What is the primary focus of the Android Application Assessment presentation?
    A: The presentation by Christopher Crowley focuses on Android application assessment methodologies designed to identify security vulnerabilities and weaknesses within mobile applications. It emphasizes the importance of penetration testing to emulate attacker behaviors, specifically utilizing static and behavioral code analysis techniques. The content covers APK disassembly, customization of tools like FindBugs for identifying suspect methods in Java code, and analyzing APK files to prevent data theft and financial loss from malware threats prevalent on the Android platform.
    Level: Beginner Topic: Android Assessment Overview Updated:

Ask a question

Have a doubt or need clarification?

Share your question, and I’ll add it and the response to the page for this document.

Thank you!

I have received your message and I shall get back to you shortly.