search
HomeOperation and MaintenanceSafetyHow to solve the ZipperDown vulnerability

How to solve the ZipperDown vulnerability

May 13, 2023 am 11:55 AM
zipperdown

Attack conditions for the ZipperDown security vulnerability:

1. The App uses ZipArchive

2. The transmission process of a zip package issued by the App is not encrypted, and the zip package is not encrypted

3. The App uses JSPatch or other execution engines, and the local script is not encrypted. The script can be executed as long as it is placed in the specified directory, and the legality of the local script is not verified.

4. User Connect to unreliable WIFI hotspots for network communication

Methods to circumvent this vulnerability; Developers' own circumvention methods:

1. Repair the SSZipArchive library. In the unzipFileAtPath decompression function, there may be errors that may cause Intercept the "../" string when traversing the directory.

2. When the client communicates with the server, use the HTTPS secure transmission protocol to ensure that the data in the interaction between the APP and the server is encrypted by the HTTPS protocol;

3. Download the zip of the APP The package file is encrypted and protected during transmission, and the integrity and legality of the zip package are verified on the client to prevent it from being replaced;

4. Encrypt the local script in the APP and encrypt the local script Verify integrity and legality to prevent replacement;

Extension: ZipperDown is not a new vulnerability, but a "very classic security issue", and its impact mainly depends on the specific App and The permissions it obtained, and a similar vulnerability "File Directory Traversal Vulnerability" was also found on the Android platform

Regarding the file directory traversal vulnerability, the premise for the vulnerability to occur:

Use decompression in Android applications File, such as dynamic loading mechanism, download apk/zip, and then decompress it locally;

Cause of the vulnerability

Because the ZipOutputStream class does not impose any restrictions on the file name when compressing the file. If the downloaded zip package is maliciously intercepted and modified, the file name can be named "../../../../data/data/xxx.xxx.x/xxx" because Android is based on Linux System, in the Linux system, the ../ symbol represents returning to the upper directory, so you can get a few more symbols here, so that you will return to the root directory of the Android system, and then enter the sandbox directory of the current application. , write a file.

Risks of the ZipperDown vulnerability

Through this vulnerability, attackers can destroy application data, obtain user private data, and even gain the ability to execute arbitrary code.

Avoidance measures; Developer's own circumvention methods:

1. When decompressing ZipEntry, filter the decompression of files with special characters, or decompress to local file names that cannot contain special characters;

2. When the client communicates with the server, use the HTTPS secure transmission protocol to ensure that the data in the interaction between the APP and the server is encrypted by the HTTPS protocol;

3. Download the zip of the APP The package file is encrypted and protected during transmission, and the integrity and legality of the zip package are verified on the client to prevent it from being replaced;

爱Encryption Security Solution

1. Love Encryption provides an evaluation plan for this vulnerability to detect whether the App has this vulnerability;

2. Use the Ai Encryption Communication Protocol Encryption SDK to encrypt the data during the communication process and ensure that the data is not tampered with;

User Security Solution

Do not use uncertified WIFI hotspots and update the App on your phone in a timely manner.

The above is the detailed content of How to solve the ZipperDown vulnerability. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:亿速云. If there is any infringement, please contact admin@php.cn delete

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools