ZipperDown是2018年曝出的高危移动端安全漏洞(CVE-2018-10094),影响iOS/macOS平台使用zip解压功能的应用程序。该漏洞允许攻击者通过构造恶意zip文件实现目录穿越攻击和任意文件覆盖。
漏洞危害等级:高危
影响范围:使用非安全方式处理zip文件的iOS/macOS应用
漏洞核心在于zip解压时未正确处理以下两种情况:
// 典型漏洞代码示例
NSData *zipData = [NSData dataWithContentsOfFile:zipPath];
[SSZipArchive unzipFileAtPath:zipPath toDestination:destPath];
| 检测方式 | 实施方法 |
|---|---|
| 静态分析 | 检查是否使用SSZipArchive等库的不安全版本 |
| 动态测试 | 构造包含../路径的测试zip文件 |
| 工具扫描 | 使用MobSF等移动安全扫描工具 |
NSString *sanitizedPath = [destPath stringByAppendingPathComponent:fileName];
if (![sanitizedPath hasPrefix:destPath]) {
// 路径非法处理
}
disableSymbolicLinks = YES1. 使用苹果官方NSFileManager进行文件操作
2. 定期进行第三方库安全审计
3. 实施自动化安全扫描流程
建议开发团队参考OWASP Mobile Top 10安全规范,建立完整的安全开发生命周期(SDLC)。