text stringlengths 0 1.99k |
|---|
0x0000: cb53 | add-double/2addr v3, v5 |
0x0001: 1805 182d 4454 fb21 1940 | const-wide v5, \ |
#+4618760256179416344 |
0x0006: cf53 | rem-double/2addr v3, v5 |
0x0007: 1600 0000 | const-wide/fix16 v0, #+0 |
0x0009: 3002 0300 | cmpg-double v2, v3, v0 |
0x000b: 3b02 0300 | if-gez v2, +3 |
0x000d: cb53 | add-double/2addr v3, v5 |
0x000e: 1003 | return-wide v3 |
[...] |
CODE: (code_offset=0x00953118 size=92)... |
0x00953118: d1400bf0 sub x16, sp, #0x2000 (8192) |
0x0095311c: b940021f ldr wzr, [x16] |
StackMap[0] (native_pc=0x953120, dex_pc=0x0, register_mask=0x0, \ |
stack_mask=0b) |
0x00953120: f81e0fe0 str x0, [sp, #-32]! |
0x00953124: f9000ffe str lr, [sp, #24] |
0x00953128: fd000be8 str d8, [sp, #16] |
0x0095312c: f94002b5 ldr x21, [x21] |
StackMap[1] (native_pc=0x953130, dex_pc=0x0, register_mask=0x0, \ |
stack_mask=0b) |
0x00953130: 5c0001e8 ldr d8, pc+60 (addr 0x95316c) (6.28319) |
0x00953134: 1e612800 fadd d0, d0, d1 |
0x00953138: 1e604101 fmov d1, d8 |
0x0095313c: f9420a7e ldr lr, [tr, #1040] ; pFmod |
0x00953140: d63f03c0 blr lr |
0x00953144: 1e602008 fcmp d0, #0.0 |
0x00953148: 1a9f37e0 cset w0, hs |
0x0095314c: 1e682801 fadd d1, d0, d8 |
0x00953150: 7100001f cmp w0, #0x0 (0) |
0x00953154: 1e611c00 fcsel d0, d0, d1, ne |
0x00953158: fd400be8 ldr d8, [sp, #16] |
0x0095315c: f9400ffe ldr lr, [sp, #24] |
0x00953160: 910083ff add sp, sp, #0x20 (32) |
0x00953164: d65f03c0 ret |
0x00953168: 5800007f ldr xzr, pc+12 (addr 0x953174) \ |
(0xd1400bf00077d5ba / -3368679395845220934) |
0x0095316c: 54442d18 unallocated (Unallocated) |
0x00953170: 401921fb unallocated (Unallocated) |
[...] |
``` |
As you can see, the resulting binary code is the same, modulo offsets. |
Simple code-based obfuscations, such as dead code, are eliminated during |
the creation of the .odex file. The power of the optimizing compiler |
compels thee, binary! |
---[ 3.5 - Cool, Anything Else? |
*sigh* So why do we need root to access the .odex file? It's because it is |
typically compiled based on profiles, and those essentially register usage |
patterns. |
> Imagine an app containing a method called `buy_drugs_and_do_crime`. |
> -- F. K. |
If a method ends up in a profile, it means it's been called often enough to |
be considered for AOT compilation. And if it's in the profile, then it ends |
up in the odex as binary code. Reading the odex would leak the information |
which methods are called often, so Android tries to protect it. If you find |
a way to read this nevertheless, especially from another app, |
congratulations: this might earn you a bounty and/or spying^W information |
gathering capabilities. |
--[ 4 - A Bit of Putting the Bits together |
> YES ... HA HA HA ... YES! |
Now that we can create BinExport files from oat files, which contain the |
executed machine code of an app's Dalvik code, we can calculate |
similarities! |
We prepared a couple of applications to demonstrate results. We will use |
Organic Maps (app.organicmaps) as a smaller baseline and Signal |
(org.thoughtcrime.securesms) as a complex, real-world application. We |
prepared the latter in a couple versions: 2.42.2, 2.32.2, 2.22.2, 2.12.2, |
and 2.2.4. The oldest version is from Summer 2024, one year ago, and we |
chose it because it is the basis for the leaked TeleMessage (TM) SNGL app's |
source code. It's an unofficial clone of Signal with added functionality to |
save messages centrally and was used by White House staff in early 2025. We |
used the source [16] to build a release version and compare it with our |
approach to the OG Signal app. |
1. org.tm.archive_7.2.4.2.apk |
(release build of leaked TM SGNL app) |
2. org.thoughtcrime.securesms_7.2.4.apk |
(Signal version closest in source code to TM SGNAL app) |
3. org.thoughtcrime.securesms_7.12.2.apk |
4. org.thoughtcrime.securesms_7.22.2.apk |
5. org.thoughtcrime.securesms_7.32.2.apk |
6. org.thoughtcrime.securesms_7.42.2.apk |
(Different version of Signal) |
7. app.organicmaps_25052005_orig.apk |
(Organic Maps) |
8. app.organicmaps_25052005_obfuscated.apk |
(Repackaged using ObfuscAPK's ArithmeticBranch pass) |
We downloaded the Organic Maps app from F-Droid and repackaged it |
ourselves. The TM SGNL app we built from source in a release configuration |
and downloaded the historic Signal versions from apkmirror.com because the |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.