PT0-001 · Question #31
A company requested a penetration tester review the security of an in-house developed Android application. The penetration tester received an APK file to support the assessment. The penetration…
The correct answer is A. Convert to JAR. B. Decompile. Before performing SAST on an Android APK, the tester must convert the DEX bytecode to JAR format and then decompile it to obtain readable source code for analysis.
Question
A company requested a penetration tester review the security of an in-house developed Android application. The penetration tester received an APK file to support the assessment. The penetration tester wants to run SAST on the APK file. Which of the following preparatory steps must the penetration tester do FIRST? (Select TWO).
Options
- AConvert to JAR.
- BDecompile.
- CCross-compile the application.
- DConvert JAR files to DEX.
- ERe-sign the APK.
- FAttach to ADB.
How the community answered
(38 responses)- A76% (29)
- C3% (1)
- D3% (1)
- E5% (2)
- F13% (5)
Why each option
Before performing SAST on an Android APK, the tester must convert the DEX bytecode to JAR format and then decompile it to obtain readable source code for analysis.
APK files contain classes.dex (Dalvik Executable) files rather than Java bytecode. Converting DEX to JAR using a tool like dex2jar produces a JAR file with Java bytecode that SAST tools can process.
After converting to JAR, the bytecode must be decompiled into human-readable Java source code using tools like JD-GUI or jadx so that static analysis can be performed on the application logic and structure.
Cross-compiling is the process of building source code for a different target architecture and is not a step in statically analyzing an already-packaged APK.
Converting JAR to DEX is the reverse of what is needed - DEX is the format inside the APK that must be converted TO JAR, not the other way around.
Re-signing an APK is required for dynamic testing or reinstallation after modification, not as a prerequisite for static source code analysis.
Attaching to ADB (Android Debug Bridge) is a dynamic analysis technique used for runtime inspection and is not part of a SAST workflow.
Concept tested: Android APK static analysis preparation steps
Source: https://mas.owasp.org/MASTG/techniques/android/MASTG-TECH-0017/
Topics
Community Discussion
No community discussion yet for this question.