-
-
[原创]2015移动安全挑战赛[第一题]
-
发表于: 2015-1-23 02:11 1942
-
2015移动安全挑战赛
第一题
这道题目属于静态破解题目;
破解思路可以借鉴《Android软件安全与逆向分析》第二章的思路;
该题目的破解方法:
1.首先用apktool反编译apk文件;
2.根据string.xml, public.xml中的字符串信息
<string name="dialog_error_tips">密码不对,请继续破解</string>
<string name="dialog_good_tips">恭喜!!!破解成功!!!</string>
<public type="string" name="dialog_error_tips" id="0x7f0a0011" />
<public type="string" name="dialog_good_tips" id="0x7f0a0012" />
MainActivity.smali
.method private showDialog()V
const v1, 0x7f0a0012
if-eqz v6, :cond_0 //修改为“if-nez v6”
.line 55
iget-object v6, p0,
Lcom/example/simpleencryption/MainActivity$1;->this$0:Lcom/example/simpleencryption/MainActivity;
#calls: Lcom/example/simpleencryption/MainActivity;->showDialog()V //这里调用成功信息invoke-static {v6},
Lcom/example/simpleencryption/MainActivity;->access$1(Lcom/example/simpleencryption/MainActivity;)V
.line 69
:goto_1
return-void
.line 50
:catch_0
move-exception v1
.line 51
.local v1, e:Ljava/io/UnsupportedEncodingException;
invoke-virtual {v1}, Ljava/io/UnsupportedEncodingException;->printStackTrace()V
goto :goto_0
.line 57
.end local v1 #e:Ljava/io/UnsupportedEncodingException;
:cond_0 //比较失败后跳转的地方
new-instance v0, Landroid/app/AlertDialog$Builder;
iget-object v6, p0,
Lcom/example/simpleencryption/MainActivity$1;->this$0:Lcom/example/simpleencryption/MainActivity;
invoke-direct {v0, v6}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V
.line 58
.local v0, builder:Landroid/app/AlertDialog$Builder;
const v6, 0x7f0a0011 //失败
3.修改之后回编译生成新的apk文件然后重新签名。
第一题
这道题目属于静态破解题目;
破解思路可以借鉴《Android软件安全与逆向分析》第二章的思路;
该题目的破解方法:
1.首先用apktool反编译apk文件;
2.根据string.xml, public.xml中的字符串信息
<string name="dialog_error_tips">密码不对,请继续破解</string>
<string name="dialog_good_tips">恭喜!!!破解成功!!!</string>
<public type="string" name="dialog_error_tips" id="0x7f0a0011" />
<public type="string" name="dialog_good_tips" id="0x7f0a0012" />
MainActivity.smali
.method private showDialog()V
const v1, 0x7f0a0012
if-eqz v6, :cond_0 //修改为“if-nez v6”
.line 55
iget-object v6, p0,
Lcom/example/simpleencryption/MainActivity$1;->this$0:Lcom/example/simpleencryption/MainActivity;
#calls: Lcom/example/simpleencryption/MainActivity;->showDialog()V //这里调用成功信息invoke-static {v6},
Lcom/example/simpleencryption/MainActivity;->access$1(Lcom/example/simpleencryption/MainActivity;)V
.line 69
:goto_1
return-void
.line 50
:catch_0
move-exception v1
.line 51
.local v1, e:Ljava/io/UnsupportedEncodingException;
invoke-virtual {v1}, Ljava/io/UnsupportedEncodingException;->printStackTrace()V
goto :goto_0
.line 57
.end local v1 #e:Ljava/io/UnsupportedEncodingException;
:cond_0 //比较失败后跳转的地方
new-instance v0, Landroid/app/AlertDialog$Builder;
iget-object v6, p0,
Lcom/example/simpleencryption/MainActivity$1;->this$0:Lcom/example/simpleencryption/MainActivity;
invoke-direct {v0, v6}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V
.line 58
.local v0, builder:Landroid/app/AlertDialog$Builder;
const v6, 0x7f0a0011 //失败
3.修改之后回编译生成新的apk文件然后重新签名。
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!
赞赏
看原图
赞赏
雪币:
留言: