Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize the reverse of Android Foundation

2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces the relevant knowledge of "how to realize Android basic reverse". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "how to realize Android basic reverse" can help you solve the problem.

Step one: try it.

Play by yourself

Step 2: decompile and search for keywords.

1. Search for "success"

Three pieces of data were found here.

After clicking in, there is a method like this:

.method public static d () V .locals 4 const/4 v3, 0x1 const/4 v2, 0x0 sget v0, Lcom/xy/kom/d/bk;- > i0x1 const/4 I invoke-static {v0}, Lcom/xy/kom/g/p;- > b (I) Z sget-boolean v0, Lcom/xy/kom/d/bk;- > hpurl I invoke-static {v0}, Lcom/xy/kom/g/p;- > c (I) Z sget-boolean v0, Lcom/xy/kom/d/bk -> iget-object Z if-eqz v0,: cond_4 sget-object v0, Lcom/xy/kom/GameActivity;- > Avex Lcom invoke-static invoke-static; iget-object v0, v0, GameActivity; iget-object v0, v0, GameActivy > m V0 LJV Lcom Xyx Xym invoke-static g invoke-static; Lcom/xy/kom/g/f {v0}, xxxxxxxxxxxxxxxxxxxxxxxxxameGameActivity -> l () Lcom/xy/kom/g/f; move-result-object v1 invoke-virtual {v0, v1}, Ljava/util/ArrayList;- > add (Ljava/lang/Object;) Z: goto_0 sget-object v0, Lcom/xy/kom/GameActivity;- > AveLcom invoke-virtual invoke-virtual v0, v0, Lcom/xy/kom/GameActivity;- -> t () V sget-object v0, Lcom/xy/kom/GameActivity;- > Avex Lcom iget-object GameActivity; iget-object v0, v0, Lcom/xy/kom/GameActivity;- > rerex Lcom XYX XY Dai; if-eqz v0,: cond_0 sget-object v0, Lcom/xy/kom/GameActivity;- > Alav LcomXY Lex GameActivity; iget-object v0, v0, Lcom/xy/kom/GameActivity;- > r:Lcom/xy/kom/d/ei Invoke-virtual {v0, v2}, Lcom/xy/kom/d/ei;- > a (I) V: cond_0 sget-object v0, Lcom/xy/kom/GameActivity;- > Lcom/xy/kom/GameActivity;- LcomxerGameActivation; const/4 v1, 0x6 invoke-virtual {v0, v1}, Lcom/xy/kom/GameActivity;- > a (I) V invoke-static {}, Lcom/xy/kom/d/bk;- > h V sget-object v0, Lcom/xy/kom/GameActivity -> const-string Lcom Landroid/widget/Toast; move-result-object Landroid/widget/Toast; move-result-object invoke-virtual invoke-virtual v1, "\ Landroid/content/Context;Ljava/lang/CharSequence;I\ u4e70\ u6210\ u529f\ uff01\ u9053\ u5177\ u5df2\ u53d1\ u653e" invoke-virtual {v0, v1, v2}, Landroid/widget/Toast;- > makeText (Landroid/content/Context;Ljava/lang/CharSequence;I) Landroid/widget/Toast; move-result-object v0 Activation {v0}, Landroid/widget/Toast;- > show () V sget-object v0, Lcom/xy/kom/GameActivity -> invoke-virtual Lcom const/16 const/16 e const/16 a; cond_2 sget {v0, v3}, Lcom/xy/kom/e/a;- > a (I) V XYR v3, Lcom/xy/kom/GameActivity;- > MGV Z invoke-static {}, Lcom/xy/kom/a/h;- > f I XYR v0 const/16 v1, 0xd if-ne v0, v1,: cond_2 sget v0, Lcom/xy/kom/GameActivity -> Lcom/xy/kom/GameActivity;- I const/4 v1, 0x2 if-ne v0, v1,: cond_2 sget-object v0, Lcom/xy/kom/GameActivity;- > Avex Lcom invoke-interface invoke-interface; iget-object v0, v0, Lcom/xy/kom/GameActivity;- > mvex LcomXY invoke-interface invoke-interface gAccord; invoke-interface {v0}, Lcom/xy/kom/g/p;- > w () -> size () I move-result v1 sget-object v2, Lcom/xy/kom/GameActivity;- > iget-object Lcom if-ne if-ne v2, Lcom/xy/kom/GameActivity;- > iget-object v2, v2, Lcom/xy/kom/GameActivity;- > mveLcom Xym if-ne g if-ne p; XYY {v2}, Lcom/xy/kom/g/p;- > l XYR v2 if-ne v1, v2,: XYY v1, Lcom/xy/kom/GameActivity;- > A:Lcom/xy/kom/GameActivity Iget-object v1, v1, Lcom/xy/kom/GameActivity;- > RGV Lcom get Ljava/lang/Object; move-result-object check-cast e; invoke-interface {v0}, Ljava/util/List;- > size () I move-result v2 add-int/lit8 v2, v2,-0x1 invoke-interface {v0, v2}, Ljava/util/List;- > get (I) Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/xy/kom/g/f Invoke-virtual {v1, v0}, Lcom/xy/kom/d/ei;- > b (Lcom/xy/kom/g/f;) V: cond_1 sget-object v0, Lcom/xy/kom/GameActivity;- > d:Lcom/xy/kom/g/f LcomxerGameActivity; iget-object v0, v0, Lcom/xy/kom/GameActivity;- > rr V1 LcomxGomGomGameActivityLei; sget-object v1, Lcom/xy/kom/d/bk;- > d:Lcom/xy/kom/g/f Invoke-virtual {v0, v1}, Lcom/xy/kom/d/ei;- > a (Lcom/xy/kom/g/f;) V invoke-static {}, Lcom/xy/kom/d/bk;- > m () V: cond_2 sget-boolean v0, Lcom/xy/kom/d/bk;- > cond_3 const/4 Z if-nez v0,: cond_3 const/4 v0, 0x0 sput-object v0, Lcom/xy/kom/d/bk;- > d:Lcom/xy/kom/g/f : cond_3 return-void: cond_4 sget-object v0, Lcom/xy/kom/GameActivity;- > iget-object Lcom sget-object; iget-object v0, v0, Lcom/xy/kom/GameActivity;- > mpurl Lcomxxxxxxxxxxxx; Lcom/xy/kom/g/p;- {v0}, Lcom/xy/kom/g/p;- > x () v0 sget-object v1, Lcom/xy/kom/d/bk -> dJV Lcom Ljava/lang/Object; add, xym goto/16, g goto/16, invoke-virtual {v0, v1}, Ljava/util/ArrayList;- > xym (Ljava/lang/Object;) Z: goto_0.end method

Here we find a method that calls successfully. Let's go back to the source.

Found to be an onResult method.

Solution:

(1) failure to overwrite switch turns to success.

(2) change the switch jump

(3) the last one I like best, with the clearest way of thinking, use goto to jump. Just jump to success.

Well, after the revision, the assembly, the whole game will be cracked.

There's nothing to say.

Test results.

Is successful, lazy play. Do not want to send a map, test it yourself, if you have any questions, you can find me.

Case Analysis (2)

I didn't find it well before. Now go and look for it.

There are three main points to pay attention to when looking for a practicing APK.

(1) it is preferably a stand-alone machine

(2) when choosing the size, choose the smaller one, well, decompilation is fast. Our aim is to practice.

(3) without shell, we can't get rid of it at this stage.

Found a game of cool running or something.

Three steps

The first step is to try it.

Original apk: practice portal can be found here, serial number: 2002

When you get the game, you have to play it first, right? you have to know how people buy it. Maybe we'll find something new.

Decompilation cracking

Search for the keyword "success and failure"

After clicking on it, I went in and found that it was still an onResult.

.method public onResult (ILjava/lang/String;Ljava/lang/Object;) V .locals 3 .param p1, "paramAnonymousInt" # I .param p2, "paramAnonymousString" # Ljava/lang/String; .param p3, "paramAnonymousObject" # Ljava/lang/Object; .prologue goto: pswitch_0 .line 26 packed-switch p1,: pswitch_data_0 .line 37 const-string v0, "Unity" new-instance v1, Ljava/lang/StringBuilder Const-string v2, "\ u8d2d\ u4e70\ u9053\ u5177\ uff1a [" invoke-direct {v1, v2}, Ljava/lang/StringBuilder;- > (Ljava/lang/String;) V invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;- > append (Ljava/lang/String;) Ljava/lang/StringBuilder; move-result-object v1 const-string v2, "]\ u53d6\ u6d88\ uff01" invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;- > append (Ljava/lang/String) ) Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;- > toString () Ljava/lang/String; move-result-object v1 invoke-static {v0, v1}, Landroid/util/Log;- > v (Ljava/lang/String;Ljava/lang/String;) I. line 38 invoke-static {}, Lcom/huibang/paopao/MainActivity;- > access$0 () Ljava/lang/String Move-result-object v0 invoke-static {}, Lcom/huibang/paopao/MainActivity;- > access$1 () Ljava/lang/String; move-result-object v1 const-string v2, "cancel" invoke-static {v0, v1, v2}, Lcom/unity3d/player/UnityPlayer;- > UnitySendMessage (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String ) V .line 41: goto_0 return-void .line 29: pswitch_0 const-string v0, "Unity" new-instance v1, Ljava/lang/StringBuilder; const-string v2, "\ u8d2d\ u4e70\ u9053\ u5177\ uff1a [" invoke-direct {v1, v2}, Ljava/lang/StringBuilder;- > (Ljava/lang/String;) V invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;- > append (Ljava/lang/String;) Ljava/lang/StringBuilder Move-result-object v1 const-string v2, "]\ u6210\ u529f\ uff01" invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;- > append (Ljava/lang/String;) Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;- > toString () Ljava/lang/String; move-result-object v1 invoke-static {v0, v1}, Landroid/util/Log;- > v (Ljava/lang/String;Ljava/lang/String ) I .line 30 invoke-static {}, Lcom/huibang/paopao/MainActivity;- > access$0 () Ljava/lang/String; move-result-object v0 invoke-static {}, Lcom/huibang/paopao/MainActivity;- > access$1 () Ljava/lang/String; move-result-object v1 const-string v2, "success" invoke-static {v0, v1, v2}, Lcom/unity3d/player/UnityPlayer;- > UnitySendMessage (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String ) V goto: goto_0 .line 33: pswitch_1 const-string v0, "Unity" new-instance v1, Ljava/lang/StringBuilder; const-string v2, "\ u8d2d\ u4e70\ u9053\ u5177\ uff1a [" invoke-direct {v1, v2}, Ljava/lang/StringBuilder;- > (Ljava/lang/String;) V invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;- > append (Ljava/lang/String;) Ljava/lang/StringBuilder Move-result-object v1 const-string v2, "]\ u5931\ u8d25\ uff01" invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;- > append (Ljava/lang/String;) Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;- > toString () Ljava/lang/String; move-result-object v1 invoke-static {v0, v1}, Landroid/util/Log;- > v (Ljava/lang/String;Ljava/lang/String ) I .line 34 invoke-static {}, Lcom/huibang/paopao/MainActivity;- > access$0 () Ljava/lang/String; move-result-object v0 invoke-static {}, Lcom/huibang/paopao/MainActivity;- > access$1 () Ljava/lang/String; move-result-object v1 const-string v2, "fail" invoke-static {v0, v1, v2}, Lcom/unity3d/player/UnityPlayer;- > UnitySendMessage (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String ) V goto: goto_0 .line 26 nop: pswitch_data_0. Packed-switch 0x1: pswitch_0: pswitch_1 .end packed-switch.end method

This is the end of the introduction on "how to implement the reverse of Android Foundation". Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report