10008开头的6222开头是什么银行行

学校发的中信卡预留号码是什么啊???_南京邮电大学吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:66,353贴子:
学校发的中信卡预留号码是什么啊???收藏
绑定输入发给我的移动号码也不行
1楼 22:00&|来自
好像没有预留号码
收起回复2楼 22:07&|来自
一定要去设定,不然什么号码都不行的
3楼 23:55&|来自
只能带身份证去中信改
4楼 23:58&|来自
高考档案里的联系方式
5楼 01:50&|来自
都不是是一个座机,025开头的,学校财务处应该,得自己去银行改哦
6楼 02:01&|来自
学校的座机
7楼 08:49&|来自
只能去银行改
8楼 11:05&|来自
是你家长的电话,已试过
9楼 11:09&|来自
本吧贡献榜 登录百度帐号推荐应用
内&&容:使用签名档&&
为兴趣而生,贴吧更懂你。&或JVMTI应用简单分析,基于JVMTI的类加载器分析,TBCredit类文件解密
标 题:JVMTI应用简单分析,基于JVMTI的类加载器分析,TBCredit类文件解密
作 者:vhly
时 间:<font color="#09-06-30 14:15 链 接:
JVMTI应用分析,针对&TBCedit&的类加载器的JVMTI实现
Author:vhly[FR]
记得之前论坛里面有人问&tbcredit&中的类文件的问题,前两天比较闲,就抽出几天详细看了一下。
TBC&是一个刷xxx信誉的软件,给予Eclipse实现,或者说是类似于Eclipse的外观样式。
首先查看一下整体的软件目录结构
&&&&&&&&bin
&&&&lib&&&&&&--&类库目录,主要是在这个地方
&&&&Privoxy&&---&未知&
&&&&resource&&&资源
&&&&run.bat
直接运行&run.bat,会调用&main.jar中的类文件,进行软件更新操作,更新的内容都保存在
lib目录中,同时,经过反编译发现,更新成功之后,程序会解析&lib/update.xml,通过其中的
设置,进行真正软件的调用,配置数据如下
&&command&&![CDATA[javaw,-agentlib:./lib/run,-Djava.library.path=.\lib,-jar,.\lib\com.xxxtaobao.tbcredit.jar]]&&/command&
这部分的内容,会组合成&javaw&-agentlib:./lib/run&-Djava.library.path=.\lib&-jar&.\lib\com.xxxtaobao.tbcredit.jar
就是调用了&xxx.jar文件,执行相应的内容而已。
直接找到&com.xxx.xxx.jar&这个文件,打开,找到Main-Class&,使用DJ&Decompiler&进行反编译
结果,DJ&崩溃了,一般这种情况,就是类文件经过加密了。
于是将一个.class&解压出来,使用HEdit打开,发现原来的&CA&FE&BA&BE&不见了,现在变成了
AA&BB&CC&DD,这种,经过检查所有的class&都是这个开头,那么可以认为,这几个数值
就是某个格式的Magic
分析了半天,还是没有发现应该如何解密。由于以前做过Java&Profiler的使用,那些东西基本上
都是提供一个&agentlib的,看看上面的指令,才想起来,原来是用了这种方式
那么就要针对&lib/run.dll&作分析了。
分析run.dll的步骤
1、使用IDA&进行汇编代码分析,发现&run.dll&中有几个导出&&Agent_Onload&Agent_OnUnload
&&&&&以及&&doXor,&doExchange4Bits,&encryptBuffer等等的方法,
2、当时并不了解JVMTI,只是看着&onload,觉得应该看一看,后来就分析代码,结果是一头雾水,
因为没有真实运行,很多的数据不知道什么功能。
3、动态调试部分,适用OllyICE进行调试,调试由于采用库的形式,因此,只能够调试java.exe,同时指定命令行参数,这样应该可以装载到run.dll中。
使用OllyICE&装载Java&之后指定参数,重新加载。
1)由于使用了agentlib,因此在启动之前在LoadLibraryA指令上下断点,此处的断点主要是
&&&&&定位jvm.dll的装载,因为实际&agent的加载等操作,都在&jvm.dll中完成
2)进入jvm.dll空间,再次下LoadLibraryA的端点,当执行第二次的时候,会停止在&装载&agentlib部分
screen.width*0.6) {this.width=screen.width*0.6;this.alt='';this.onmouseover=this.style.cursor='pointer';this.onclick=function(){window.open('http://farm3./384_41137caf23_o.png')}}" />
此时一旦装载了&run.dll,那么就进入到实际的调试过程中了
3)查看run.dll中的方法
Agent_OnLoad,&Agent_OnUnload,&doExchange4Bits,&doXor,encryptBuffer,&
getEncryptMarks,&getEncryptMarkSize,&getHeaderSize,getLogined,&login,
4)在Agent_OnLoad中下断点,单步查看执行流程
&__stdcall&Agent_OnLoad(x,&x,&x)
.text:&&&&&&&&&&&&&&&&&public&_Agent_OnLoad@12
.text:&_Agent_OnLoad@12&proc&near
.text:&var_A4&&&&&&&&&&=&dword&ptr&-0A4h
.text:&Dst&&&&&&&&&&&&&=&byte&ptr&-94h
.text:&var_84&&&&&&&&&&=&dword&ptr&-84h
.text:&var_8&&&&&&&&&&&=&dword&ptr&-8
.text:&var_4&&&&&&&&&&&=&dword&ptr&-4
.text:&arg_0&&&&&&&&&&&=&dword&ptr&&8
.text:&arg_4&&&&&&&&&&&=&dword&ptr&&0Ch
.text:&&&&&&&&&&&&&&&&&push&&&&ebp
.text:&&&&&&&&&&&&&&&&&mov&&&&&ebp,&esp
.text:&&&&&&&&&&&&&&&&&sub&&&&&esp,&0A4h
.text:&&&&&&&&&&&&&&&&&push&&&&h
.text:1000100E&&&&&&&&&&&&&&&&&push&&&&offset&dword_10008B60
.text:&&&&&&&&&&&&&&&&&mov&&&&&eax,&[ebp+arg_0]
.text:&&&&&&&&&&&&&&&&&push&&&&eax
.text:&&&&&&&&&&&&&&&&&mov&&&&&ecx,&[ebp+arg_0]
.text:1000101A&&&&&&&&&&&&&&&&&mov&&&&&edx,&[ecx]
.text:1000101C&&&&&&&&&&&&&&&&&call&&&&dword&ptr&[edx+18h]&;&GetEnv
.text:1000101F&&&&&&&&&&&&&&&&&mov&&&&&[ebp+var_8],&eax
.text:&&&&&&&&&&&&&&&&&cmp&&&&&[ebp+var_8],&0
.text:&&&&&&&&&&&&&&&&&jz&&&&&&short&loc_
.text:&&&&&&&&&&&&&&&&&mov&&&&&eax,&[ebp+var_8]
.text:1000102B&&&&&&&&&&&&&&&&&push&&&&eax
.text:1000102C&&&&&&&&&&&&&&&&&push&&&&offset&Format&&&;&&ERROR:&Unable&to&create&jvmtiEnv,&GetEn&...
.text:&&&&&&&&&&&&&&&&&push&&&&offset&File&&&&&;&File
.text:&&&&&&&&&&&&&&&&&call&&&&_fprintf
.text:1000103B&&&&&&&&&&&&&&&&&add&&&&&esp,&0Ch
.text:1000103E&&&&&&&&&&&&&&&&&or&&&&&&eax,&0FFFFFFFFh
.text:&&&&&&&&&&&&&&&&&jmp&&&&&loc_
.text:&;&---------------------------------------------------------------------------
.text:&loc_:&&&&&&&&&&&&&&&&&&&&&&&&&&&;&CODE&XREF:&Agent_OnLoad(x,x,x)+26j
.text:&&&&&&&&&&&&&&&&&lea&&&&&ecx,&[ebp+var_A4]
.text:1000104C&&&&&&&&&&&&&&&&&push&&&&ecx
.text:1000104D&&&&&&&&&&&&&&&&&mov&&&&&edx,&dword_10008B60
.text:&&&&&&&&&&&&&&&&&push&&&&edx
.text:&&&&&&&&&&&&&&&&&mov&&&&&eax,&dword_10008B60
.text:&&&&&&&&&&&&&&&&&mov&&&&&ecx,&[eax]
.text:1000105B&&&&&&&&&&&&&&&&&call&&&&dword&ptr&[ecx+160h]&;&GetCapabilities
.text:&&&&&&&&&&&&&&&&&mov&&&&&[ebp+var_4],&eax
.text:&&&&&&&&&&&&&&&&&cmp&&&&&[ebp+var_4],&0
.text:&&&&&&&&&&&&&&&&&jz&&&&&&short&loc_
.text:1000106A&&&&&&&&&&&&&&&&&mov&&&&&edx,&[ebp+var_4]
.text:1000106D&&&&&&&&&&&&&&&&&push&&&&edx
.text:1000106E&&&&&&&&&&&&&&&&&push&&&&offset&aErrorGetcapabi&;&&ERROR:&GetCapabilities&failed,&error=%d&...
.text:&&&&&&&&&&&&&&&&&push&&&&offset&File&&&&&;&File
.text:&&&&&&&&&&&&&&&&&call&&&&_fprintf
.text:1000107D&&&&&&&&&&&&&&&&&add&&&&&esp,&0Ch
.text:&loc_:&&&&&&&&&&&&&&&&&&&&&&&&&&&;&CODE&XREF:&Agent_OnLoad(x,x,x)+68j
.text:&&&&&&&&&&&&&&&&&mov&&&&&eax,&[ebp+var_A4]
.text:&&&&&&&&&&&&&&&&&or&&&&&&eax,&4000000h
.text:1000108B&&&&&&&&&&&&&&&&&mov&&&&&[ebp+var_A4],&eax
.text:&&&&&&&&&&&&&&&&&lea&&&&&ecx,&[ebp+var_A4]
.text:&&&&&&&&&&&&&&&&&push&&&&ecx
.text:&&&&&&&&&&&&&&&&&mov&&&&&edx,&dword_10008B60
.text:1000109E&&&&&&&&&&&&&&&&&push&&&&edx
.text:1000109F&&&&&&&&&&&&&&&&&mov&&&&&eax,&dword_10008B60
.text:&&&&&&&&&&&&&&&&&mov&&&&&ecx,&[eax]
.text:&&&&&&&&&&&&&&&&&call&&&&dword&ptr&[ecx+234h]&;&add&JVMTI
.text:100010AC&&&&&&&&&&&&&&&&&mov&&&&&[ebp+var_4],&eax
.text:100010AF&&&&&&&&&&&&&&&&&cmp&&&&&[ebp+var_4],&0
.text:&&&&&&&&&&&&&&&&&jz&&&&&&short&loc_
.text:&&&&&&&&&&&&&&&&&mov&&&&&edx,&[ebp+var_4]
.text:&&&&&&&&&&&&&&&&&push&&&&edx
.text:&&&&&&&&&&&&&&&&&push&&&&offset&aErrorUnableToA&;&&ERROR:&Unable&to&add&necessary&JVMTI&ca&...
.text:100010BE&&&&&&&&&&&&&&&&&push&&&&offset&File&&&&&;&File
.text:&&&&&&&&&&&&&&&&&call&&&&_fprintf
.text:&&&&&&&&&&&&&&&&&add&&&&&esp,&0Ch
.text:100010CB&&&&&&&&&&&&&&&&&mov&&&&&eax,&0FFFFFFFEh
.text:&&&&&&&&&&&&&&&&&jmp&&&&&loc_
.text:&;&---------------------------------------------------------------------------
.text:&loc_:&&&&&&&&&&&&&&&&&&&&&&&&&&&;&CODE&XREF:&Agent_OnLoad(x,x,x)+B3j
.text:&&&&&&&&&&&&&&&&&push&&&&8Ch&&&&&&&&&&&&&;&Size
.text:100010DA&&&&&&&&&&&&&&&&&push&&&&0&&&&&&&&&&&&&&&;&Val
.text:100010DC&&&&&&&&&&&&&&&&&lea&&&&&eax,&[ebp+Dst]
.text:&&&&&&&&&&&&&&&&&push&&&&eax&&&&&&&&&&&&&;&Dst
.text:&&&&&&&&&&&&&&&&&call&&&&_memset
.text:&&&&&&&&&&&&&&&&&add&&&&&esp,&0Ch
.text:100010EB&&&&&&&&&&&&&&&&&mov&&&&&[ebp+var_84],&offset&sub_&&&&&&&&&注意此处
.text:&&&&&&&&&&&&&&&&&push&&&&8Ch
.text:100010FA&&&&&&&&&&&&&&&&&lea&&&&&ecx,&[ebp+Dst]
.text:&&&&&&&&&&&&&&&&&push&&&&ecx
.text:&&&&&&&&&&&&&&&&&mov&&&&&edx,&dword_10008B60
.text:&&&&&&&&&&&&&&&&&push&&&&edx
.text:&&&&&&&&&&&&&&&&&mov&&&&&eax,&dword_10008B60
.text:1000110D&&&&&&&&&&&&&&&&&mov&&&&&ecx,&[eax]
.text:1000110F&&&&&&&&&&&&&&&&&call&&&&dword&ptr&[ecx+1E4h]
.text:&&&&&&&&&&&&&&&&&push&&&&0
.text:&&&&&&&&&&&&&&&&&push&&&&37h&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&注意此处
.text:&&&&&&&&&&&&&&&&&push&&&&1
.text:1000111B&&&&&&&&&&&&&&&&&mov&&&&&edx,&dword_10008B60
.text:&&&&&&&&&&&&&&&&&push&&&&edx
.text:&&&&&&&&&&&&&&&&&mov&&&&&eax,&dword_10008B60
.text:&&&&&&&&&&&&&&&&&mov&&&&&ecx,&[eax]
.text:&&&&&&&&&&&&&&&&&call&&&&dword&ptr&[ecx+4]
.text:1000112C&&&&&&&&&&&&&&&&&add&&&&&esp,&10h
.text:1000112F&&&&&&&&&&&&&&&&&push&&&&0
.text:&&&&&&&&&&&&&&&&&push&&&&36h&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&注意此处
.text:&&&&&&&&&&&&&&&&&push&&&&1
.text:&&&&&&&&&&&&&&&&&mov&&&&&edx,&dword_10008B60
.text:1000113B&&&&&&&&&&&&&&&&&push&&&&edx
.text:1000113C&&&&&&&&&&&&&&&&&mov&&&&&eax,&dword_10008B60
.text:&&&&&&&&&&&&&&&&&mov&&&&&ecx,&[eax]
.text:&&&&&&&&&&&&&&&&&call&&&&dword&ptr&[ecx+4]
.text:&&&&&&&&&&&&&&&&&add&&&&&esp,&10h
.text:&&&&&&&&&&&&&&&&&push&&&&offset&unk_10008B64
.text:1000114E&&&&&&&&&&&&&&&&&push&&&&offset&aLock&&&&;&&lock&
.text:&&&&&&&&&&&&&&&&&mov&&&&&edx,&dword_10008B60
.text:&&&&&&&&&&&&&&&&&push&&&&edx
.text:1000115A&&&&&&&&&&&&&&&&&mov&&&&&eax,&dword_10008B60
.text:1000115F&&&&&&&&&&&&&&&&&mov&&&&&ecx,&[eax]
.text:&&&&&&&&&&&&&&&&&call&&&&dword&ptr&[ecx+78h]&;&create&raw&monitor
.text:&&&&&&&&&&&&&&&&&mov&&&&&[ebp+var_4],&eax
.text:&&&&&&&&&&&&&&&&&cmp&&&&&[ebp+var_4],&0
.text:1000116B&&&&&&&&&&&&&&&&&jz&&&&&&short&loc_1000118A
.text:1000116D&&&&&&&&&&&&&&&&&mov&&&&&edx,&[ebp+var_4]
.text:&&&&&&&&&&&&&&&&&push&&&&edx
.text:&&&&&&&&&&&&&&&&&push&&&&offset&aErrorUnableT_0&;&&ERROR:&Unable&to&create&raw&monitor:&%d&...
.text:&&&&&&&&&&&&&&&&&push&&&&offset&File&&&&&;&File
.text:1000117B&&&&&&&&&&&&&&&&&call&&&&_fprintf
.text:&&&&&&&&&&&&&&&&&add&&&&&esp,&0Ch
.text:&&&&&&&&&&&&&&&&&mov&&&&&eax,&0FFFFFFFDh
.text:&&&&&&&&&&&&&&&&&jmp&&&&&short&loc_
.text:1000118A&;&---------------------------------------------------------------------------
.text:1000118A
.text:1000118A&loc_1000118A:&&&&&&&&&&&&&&&&&&&&&&&&&&&;&CODE&XREF:&Agent_OnLoad(x,x,x)+16Bj
.text:1000118A&&&&&&&&&&&&&&&&&call&&&&lib_Init
.text:1000118F&&&&&&&&&&&&&&&&&test&&&&eax,&eax
.text:&&&&&&&&&&&&&&&&&jz&&&&&&short&loc_1000119A
.text:&&&&&&&&&&&&&&&&&mov&&&&&eax,&0FFFFFFFCh
.text:&&&&&&&&&&&&&&&&&jmp&&&&&short&loc_
.text:1000119A&;&---------------------------------------------------------------------------
.text:1000119A
.text:1000119A&loc_1000119A:&&&&&&&&&&&&&&&&&&&&&&&&&&&;&CODE&XREF:&Agent_OnLoad(x,x,x)+191j
.text:1000119A&&&&&&&&&&&&&&&&&cmp&&&&&[ebp+arg_4],&0
.text:1000119E&&&&&&&&&&&&&&&&&jz&&&&&&short&loc_100011BF
.text:&&&&&&&&&&&&&&&&&push&&&&offset&aDebug&&&;&&debug&
.text:&&&&&&&&&&&&&&&&&mov&&&&&eax,&[ebp+arg_4]
.text:&&&&&&&&&&&&&&&&&push&&&&eax
.text:&&&&&&&&&&&&&&&&&call&&&&unknown_libname_1&;&Microsoft&VisualC&2-8/net&runtime
.text:100011AE&&&&&&&&&&&&&&&&&add&&&&&esp,&8
.text:&&&&&&&&&&&&&&&&&test&&&&eax,&eax
.text:&&&&&&&&&&&&&&&&&jnz&&&&&short&loc_100011BF
.text:&&&&&&&&&&&&&&&&&mov&&&&&dword_10008B6C,&1
.text:100011BF
.text:100011BF&loc_100011BF:&&&&&&&&&&&&&&&&&&&&&&&&&&&;&CODE&XREF:&Agent_OnLoad(x,x,x)+19Ej
.text:100011BF&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&;&Agent_OnLoad(x,x,x)+1B3j
.text:100011BF&&&&&&&&&&&&&&&&&xor&&&&&eax,&eax
.text:&loc_:&&&&&&&&&&&&&&&&&&&&&&&&&&&;&CODE&XREF:&Agent_OnLoad(x,x,x)+41j
.text:&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&;&Agent_OnLoad(x,x,x)+D0j&...
.text:&&&&&&&&&&&&&&&&&mov&&&&&esp,&ebp
.text:&&&&&&&&&&&&&&&&&pop&&&&&ebp
.text:&&&&&&&&&&&&&&&&&retn&&&&0Ch
上面就是&Agent_OnLoad的代码,通过ICE执行的时候,单步跟踪,但是此处实际上只是做了
初始化的处理和设置。
经过多次调试,终于找到3处重要位置,即代码中标记&注意此处&的几个部分。
后来发现,这个代码实际上使用了&JVMTI技术,就&google了,以下,结果找到了&在&Java&SDK安装的Include中有描述,其中的&0x36&0x37&这两个&是一个标志位,代表了&ClassLoader的实现
经过仔细阅读代码,调试,终于找到&&mov&&&&&[ebp+var_84],&offset&sub_&
这一句,十分重要,应该是设置回调方法,一旦需要进行Class&Load的时候,就调用这个方法
基本的JVMTI实现中的&OnLoad方法,大体上是这样的
JNIEXPORT&jint&JNICALL&Agent_OnLoad(JavaVM&*vm,&char&*options,&void&*reserved)&
&&&&MethodTraceAgent*&agent&=&new&MethodTraceAgent();&
&&&&agent-&Init(vm);&
&&&&agent-&ParseOptions(options);&
&&&&agent-&AddCapability();&
&&&&agent-&RegisterEvent();&&&//&此处注册希望监听的事件类型,&0x36&0x37
5)查找字符串,上面的回调地址就是用字符串定位的
在IDA&中显示字符串,发现&%d.&class&%s&decrypted&successfully,&class&data&size:&%d&bytes.&&这一句,看来一切都没有问题,确实是通过JVMTI进行类解密的了
定位代码位置
子程序&sub_
看来和上面定位到的&offset&是一致的,因此在&sub_&处下断点,
继续执行程序
6)分析实际的类加载/解密过程&
&int&__stdcall&sub_(int,&int,&int,&int,&int,&int,&int&filelength,&void&*Buf1,&int,&int)
.text:&sub_&&&&proc&near&&&&&&&&&&&&&&&;&DATA&XREF:&Agent_OnLoad(x,x,x)+EBo
.text:&var_4&&&&&&&&&&&=&dword&ptr&-4
.text:&arg_0&&&&&&&&&&&=&dword&ptr&&8
.text:&arg_10&&&&&&&&&&=&dword&ptr&&18h
.text:&filelength&&&&&&=&dword&ptr&&20h
.text:&Buf1&&&&&&&&&&&&=&dword&ptr&&24h
.text:&arg_20&&&&&&&&&&=&dword&ptr&&28h
.text:&arg_24&&&&&&&&&&=&dword&ptr&&2Ch
.text:&&&&&&&&&&&&&&&&&push&&&&ebp&&&&&&&&&&&&&;&asdf
.text:&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&;&dfasdf
.text:&&&&&&&&&&&&&&&&&mov&&&&&ebp,&esp
.text:&&&&&&&&&&&&&&&&&push&&&&ecx
.text:&&&&&&&&&&&&&&&&&cmp&&&&&[ebp+filelength],&1Ch
.text:&&&&&&&&&&&&&&&&&jle&&&&&loc_
.text:1000128E&&&&&&&&&&&&&&&&&push&&&&4&&&&&&&&&&&&&&&;&Size
.text:&&&&&&&&&&&&&&&&&push&&&&offset&MAGIC&&&&;&Buf2
.text:&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&;&AA&BB&CC&DD
.text:&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&;
.text:&&&&&&&&&&&&&&&&&mov&&&&&eax,&[ebp+Buf1]
.text:&&&&&&&&&&&&&&&&&push&&&&eax&&&&&&&&&&&&&;&Buf1
.text:&&&&&&&&&&&&&&&&&call&&&&_memcmp
.text:1000129E&&&&&&&&&&&&&&&&&add&&&&&esp,&0Ch
.text:&&&&&&&&&&&&&&&&&test&&&&eax,&eax
.text:&&&&&&&&&&&&&&&&&jnz&&&&&loc_&&&&;&&不是以&AA&BB&CC&DD&开头,直接返回,否则进入解密部分
.text:&&&&&&&&&&&&&&&&&call&&&&lib_Init&&&&&&&&&&&&&&&&&&此方法&进行初始化
.text:100012AE&&&&&&&&&&&&&&&&&test&&&&eax,&eax
.text:&&&&&&&&&&&&&&&&&jz&&&&&&short&loc_
.text:&&&&&&&&&&&&&&&&&jmp&&&&&loc_
.text:&;&---------------------------------------------------------------------------
.text:&loc_:&&&&&&&&&&&&&&&&&&&&&&&&&&&;&CODE&XREF:&sub_j
.text:&&&&&&&&&&&&&&&&&mov&&&&&ecx,&dword_10008B68
.text:100012BD&&&&&&&&&&&&&&&&&add&&&&&ecx,&1
.text:&&&&&&&&&&&&&&&&&mov&&&&&dword_10008B68,&ecx
.text:&&&&&&&&&&&&&&&&&mov&&&&&edx,&[ebp+filelength]
.text:&&&&&&&&&&&&&&&&&sub&&&&&edx,&1Ch
.text:100012CC&&&&&&&&&&&&&&&&&mov&&&&&eax,&[ebp+arg_20]
.text:100012CF&&&&&&&&&&&&&&&&&mov&&&&&[eax],&edx
.text:&&&&&&&&&&&&&&&&&mov&&&&&ecx,&[ebp+arg_20]
.text:&&&&&&&&&&&&&&&&&mov&&&&&edx,&[ecx]
.text:&&&&&&&&&&&&&&&&&push&&&&edx
.text:&&&&&&&&&&&&&&&&&mov&&&&&eax,&[ebp+arg_0]
.text:100012DA&&&&&&&&&&&&&&&&&push&&&&eax
.text:100012DB&&&&&&&&&&&&&&&&&call&&&&sub_
.text:&&&&&&&&&&&&&&&&&add&&&&&esp,&8
.text:&&&&&&&&&&&&&&&&&mov&&&&&ecx,&[ebp+arg_24]
.text:&&&&&&&&&&&&&&&&&mov&&&&&[ecx],&eax
.text:&&&&&&&&&&&&&&&&&mov&&&&&edx,&[ebp+arg_20]
.text:100012EB&&&&&&&&&&&&&&&&&push&&&&edx
.text:100012EC&&&&&&&&&&&&&&&&&mov&&&&&eax,&[ebp+arg_24]
.text:100012EF&&&&&&&&&&&&&&&&&mov&&&&&ecx,&[eax]
.text:&&&&&&&&&&&&&&&&&push&&&&ecx
.text:&&&&&&&&&&&&&&&&&mov&&&&&edx,&[ebp+filelength]
.text:&&&&&&&&&&&&&&&&&push&&&&edx
.text:&&&&&&&&&&&&&&&&&mov&&&&&eax,&[ebp+Buf1]
.text:&&&&&&&&&&&&&&&&&push&&&&eax
.text:100012FA&&&&&&&&&&&&&&&&&call&&&&sub_&&&&&&&&&&&&&//&针对&文件数据的解密
.text:100012FF&&&&&&&&&&&&&&&&&add&&&&&esp,&10h
.text:&&&&&&&&&&&&&&&&&mov&&&&&[ebp+var_4],&eax
.text:&&&&&&&&&&&&&&&&&cmp&&&&&[ebp+var_4],&0
.text:&&&&&&&&&&&&&&&&&jz&&&&&&short&loc_
.text:1000130B&&&&&&&&&&&&&&&&&mov&&&&&ecx,&[ebp+var_4]
.text:1000130E&&&&&&&&&&&&&&&&&push&&&&ecx
.text:1000130F&&&&&&&&&&&&&&&&&mov&&&&&edx,&[ebp+arg_10]
.text:&&&&&&&&&&&&&&&&&push&&&&edx
.text:&&&&&&&&&&&&&&&&&push&&&&offset&aDecryptClassSF&;&&Decrypt&class:&%s&fail!&Return&code:&%d&...
.text:&&&&&&&&&&&&&&&&&push&&&&offset&File&&&&&;&File
.text:1000131D&&&&&&&&&&&&&&&&&call&&&&_fprintf
.text:&&&&&&&&&&&&&&&&&add&&&&&esp,&10h
.text:&loc_:&&&&&&&&&&&&&&&&&&&&&&&&&&&;&CODE&XREF:&sub_j
.text:&&&&&&&&&&&&&&&&&cmp&&&&&dword_10008B6C,&0
.text:1000132C&&&&&&&&&&&&&&&&&jz&&&&&&short&loc_
.text:1000132E&&&&&&&&&&&&&&&&&mov&&&&&eax,&[ebp+arg_20]
.text:&&&&&&&&&&&&&&&&&mov&&&&&ecx,&[eax]
.text:&&&&&&&&&&&&&&&&&push&&&&ecx
.text:&&&&&&&&&&&&&&&&&mov&&&&&edx,&[ebp+arg_10]
.text:&&&&&&&&&&&&&&&&&push&&&&edx
.text:&&&&&&&&&&&&&&&&&mov&&&&&eax,&dword_10008B68
.text:1000133D&&&&&&&&&&&&&&&&&push&&&&eax
.text:1000133E&&&&&&&&&&&&&&&&&push&&&&offset&aD_ClassSDecryp&;&&%d.&class&%s&decrypted&successfully,&cl&...
.text:&&&&&&&&&&&&&&&&&push&&&&offset&File&&&&&;&File
.text:&&&&&&&&&&&&&&&&&call&&&&_fprintf
.text:1000134D&&&&&&&&&&&&&&&&&add&&&&&esp,&14h
.text:&loc_:&&&&&&&&&&&&&&&&&&&&&&&&&&&;&CODE&XREF:&sub_j
.text:&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&;&sub_j&...
.text:&&&&&&&&&&&&&&&&&mov&&&&&esp,&ebp
.text:&&&&&&&&&&&&&&&&&pop&&&&&ebp
.text:&&&&&&&&&&&&&&&&&retn&&&&28h
.text:&sub_&&&&endp
解密字节数据的部分实际上在&&.text:100012FA&&&&&&&&&&&&&&&&&call&&&&sub_
6)数据解密部分
&&/$&&55&&&&&&&&&&&&push&&&&ebp
&&|.&&8BEC&&&&&&&&&&mov&&&&&ebp,&esp
&&|.&&83EC&34&&&&&&&sub&&&&&esp,&34
&&|.&&833D&748B0010&cmp&&&&&dword&ptr&[10008B74],&0
1000180D&&|.&&75&11&&&&&&&&&jnz&&&&&short&
1000180F&&|.&&8B45&14&&&&&&&mov&&&&&eax,&dword&ptr&[ebp+14]
&&|.&&C700&&mov&&&&&dword&ptr&[eax],&0
&&|.&&83C8&FF&&&&&&&or&&&&&&eax,&FFFFFFFF
1000181B&&|.&&E9&B6000000&&&jmp&&&&&
&&|&&&837D&0C&1C&&&&cmp&&&&&dword&ptr&[ebp+C],&1C&&&&&&&&&&&&;&&buflen
&&|.&&7D&13&&&&&&&&&jge&&&&&short&
&&|.&&8B4D&14&&&&&&&mov&&&&&ecx,&dword&ptr&[ebp+14]
&&|.&&C701&&mov&&&&&dword&ptr&[ecx],&0
1000182F&&|.&&B8&FEFFFFFF&&&mov&&&&&eax,&-2
&&|.&&E9&9D000000&&&jmp&&&&&
&&|&&&6A&18&&&&&&&&&push&&&&18
1000183B&&|.&&8B55&08&&&&&&&mov&&&&&edx,&dword&ptr&[ebp+8]&&&&&&&&&&&;&&buf
1000183E&&|.&&83C2&04&&&&&&&add&&&&&edx,&4
&&|.&&52&&&&&&&&&&&&push&&&&edx
&&|.&&8D45&E8&&&&&&&lea&&&&&eax,&dword&ptr&[ebp-18]
&&|.&&50&&&&&&&&&&&&push&&&&eax
&&|.&&E8&&&&call&&&&10001AC0&&&&&&&&&&&&&&&&&&&&&&&&&;&&_memcpy(dest,buf,0x18)
1000184B&&|.&&83C4&0C&&&&&&&add&&&&&esp,&0C
1000184E&&|.&&6A&18&&&&&&&&&push&&&&18
&&|.&&8D4D&E8&&&&&&&lea&&&&&ecx,&dword&ptr&[ebp-18]
&&|.&&51&&&&&&&&&&&&push&&&&ecx
&&|.&&E8&17FDFFFF&&&call&&&&doExchange4Bits&&&&&&&&&&&&&&&&&&;&&doExchange4Bits(dst,18)
&&|.&&83C4&08&&&&&&&add&&&&&esp,&8
1000185C&&|.&&8D55&D0&&&&&&&lea&&&&&edx,&dword&ptr&[ebp-30]
1000185F&&|.&&52&&&&&&&&&&&&push&&&&edx
&&|.&&6A&18&&&&&&&&&push&&&&18
&&|.&&8D45&E8&&&&&&&lea&&&&&eax,&dword&ptr&[ebp-18]&&&&&&&&&&;&&dest
&&|.&&50&&&&&&&&&&&&push&&&&eax
&&|.&&6A&04&&&&&&&&&push&&&&4
&&|.&&68&&&&push&&&&&&&&&&&&&&&&&&&&&&&&&&&&&;&&87&76&65&54&&&head&key
1000186D&&|.&&E8&8EFCFFFF&&&call&&&&doXor
&&|.&&83C4&14&&&&&&&add&&&&&esp,&14
&&|.&&8B4D&08&&&&&&&mov&&&&&ecx,&dword&ptr&[ebp+8]&&&&&&&&&&&;&&buf
&&|.&&83C1&1C&&&&&&&add&&&&&ecx,&1C
1000187B&&|.&&894D&CC&&&&&&&mov&&&&&dword&ptr&[ebp-34],&ecx
1000187E&&|.&&8B55&0C&&&&&&&mov&&&&&edx,&dword&ptr&[ebp+C]&&&&&&&&&&&;&&buflen
&&|.&&83EA&1C&&&&&&&sub&&&&&edx,&1C
&&|.&&8B45&14&&&&&&&mov&&&&&eax,&dword&ptr&[ebp+14]&&&&&&&&&&;&&arg_C
&&|.&&8910&&&&&&&&&&mov&&&&&dword&ptr&[eax],&edx&&&&&&&&&&&&&;&&edx&剩余的长度
&&|.&&8B4D&10&&&&&&&mov&&&&&ecx,&dword&ptr&[ebp+10]&&&&&&&&&&;&&arg_8&result
1000188C&&|.&&51&&&&&&&&&&&&push&&&&ecx
1000188D&&|.&&8B55&14&&&&&&&mov&&&&&edx,&dword&ptr&[ebp+14]
&&|.&&8B02&&&&&&&&&&mov&&&&&eax,&dword&ptr&[edx]
&&|.&&50&&&&&&&&&&&&push&&&&eax&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&;&&剩余文件长度
&&|.&&8B4D&CC&&&&&&&mov&&&&&ecx,&dword&ptr&[ebp-34]&&&&&&&&&&;&&剩余的文件数据
&&|.&&51&&&&&&&&&&&&push&&&&ecx
&&|.&&6A&18&&&&&&&&&push&&&&18
&&|.&&8D55&D0&&&&&&&lea&&&&&edx,&dword&ptr&[ebp-30]&&&&&&&&&&;&&经过doXor&之后的&header部分
1000189C&&|.&&52&&&&&&&&&&&&push&&&&edx
1000189D&&|.&&E8&5EFCFFFF&&&call&&&&doXor
&&|.&&83C4&14&&&&&&&add&&&&&esp,&14
&&|.&&8B45&14&&&&&&&mov&&&&&eax,&dword&ptr&[ebp+14]
&&|.&&8B08&&&&&&&&&&mov&&&&&ecx,&dword&ptr&[eax]
100018AA&&|.&&51&&&&&&&&&&&&push&&&&ecx&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&;&&剩余文件长度
100018AB&&|.&&8B55&10&&&&&&&mov&&&&&edx,&dword&ptr&[ebp+10]
100018AE&&|.&&52&&&&&&&&&&&&push&&&&edx
100018AF&&|.&&E8&BCFCFFFF&&&call&&&&doExchange4Bits
&&|.&&83C4&08&&&&&&&add&&&&&esp,&8
&&|.&&8B45&10&&&&&&&mov&&&&&eax,&dword&ptr&[ebp+10]&&&&&&&&&&;&&result2
100018BA&&|.&&50&&&&&&&&&&&&push&&&&eax
100018BB&&|.&&8B4D&14&&&&&&&mov&&&&&ecx,&dword&ptr&[ebp+14]
100018BE&&|.&&8B11&&&&&&&&&&mov&&&&&edx,&dword&ptr&[ecx]
&&|.&&52&&&&&&&&&&&&push&&&&edx&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&;&&剩余长度
&&|.&&8B45&10&&&&&&&mov&&&&&eax,&dword&ptr&[ebp+10]
&&|.&&50&&&&&&&&&&&&push&&&&eax
&&|.&&6A&10&&&&&&&&&push&&&&10
&&|.&&68&&&&push&&&&
100018CC&&|.&&E8&2FFCFFFF&&&call&&&&doXor
&&|.&&83C4&14&&&&&&&add&&&&&esp,&14
&&|.&&33C0&&&&&&&&&&xor&&&&&eax,&eax
&&|&&&8BE5&&&&&&&&&&mov&&&&&esp,&ebp
&&|.&&5D&&&&&&&&&&&&pop&&&&&ebp
&&\.&&C3&&&&&&&&&&&&retn
7)上述汇编代码是在看着郁闷,因此,用Java实现一套完整的类文件解密方法
自己太懒了,用代码说话
//&类解密入口,fbuf&为实际的文件数据&
&private&static&byte[]&decrypt(byte[]&fbuf)&{
&&&&&&&&boolean&bOK&=&
&&&&&&&&byte[]&ret&=&
&&&&&&&&int&flen&=&fbuf.
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&//&0x1C&为加密后的文件的头部分
&&&&&&&&if&(flen&&&0x1c)&{
&&&&&&&&&&&&bOK&=&
&&&&&&&&int&off&=&0;
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&//&检查&AA&BB&CC&DD
&&&&&&&&for&(;&off&&&4;&off++)&{
&&&&&&&&&&&&if&(fbuf[off]&!=&magic[off])&{
&&&&&&&&&&&&&&&&bOK&=&
&&&&&&&&&&&&&&&&
&&&&&&&&&&&&}
&&&&&&&&if&(bOK)&{
&&&&&&&&&&&&//&TODO&解密操作
&&&&&&&&&&&&int&hlen&=&0x18;&&&&&&&&&&&&&&&&&&//&0x1c&-&4&=&0x18&刨除去得&4&字节&magic
&&&&&&&&&&&&ByteArrayOutputStream&bout&=&
&&&&&&&&&&&&byte[]&header&=&
&&&&&&&&&&&&try&{
&&&&&&&&&&&&&&&&bout&=&new&ByteArrayOutputStream();
&&&&&&&&&&&&&&&&int&headerEnd&=&hlen&+&
&&&&&&&&&&&&&&&&for&(;&off&&&headerE&off++)&{
&&&&&&&&&&&&&&&&&&&&bout.write(fbuf[off]);
&&&&&&&&&&&&&&&&}
&&&&&&&&&&&&&&&&header&=&bout.toByteArray();
&&&&&&&&&&&&}&catch&(Exception&e)&{
&&&&&&&&&&&&&&&&e.printStackTrace();
&&&&&&&&&&&&}&finally&{
&&&&&&&&&&&&&&&&if&(bout&!=&null)&{
&&&&&&&&&&&&&&&&&&&&try&{
&&&&&&&&&&&&&&&&&&&&&&&&bout.close();
&&&&&&&&&&&&&&&&&&&&}&catch&(IOException&e)&{
&&&&&&&&&&&&&&&&&&&&&&&&e.printStackTrace();
&&&&&&&&&&&&&&&&&&&&}
&&&&&&&&&&&&&&&&&&&&bout&=&
&&&&&&&&&&&&&&&&}
&&&&&&&&&&&&}
&&&&&&&&&&&&if&(header&!=&null)&{
&&&&&&&&&&&&&&&&//&TODO&此处继续执行
&&&&&&&&&&&&&&&&doExchange4Bits(header);&&&&&&&&&&&&&&&&&&&//&针对头部的数据进行处理,生成整个类
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&//&文件的解密密钥
&&&&&&&&&&&&&&&&byte[]&clsKey&=&doXor(header_key,&header);&&//&计算后的密钥
&&&&&&&&&&&&&&&&byte[]&cfbuf&=&
&&&&&&&&&&&&&&&&try&{
&&&&&&&&&&&&&&&&&&&&bout&=&new&ByteArrayOutputStream();
&&&&&&&&&&&&&&&&&&&&//&TODO&由于&off&一直在变化&因此使用&off&作为偏移变量
&&&&&&&&&&&&&&&&&&&&for&(;&off&&&&off++)&{
&&&&&&&&&&&&&&&&&&&&&&&&bout.write(fbuf[off]);
&&&&&&&&&&&&&&&&&&&&}
&&&&&&&&&&&&&&&&&&&&cfbuf&=&bout.toByteArray();
&&&&&&&&&&&&&&&&}&catch&(Exception&e)&{
&&&&&&&&&&&&&&&&&&&&e.printStackTrace();
&&&&&&&&&&&&&&&&}&finally&{
&&&&&&&&&&&&&&&&&&&&if&(bout&!=&null)&{
&&&&&&&&&&&&&&&&&&&&&&&&try&{
&&&&&&&&&&&&&&&&&&&&&&&&&&&&bout.close();
&&&&&&&&&&&&&&&&&&&&&&&&}&catch&(IOException&e)&{
&&&&&&&&&&&&&&&&&&&&&&&&&&&&e.printStackTrace();
&&&&&&&&&&&&&&&&&&&&&&&&}
&&&&&&&&&&&&&&&&&&&&}
&&&&&&&&&&&&&&&&}
&&&&&&&&&&&&&&&&if&(cfbuf&!=&null)&{
&&&&&&&&&&&&&&&&&&&&//&TODO&解密文件&&&&&&&&&&&&&&&&&&使用密钥解密类文件的剩余部分
&&&&&&&&&&&&&&&&&&&&byte[]&dcbuf&=&doXor(clsKey,&cfbuf);&&&&&&&&&&&//&XOR&操作
&&&&&&&&&&&&&&&&&&&&doExchange4Bits(dcbuf);&&&&&&&&&&&&&&&&&&&&&&&&&&&//&高低4位交换
&&&&&&&&&&&&&&&&&&&&ret&=&doXor(cls_key,&dcbuf);&&&&&&&&&&&&&&&&&&&&&&//&再次进行XOR
&&&&&&&&&&&&&&&&}
&&&&&&&&&&&&}
&&&&&&&&return&&&&&&&&&&&&&&&&&&//&生成真正的&Class&文件内容,又看到了&亲切的
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&//&CAFE&BABE了
&&&&private&static&byte[]&doXor(byte[]&key,&byte[]&buf)&{
&&&&&&&&byte[]&ret&=&
&&&&&&&&if&(key&!=&null&&&&buf&!=&null)&{
&&&&&&&&&&&&int&klen&=&key.
&&&&&&&&&&&&int&blen&=&buf.
&&&&&&&&&&&&int&j&=&0;
&&&&&&&&&&&&ret&=&new&byte[blen];
&&&&&&&&&&&&for&(int&i&=&0;&i&&&&i++)&{
&&&&&&&&&&&&&&&&ret[i]&=&(byte)&(buf[i]&^&key[j]);
&&&&&&&&&&&&&&&&j++;
&&&&&&&&&&&&&&&&if&(j&&=&klen)&{
&&&&&&&&&&&&&&&&&&&&j&=&0;
&&&&&&&&&&&&&&&&}
&&&&&&&&&&&&}
&&&&&&&&return&
&&&&private&static&void&doExchange4Bits(byte[]&buf)&{
&&&&&&&&if&(buf&!=&null)&{
&&&&&&&&&&&&int&len&=&buf.
&&&&&&&&&&&&int&h,&l,&
&&&&&&&&&&&&for&(int&i&=&0;&i&&&&i++)&{
&&&&&&&&&&&&&&&&l&=&(buf[i]&&&0x0f);
&&&&&&&&&&&&&&&&h&=&(buf[i]&&&0x0f0);
&&&&&&&&&&&&&&&&ret&=&((l&&&&4)&+&(h&&&&4));
&&&&&&&&&&&&&&&&buf[i]&=&(byte)&
&&&&&&&&&&&&}
&&&&主要针对&Agent_OnLoad的设置,来查找相应的事件监听,根据事件,进行类文件解密操作,
&&&&通过指定&&agentlib来进行类加载实现。
通过编写代码,进行jar文件中所有class文件的解密,解密后的文件比解密之前少了&0x1C个字节
类文件又能够反编译了,
不过使用了混淆器,进行了字符串加密,不过,已经是不安全了。
Have&a&Good&Day!

我要回帖

更多关于 955开头的是什么银行 的文章

 

随机推荐