Author Topic: See Source Code of Android Apps  (Read 9926 times)

0 Members and 1 Guest are viewing this topic.

Offline Axon

  • VIP
  • King
  • *
  • Posts: 2047
  • Cookies: 319
    • View Profile
See Source Code of Android Apps
« on: January 17, 2013, 12:34:34 am »
Just found this article while browsing some hacking related sites,


http://rajhackingarticles.blogspot.com/2013/01/android-reverse-engineering-see-source.html

Offline Stackprotector

  • Administrator
  • Titan
  • *
  • Posts: 2515
  • Cookies: 205
    • View Profile
Re: See Source Code of Android Apps
« Reply #1 on: January 17, 2013, 12:44:17 am »
Yeah i can confirm this. Google sucks at protecting the application. So if you want to be sure people pay for your app. You better get going to implement licensing systems and crypted/obfusticated code.
~Factionwars

Offline Satan911

  • VIP
  • Knight
  • *
  • Posts: 289
  • Cookies: 25
  • Retired god/admin
    • View Profile
Re: See Source Code of Android Apps
« Reply #2 on: January 17, 2013, 04:08:36 am »
It is not entirely Google's fault. Android is an open platform running Java applications so if you have root access to your phone it's normal you can find the app .apk. Since it's java it is also normal you can "decompile" the code without too much trouble (android or desktop application). Where Google could do something is encrypt the file .class files a second time during the .apk packaging phase but I guess they had some reasons to not do it. After all if your phone is not rooted you don't have access to the apk files.
Satan911
Evilzone Network Administrator

Offline p_2001

  • Royal Highness
  • ****
  • Posts: 684
  • Cookies: -64
    • View Profile
Re: See Source Code of Android Apps
« Reply #3 on: January 17, 2013, 04:31:07 am »
It is not entirely Google's fault. Android is an open platform running Java applications so if you have root access to your phone it's normal you can find the app .apk. Since it's java it is also normal you can "decompile" the code without too much trouble (android or desktop application). Where Google could do something is encrypt the file .class files a second time during the .apk packaging phase but I guess they had some reasons to not do it. After all if your phone is not rooted you don't have access to the apk files.

not exactly. You don't need root to extract apk filles. There is no need to root your phone to get the apk files.

"Always have a plan"

Offline iTpHo3NiX

  • EZ's Pirate Captain
  • Administrator
  • Titan
  • *
  • Posts: 2920
  • Cookies: 328
    • View Profile
    • EvilZone
Re: See Source Code of Android Apps
« Reply #4 on: January 17, 2013, 04:59:45 am »
It is not entirely Google's fault. Android is an open platform running Java applications so if you have root access to your phone it's normal you can find the app .apk. Since it's java it is also normal you can "decompile" the code without too much trouble (android or desktop application). Where Google could do something is encrypt the file .class files a second time during the .apk packaging phase but I guess they had some reasons to not do it. After all if your phone is not rooted you don't have access to the apk files.

You can download APKs off the internet no problem
[09:27] (+lenoch) iTpHo3NiX can even manipulate me to suck dick
[09:27] (+lenoch) oh no that's voluntary
[09:27] (+lenoch) sorry

Offline p_2001

  • Royal Highness
  • ****
  • Posts: 684
  • Cookies: -64
    • View Profile
Re: See Source Code of Android Apps
« Reply #5 on: January 17, 2013, 05:05:19 am »
You can download APKs off the internet no problem
haha...
he meant that someone has to root to get the apk.
On the net sometime had to root his phone, extract apk and upload it :P...
You don't need to do that. Apk can be extracted without root.
"Always have a plan"

Offline Satan911

  • VIP
  • Knight
  • *
  • Posts: 289
  • Cookies: 25
  • Retired god/admin
    • View Profile
Re: See Source Code of Android Apps
« Reply #6 on: January 17, 2013, 06:40:36 am »
Learned something today. I have no idea why I was sure root was needed to extract apk files. Guess it is the programmers task to obfuscate the code then even though you probably won't get 100% working code using the technics in that article.
« Last Edit: January 17, 2013, 06:41:44 am by Satan911 »
Satan911
Evilzone Network Administrator

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: See Source Code of Android Apps
« Reply #7 on: January 17, 2013, 09:34:00 am »
That's where ProGuard comes in to obfuscate that code. And it sure makes it hard to read... also decompiled APK's never contain the full code in Java or XML format, and it is hard to make a compilable project again from what you decompiled...
And that blog post didn't say anything magical. He just ran dex2jar and that is it - there are many more techniques and software...
« Last Edit: January 17, 2013, 09:35:46 am by Kulverstukas »

Offline Deque

  • P.I.N.N.
  • Global Moderator
  • Overlord
  • *
  • Posts: 1203
  • Cookies: 518
  • Programmer, Malware Analyst
    • View Profile
Re: See Source Code of Android Apps
« Reply #8 on: January 17, 2013, 05:44:32 pm »
it is hard to make a compilable project again from what you decompiled...

If you just modify a single class to enter some malicious code, it is not that hard. You just have to recompile the files you actually changed.
I also recompiled a whole project once, because I had to embed it in an application and it was full of System.exit() calls that closed my program too. It took me about two hours to remove the calls and the errors from decompiling.
« Last Edit: January 17, 2013, 05:45:28 pm by Deque »

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: See Source Code of Android Apps
« Reply #9 on: January 17, 2013, 06:55:39 pm »
If you just modify a single class to enter some malicious code, it is not that hard. You just have to recompile the files you actually changed.
I also recompiled a whole project once, because I had to embed it in an application and it was full of System.exit() calls that closed my program too. It took me about two hours to remove the calls and the errors from decompiling.
But you get whole Java code only if you're lucky. Some blocks of code get written as weird ASM instructions. I don't think Java can compile such stuff... or am I wrong?

artymig

  • Guest
Re: See Source Code of Android Apps
« Reply #10 on: January 21, 2013, 11:51:14 pm »
How about NDK? How would that work in terms of being decompilable?
« Last Edit: January 21, 2013, 11:51:58 pm by artymig »

Offline Deque

  • P.I.N.N.
  • Global Moderator
  • Overlord
  • *
  • Posts: 1203
  • Cookies: 518
  • Programmer, Malware Analyst
    • View Profile
Re: See Source Code of Android Apps
« Reply #11 on: January 22, 2013, 09:28:37 am »
But you get whole Java code only if you're lucky. Some blocks of code get written as weird ASM instructions. I don't think Java can compile such stuff... or am I wrong?

Mh, usually bytecode can be decompiled without any problems. If there are ASM instructions, it means that you didn't have only bytecode to decompile.
I just assumed that android would use the bytecode, but I may be wrong at this point.

Offline p_2001

  • Royal Highness
  • ****
  • Posts: 684
  • Cookies: -64
    • View Profile
Re: See Source Code of Android Apps
« Reply #12 on: January 22, 2013, 09:48:34 am »
But you get whole Java code only if you're lucky. Some blocks of code get written as weird ASM instructions. I don't think Java can compile such stuff... or am I wrong?

not possible, at least it does not seem so.
Java code is meant to run on different architectures where each has it's own jvm, which converts the bytecode to executable code.

if you get ASM instructions then how will that code run on different machines?(with different instruction set or opcode) Java code cannot have asm code if it is supposed to be cross platform.
« Last Edit: January 22, 2013, 09:49:51 am by p_2001 »
"Always have a plan"

Offline WirelessDesert

  • Knight
  • **
  • Posts: 356
  • Cookies: 10
  • I think...
    • View Profile
Re: See Source Code of Android Apps
« Reply #13 on: January 28, 2013, 03:20:38 pm »
Kewl, can't wait till I get home.
Thx for the share!
Check out my arduino project: Moving car - School project!
"I'm like current, I always take the easiest route."