破解JRebel4.0.3手记(插件版独立版都一样)

      据说JRebel是一款JVM插件,可以实现class热加载,减少重部署次数,极大提高开发效率。昨天下了一个最新版本,带30天试用的license,用神器jd-gui.exe分析了一下,发现可以破解,遂破之。

      现在分享一下攻克的要点:

1.com.zeroturnaround.licensing.UserLicense:这个类implements Serializable,实际上jrebel.lic文件

就是它序列化的结果。所以我们自己同样可以依照它生产自己的lic文件,修改license参数即可,比如时间,限制等。

但是这个class有一个public byte[] getSignature()方法,是获取签名信息的,我们可以查找哪些地方调用了这个

方法,再来进一步处理。

 

2.com.zeroturnaround.javarebel.pS:很幸运找到这个类中有两个返回值为boolean的方法调用了签名的验证,

所以直接上ASM或javassist修改ByteCode,在方法开头插入 if(true) return true; 即可。

 

PS:JRebel是一款商业软件,这里就不直接上破解后的jar了,因为太简单了,其强度还比不上国内某些作品,只是

说明一下jrebel-4.0.3-standalone版的jar包是没签名的,处理起来方便,eclipse的plugin版的所有jar包都是

签名的,需要剔除掉这些签名信息,有点麻烦。

eclipse和网上找到的破解包提取打包成无依赖,独立java程序可用的本。独立java程序启动的时候增加如下的JVM参数即可 -server -Xmx512m -XX:MaxPermSize=128m -Djava.awt.headless=true -Drebel.spring_plugin=true -noverify -javaagent:D:\apps\jrebel6.4.3\jrebel.jar -Xbootclasspath/p:D:/apps/jrebel6.4.3/rebelboot.jar -Drebel.base=D:\apps\jrebel6.4.3\.jrebel -Drebel.disable_update=true D:\apps\jrebel6.4.3这个为解压后的路径,rebel.base参数指定了jrebel.lic所在的位置,因此无需拷贝到用户目录下。 控制台可以看到如下的输出表示jrebel配置成功。 2016-07-13 11:42:59 JRebel: WARN You are running JRebel using the -javaagent option on a system where -agentpath is supported. 2016-07-13 11:43:02 JRebel: 2016-07-13 11:43:02 JRebel: ############################################################# 2016-07-13 11:43:02 JRebel: 2016-07-13 11:43:02 JRebel: JRebel Agent 6.4.3 (201604210950) 2016-07-13 11:43:02 JRebel: (c) Copyright ZeroTurnaround AS, Estonia, Tartu. 2016-07-13 11:43:02 JRebel: 2016-07-13 11:43:02 JRebel: Over the last 1 days JRebel prevented 2016-07-13 11:43:02 JRebel: at least 1 redeploys/restarts saving you about 0 hours. 2016-07-13 11:43:02 JRebel: 2016-07-13 11:43:02 JRebel: Licensed to VIMACER (ZeroTurnaround) 2016-07-13 11:43:02 JRebel: with the following restrictions: 2016-07-13 11:43:02 JRebel: ### Hello World Cracked ### :) 2016-07-13 11:43:02 JRebel: 2016-07-13 11:43:02 JRebel: License type: enterprise 2016-07-13 11:43:02 JRebel: Valid from: July 14, 2014 2016-07-13 11:43:02 JRebel: Valid until: August 18, 2888 2016-07-13 11:43:02 JRebel: 2016-07-13 11:43:02 JRebel: 2016-07-13 11:43:02 JRebel: ############################################################# 2016-07-13 11:43:02 JRebel: 2016-07-13 11:43:04 JRebel: Monitoring Log4j configuration in 'xxxxx/log4j.properties'. 2016-07-13 11:43:06 JRebel: Monitoring properties in 'xxxxx\xxxx.properties'. 2016-07-13 11:43:32 JRebel: Reloading class 'xxxxx'. 2016-07-13 11:43:32 JRebel: Reconfiguring bean 'xxxxx' [xxxxx]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值