Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zip条目覆盖 #32

Open
QiAnXinCodeSafe opened this issue Apr 2, 2019 · 1 comment
Open

zip条目覆盖 #32

QiAnXinCodeSafe opened this issue Apr 2, 2019 · 1 comment

Comments

@QiAnXinCodeSafe
Copy link

您好:
在ZipFileUtils.java文件中的uozip2Dir()方法是为了将zip包解压到指定文件夹中,但由于解压过程中没有对条目名做校验,导致攻击者可能通过构造带有../的zip文件,解压时会覆盖指定目录之外的敏感文件
图片

修复方法:
图片

@Earlonus
Copy link
Collaborator

Earlonus commented Apr 2, 2019

您好:
在ZipFileUtils.java文件中的uozip2Dir()方法是为了将zip包解压到指定文件夹中,但由于解压过程中没有对条目名做校验,导致攻击者可能通过构造带有../的zip文件,解压时会覆盖指定目录之外的敏感文件
图片

修复方法:
图片

和刚刚那个问题的情况是一样的,我们这里解压的是实时下拉的RuntimeView数据包,数据包的MD5是通过业务加密通道下行的,下拉的包会经过MD5校验后保存在私有目录(开源版本为了学习方便配置了SD卡目录,今天内会提交一个patch改成私有目录)。因此解压这个过程是发生在zip包进行了MD5校验之后,因此希望能了解到整个模拟攻击过程详情,以便于加强安全措施,修复漏洞。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants