apk protection. ambiguous class names.

59 views
Skip to first unread message

Nayana Hettiarachchi

unread,
Jun 19, 2014, 9:20:37 AM6/19/14
to apk...@googlegroups.com
Hi everyone,

I am not an expert at reverse engineering. I have manage to inject code to binaries for fun using smali in the past thanks to apktool. I hope this question is not off topic for this forum. i am not asking anyone to help me with a specific problem. I am just trying to understand an overall concept. 

Today i convert an apk to smali code using apktool version 1.5.2

many files turned out to be single letter file names such as a.smali b.smali and the smali code it self has the following line .source "HackersProtected" on top.

my basic understanding of binary protection tells me this apk was obfuscated using some security tool. i am not sure if the term obfuscated is correct. i know windows binaries can be encrypted but i am not sure if same exist for android too.

for the first glance it just looks like the original class name was unable to be determined. since the content of such single letter smali files appears to be normal.

Questions. 

1. What is the name for this type of technique used to prevent exposing class names?
2. When a class is decode as a.smali is all reference to such class is now named "a" in all the respective .smali files which had a reference to that class?

Thanks for your time.



Ryszard Wiśniewski

unread,
Jun 19, 2014, 9:39:08 AM6/19/14
to apk...@googlegroups.com

Hi Nayana,

1. You're right, code has been obfuscated. Most probably with the Proguard tool,  because it's integrated with Android app build system - developer just need to enable and configure it.

2. Yes, names are constant between all files. Otherwise the code would be broken :-)  Obfuscating is basically a renaming of all identifiers. It's the same as you would decide to name your classes "a", "b", "c", ... No magic here.

--
You received this message because you are subscribed to the Google Groups "apktool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apktool+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nayana Hettiarachchi

unread,
Jun 19, 2014, 10:11:03 AM6/19/14
to apk...@googlegroups.com
Hi Ryszard,

Thank you very much for taking time to answer my question. Have a great day.

Nayana
Reply all
Reply to author
Forward
0 new messages