首页
社区
课程
招聘
[原创]破解OfficeSuite6.5
发表于: 2012-12-10 14:59 10350

[原创]破解OfficeSuite6.5

2012-12-10 14:59
10350
声明:本文章仅做技术研究,请勿用于非法用途。

这个软件试用版有时间限制,过期来就无法使用,需要注册。


用到的工具:APKTOOL、Notepad++
首先用APKTOOL反编译apk
1、搜索关键字“试用”,找到string.xml当中:
    
<string name="enter_key">输入解锁码</string>
    <string name="no_days_left_in_trial">试用期已到期。</string>
    <string name="x_days_left_in_trial">试用期还剩%d天。</string>

2、再次搜索no_days_left_in_trial,找到public.xml:
 
2135      <public type="string" name="untitled_file_name" id="0x7f0b0202" />
 2136      <public type="string" name="enter_key" id="0x7f0b0203" />
 2137:     <public type="string" name="no_days_left_in_trial" id="0x7f0b0204" />
 2138      <public type="string" name="x_days_left_in_trial" id="0x7f0b0205" />
 2139      <public type="string" name="enter_key_button" id="0x7f0b0206" />

3、下面查找smali文件中在哪里调用了"no_days_left_in_trial"字符串,搜索:0x7f0b0204
smali文件中:\smali\com\mobisystems\registration\c.smali:

method public static a(Landroid/content/Context;Lcom/mobisystems/registration/d;)Ljava/lang/String;
    .locals 4

    invoke-virtual {p1}, Lcom/mobisystems/registration/d;->auN()Z  //判断是否过期,返回值为1过期,为0不过期

    move-result v0

    if-eqz v0, :cond_0    //关键点,不过期就判断还剩下多少天

    const v0, 0x7f0b0204

    invoke-virtual {p0, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    :goto_0
    return-object v0

    :cond_0
    invoke-virtual {p1}, Lcom/mobisystems/registration/d;->auQ()I

    move-result v0

    const v1, 0x7f0b0205  //试用期还剩%d天。

    invoke-virtual {p0, v1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    const/4 v2, 0x1

    new-array v2, v2, [Ljava/lang/Object;

    const/4 v3, 0x0

    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0

    aput-object v0, v2, v3

    invoke-static {v1, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

上面的代码是经过混淆处理了的,但是我们还是可以通过上下文来推测其中的关键部分。

4、查看Lcom/mobisystems/registration/d;->auN()Z函数,想办法让其返回值始终为0,即永不过期。
.method public declared-synchronized auN()Z
    .locals 2

    monitor-enter p0

    :try_start_0
    iget-boolean v0, p0, Lcom/mobisystems/registration/d;->cCw:Z

    if-nez v0, :cond_0

    invoke-virtual {p0}, Lcom/mobisystems/registration/d;->auO()I

    move-result v0

    iget-short v1, p0, Lcom/mobisystems/registration/d;->cCq:S
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-lt v0, v1, :cond_0

    const/4 v0, 0x1  //修改其值为0,让其返回值始终为0

    :goto_0
    monitor-exit p0

    return v0    //v0为返回值

    :cond_0
    const/4 v0, 0x0

    goto :goto_0

    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

5、至此,可以无限制使用,但是第一次运行程序还是会弹出解锁的框。

下面再改造一下使其成为已注册版,不再弹出解锁的框。

6、搜索"Lcom/mobisystems/registration/c;->a"找到smali\com\mobisystems\office\ai.smali:有调用该函数。
 
com/mobisystems/office/ai.smali中:

.method public static B(Landroid/content/Context;)Ljava/lang/String;
    .locals 2

    invoke-static {p0}, Lcom/mobisystems/office/ai;->A(Landroid/content/Context;)Lcom/mobisystems/registration/d;

    move-result-object v0

    invoke-virtual {v0}, Lcom/mobisystems/registration/d;->auM()Z  //判断是否已经注册,返回值1为已注册,0为未注册。

    move-result v1

    if-eqz v1, :cond_0

    const v0, 0x7f0b020c  //已经注册

    invoke-virtual {p0, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    :goto_0
    return-object v0

    :cond_0
    invoke-static {p0, v0}, Lcom/mobisystems/registration/c;->a(Landroid/content/Context;Lcom/mobisystems/registration/d;)Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

其中 通过查找"0x7f0b020c",<public type="string" name="already_registered" id="0x7f0b020c" />  可以发现是已经注册的字符串信息。
看看auM()Z函数的具体内容;
.method public declared-synchronized auM()Z
    .locals 1

    monitor-enter p0

    :try_start_0
    iget-boolean v0, p0, Lcom/mobisystems/registration/d;->cCw:Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit p0

    return v0

    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

在return v0之前给返回值v0赋值为1,重建APK,签名,测试,已经注册。

至此,完成注册版本。

附上修改后的apk链接:

http://pan.baidu.com/share/link?shareid=177747&uk=3173678082

[课程]Linux pwn 探索篇!

上传的附件:
收藏
免费 0
支持
分享
最新回复 (6)
雪    币: 190
活跃值: (40)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
2
顶一个,移动平台还没开始研究呢,楼主给力
2012-12-10 16:17
0
雪    币: 207
活跃值: (10)
能力值: ( LV4,RANK:50 )
在线值:
发帖
回帖
粉丝
3
学习了。第一次看移动平台的。
2012-12-15 23:01
0
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
谢谢             学习了
2012-12-16 00:08
0
雪    币: 507
活跃值: (120)
能力值: ( LV6,RANK:90 )
在线值:
发帖
回帖
粉丝
5
if-eqz v0, :cond_0    //关键点,不过期就判断还剩下多少天

楼主这里,把if-eqz改为 if-nez,那么下面那条过期的语句将不会显示出来~实现直接绕过~
2012-12-17 09:04
0
雪    币: 1453
活跃值: (264)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
6
感谢分享,学习了,很不错的技术研究!谢谢!
2014-5-26 01:29
0
雪    币: 25
活跃值: (57)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
7
这个apk编译不回去呢?
2014-5-29 12:34
0
游客
登录 | 注册 方可回帖
返回
//