Jump to content
MVH1362

Introduction To Hex Editing [Android Reversing] (Tutorial - 3)

Recommended Posts

MVH1362

Hello there,

 

HarmoniousSlowHarvestmouse-max-1mb.gif.792fef1d62ae4361af2837954b235930.gif

 

I am back guys with the next tutorial of the APK Reversing Series. I am getting many messages and doubts from this forum and sorry for not responding, it's all because of my job. Now, I am not gonna start a lecture and make you bored. Let's jump into the tutorial, but wait!!! Did you read the previous tutorial? if no, please read it accordingly to keep in touch with this series.

 

Previous Tutorials

 

  1. Getting Started With APK/Android Reverse Engineering/Modding (Tutorial - 1)
  2. How To Get Java Source Code From An APK/Android App (Tutorial - 2)

 

SEE ALL THE TUTORIAL IN THIS SERIES: >> Click Here <<

 

tenor.gif.f4adaf590b0806a94abf51feadcb3115.gif

 

What Is Hex Editing?

 

Everything can be shown in Hex or Hexadecimal, cool right? Every software is programmed using different programming languages like Java, C, C++, Python etc. and no software is made with Hex. So, how can we edit Hex to edit data of a program and modify it? As I told, everything can be shown in Hex, a software's data can also be shown in Hex. Hexadecimal has different forms which it can be a letter or a number, so how can we read or understand hex? The alphabetical or language form of Hex is called ASCII which can be shown as words and numbers.

 

Now our topic is all about Android Reverse Engineering, so we edit data of an Android game or app with Hex by understanding the ASCII and functions. For example, when a game starts it shows a text "Welcome To The Game" and it's obviously a text. So, we can edit it by using a Hex Editor easily. Now we can go to the tutorial with this example. :D

 

Modifying Data of APKs By Hex Editing

 

As we told, we can edit the "Welcome To The Game" text by Hex Editing, we can check it out. Here is what you have to do.

 

  1. Install any Hex Editor (HxD, Hex Editor Neo etc.)
  2. Now decompile the APK using WinRAR or URET Android Reversing Toolkit
  3. Now you can see a folder "lib" in the decompiled files
  4. Open the folder and check which file has the largest memory size (All the lib files are having ".so" extension)
  5. Right-click on the largest sized file and hover to Open With.
  6. Select the Hex Editing software you installed (HxD is the good one).
  7. The file will be opened with many alphabets and numbers mixed up.
  8. Don't worry, it's easy.
  9. Hold and press "CTRL+F" to open the search box.
  10. Search: "Welcome"
  11. If there are so many results, search: "Welcome To" and search till you get one result.
  12. If you get a string "Welcome To The Game".
  13. You're successful finding the starting screen text.
  14. In the string "Welcome To The Game", there are 19 characters (letters) including spaces.
  15. So you have to modify it with a string which does not exceed 19 characters (You can change it in your way but it's different method and I will teach you that in the coming tutorial).
  16. Modifying it with accurate 19 characters is good for you.
  17. For example, change "Welcome To The Game" with "-Hacked By MVH1362-" which has correct 19 characters. ;)B)
  18. Now, save the file and compile it with URET Android Reversing Toolkit.
  19. Now, Install the game and open it.
  20. When the game opens, the text will be "-Hacked By MVH1362-" which will make you feel proud and those who install it will see your credits. B) 

 

NOTE: Sometimes this starting text or any string can be in small-sized lib files too but most probably it will be in the large sized file.

NOTE: Please don't try to edit the text or string more than the characters because it might corrupt the file and the game or app will not work.

 

keep-calm-its-finished-guys.jpg.12dae467a5aba1a53d684f68c5a1758f.jpg

 

Now you learned "How to edit text or string in a game using Hex Editing", but How to edit the scores, coins etc. It will be the next tutorial so Stay Tuned! 

 

For the next tutorial, we will be using "IDA Pro" to modify the game data like score, health, coins/money and much more.

 

SEE ALL THE TUTORIAL IN THIS SERIES: >> Click Here <<

 

I could teach you that along with this tutorial but I am sure that you will get confused so,

 

Next Tutorial: Hacking In-App Data Using IDA Pro

 

Quote

To get instant updates: Follow me on URET >> Follow MVH1362 << :P 

 

:jig: Thank You So Much For Reading This Tutorial :jig:

  • Like 7

Share this post


Link to post
Share on other sites
Beo

Hi, can you make Apk debug with intellij tutorial?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

Guidelines