Guardsquare / proguard

ProGuard, Java optimizer and obfuscator
https://www.guardsquare.com/en/products/proguard
GNU General Public License v2.0
2.7k stars 395 forks source link

Incorrect deobfuscation for stacktraces #33

Open shettyds opened 4 years ago

shettyds commented 4 years ago

The method name for the following obfuscated stacktrace was not deobfuscated correctly - Obfuscated stacktrace - at com.boxer.e.ad.a(SourceFile:2072)

Deobfuscated stacktrace - com.boxer.injection.DaggerBoxerObjectGraph.a(DaggerBoxerObjectGraph.java:2072)

Mapping file - com.boxer.injection.DaggerBoxerObjectGraph -> com.boxer.e.ad: com.boxer.exchange.syncstrategyadapter.EmailBodySizeAdapterModule emailBodySizeAdapterModule -> a

Also, is there a way to identify if a stacktrace has been obfuscated using Proguard using only the stacktrace?

EricLafortune commented 4 years ago

The mapping line suggests that the exception comes from an inlined method. You can then see multiple consecutive matching lines in the mapping file, corresponding to the inlined locations. Can you see these other lines?

The mapping line that you show doesn't have a line number, so it won't be applied the trace line, which does have a line number. Does the mapping file correspond to this exact version of the app?

There is no sure way to identify the obfuscator from a stack trace.