- Jaimin Gohel
Static analysis, also called static code analysis, is a method of computer program debugging that is done by examining the code without executing the program. The process provides an understanding of the code structure, and can help to ensure that the code adheres to industry standards.
Static analysis is performed in a non-runtime environment. Typically a static analysis tool will inspect program code for all possible run-time behaviors and seek out coding flaws, back doors, and potentially malicious code.
1. Exported="true"
Activities, content providers, broadcast receivers, services
2. debuggable="true"
process hook, sandbox memory
3. backup="true"
can pull sandbox data
4. Hard coded secrets
5. Weak ciphers or algorhithms
MD5
6. Bypass SSL pinning
<manifest ... >
<application ... >
<activity android:name=".ExampleActivity" />
...
</application ... >
...
</manifest >
A service can essentially take two forms:
Started
A service is "started" when an application component (such as an activity) starts it by calling startService().
Bound
A service is "bound" when an application component binds to it by calling bindService().
A content provider presents data to external applications as one or more tables that are similar to the tables found in a relational database.
Through the content provider, other applications can query or even modify data.
For example, applications can register for the ACTION_BOOT_COMPLETED system event which is fired once the Android system has completed the boot process.
classes.dex
Application .apk file
resources.rec
(image, layout, asset files)
AndroidManifest.xml
(Readable XML file)
.class files
Java files
Extract using apktool
dex to class
(use dex2jar tool)
class to java
(use ByteCodeViewer)