首页
社区
课程
招聘
[求助]classes.dex有密码保护,无法解压出来
发表于: 2013-7-4 09:27 35987

[求助]classes.dex有密码保护,无法解压出来

2013-7-4 09:27
35987
RT,请问这是怎么做到的? 试过用winrar添加密码,但是sign apk时出错


[课程]Linux pwn 探索篇!

上传的附件:
收藏
免费 0
支持
分享
最新回复 (36)
雪    币: 1413
活跃值: (401)
能力值: (RANK:270 )
在线值:
发帖
回帖
粉丝
2
用这个脚本来解即可:
https://github.com/blueboxsecurity/DalvikBytecodeTampering/blob/master/unpack.py
2013-7-4 10:59
0
雪    币: 1
活跃值: (11)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
谢谢版主!那请问怎么做到classes.dex有密码保护这个效果呢?有脚本可以实现吗?
2013-7-4 12:19
0
雪    币: 189
活跃值: (192)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
4
伪加密,修改zip的头,把文件的加密标志设置为ture,还原就把加密标志设置为false.利用了Android处理zip文件不判断头里的加密信息,其他压缩软件,java默认实现的zip api都有检测zip头中的加密信息
2013-7-4 12:35
0
雪    币: 33
活跃值: (145)
能力值: ( LV7,RANK:100 )
在线值:
发帖
回帖
粉丝
5
good point!
2013-7-4 12:55
0
雪    币: 33
活跃值: (145)
能力值: ( LV7,RANK:100 )
在线值:
发帖
回帖
粉丝
6
http://bluebox.com/labs/android-security-challenge/
This challenge isn’t just about mucking around in DVM internals; it also leverages many tricks in APK file packaging.  Sure, it is basically a Zip file format, but how Android parses an APK deviates from how standard Zip tools work.  Our challenge crackme leveraged discrepancies in Zip file handling to make it harder to analyze the APK file. In other words most Zip file unpacker are not able to extract the files within our APK. This is because Android while processing an APK doesn’t use all fields within the Zip file header. It basically ignores some of them, this includes the ‘isEncrypted’ flag of the ‘General purpose bit flag’ field. Android just assumes that files are not encrypted. Unpacker instead have to take care about this flag and so they are prompting the user for a password, which does not exists because the files are not encrypted. To give you an idea what this means, we have prepared a well known malware sample and uploaded it to virustotal.com. As you can see in Figure 3, making modifications to the ZIP internals of the APK causes the detection rate to drop since analysis system is not able to look inside the APK itself.  The behavioural analysis was also skipped (presumably due to inability to load the APK file), indicated by the missing behavioral analysis report link in the screenshot
2013-7-4 15:53
0
雪    币: 6372
活跃值: (697)
能力值: ( LV5,RANK:70 )
在线值:
发帖
回帖
粉丝
7
还没遇到过,先看一下,以后备用
2013-7-19 09:18
0
雪    币: 2
活跃值: (24)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
8
你好,我看了也很有疑惑,我是新手,请问怎么获取这个包头信息呢,有没什么工具方便一点的。
新手求指点,谢谢。

我下载了ZIP,解压出来是APK,无法反编译。
2013-7-19 15:32
0
雪    币: 118
活跃值: (21)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
9
学习了……
2013-7-20 03:09
0
雪    币: 46
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
10
试了  file参数是什么? 我设置成 classes.dex 怎么解不出
2013-7-20 06:30
0
雪    币: 793
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
11
脚本和app.apk放在相同目录下,进入目录
usage: unpack [-h] apk [file[file ...]]
命令行:unpack.py app.apk AndroidManifest.xml classes.dex resources.arsc
2013-7-20 22:14
0
雪    币: 192
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
12
apktool好像不能反编译这个apk
2013-7-23 09:37
0
雪    币: 6
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
13
学习了。。。
2013-7-26 15:50
0
雪    币: 38
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
14
我把app.apk和unpack.py放在同一个文件夹后,用python2.6.6运行unpack.py,结果出现
Traceback (most recent call last):
  File "D:\a\unpack.py", line 16, in <module>
    import argparse
ImportError: No module named argparse
请问这是什么问题
2013-8-2 00:12
0
雪    币: 90
活跃值: (126)
能力值: ( LV6,RANK:80 )
在线值:
发帖
回帖
粉丝
15
没有那个模块
2013-8-5 14:23
0
雪    币: 38
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
16
请问那个模块哪里有下载
2013-8-6 01:03
0
雪    币: 90
活跃值: (126)
能力值: ( LV6,RANK:80 )
在线值:
发帖
回帖
粉丝
17
https://pypi.python.org/pypi/argparse 个人觉得这种问题先谷歌比较好
2013-8-6 13:11
0
雪    币: 2
活跃值: (24)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
18
大哥,怎么才能看到zip的头,和修改这个头呢?能指点一下吗,我QQ,564851555。
感谢了,大哥。
2013-8-7 16:26
0
雪    币: 2
活跃值: (24)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
19
你好,请问你的问题解决了吗,怎么解决的呀?我不知道怎么打开包头信息来看,也不知道怎么修改。
2013-8-7 16:47
0
雪    币: 189
活跃值: (192)
能力值: ( LV3,RANK:20 )
在线值:
发帖
回帖
粉丝
20
Apk伪加密实现与破解JAVA源码
http://bbs.pediy.com/showthread.php?t=174874

apktool wip2.0已经支持伪加密的apk解压.他用了第三方库org.apache.commons来处理
这个库有一个方法:
useEncryption(false);
可以设置是否检测加密信息的
2013-8-10 17:22
0
雪    币: 1376
活跃值: (1621)
能力值: ( LV3,RANK:30 )
在线值:
发帖
回帖
粉丝
21
因为python脚本有版本差异,建议用2.7.5版本
2013-8-12 00:10
0
雪    币: 1376
活跃值: (1621)
能力值: ( LV3,RANK:30 )
在线值:
发帖
回帖
粉丝
22
第一步:脚本和app.apk放在相同目录下,进入目录,用命令行:unpack.py app.apk AndroidManifest.xml classes.dex resources.arsc解压。
第二步:把assets、META-INF、res三个文件夹从apk文件中拖出来,和用脚本解压出的三个文件一起压缩成apk文件,一切ok。

注释:1.因为python脚本有版本2.x和3.x的差异,建议用2.7.5版本
2. usage: unpack [-h] apk [file[file ...]]
2013-8-12 00:19
0
雪    币: 201
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
23
路过,学习了
2013-8-13 09:00
0
雪    币: 5
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
24
感谢分享了的
2013-9-2 14:55
0
雪    币: 15
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
25
路过,学习了
2013-9-3 21:13
0
游客
登录 | 注册 方可回帖
返回
//