GithubHelp home page GithubHelp logo

zip_path_traversal's Introduction

Path traversal with zip archive

Two examples of zip files that break the current directory and extract a file to the /tmp/

First archive contains symlink path to ../../../../../tmp

$ zipinfo symlink.zip

Archive:  symlink.zip
Zip file size: 330 bytes, number of entries: 2
lrwxr-xr-x  3.0 unx       18 bx stor 18-Jun-14 13:26 path
-rw-r--r--  3.0 unx        0 bx stor 18-Jun-14 11:46 path/file.txt
2 files, 18 bytes uncompressed, 18 bytes compressed:  0.0%

Second archive contains file with target directory /tmp/ (according zip format speciffication this is not correct)

4.4.17.1 The name of the file, with optional relative path. The path stored MUST not contain a drive or device letter, or a leading slash.

$ zipinfo absolutepath.zip

Archive:  absolutepath.zip
Zip file size: 289 bytes, number of entries: 2
drwxr-xr-x  2.1 unx        0 bx stor 18-Jun-13 23:13 /tmp/
-rw-r--r--  2.1 unx        5 bX defN 18-Jun-13 23:13 /tmp/file.txt
2 files, 5 bytes uncompressed, 7 bytes compressed:  -40.0%

zip_path_traversal's People

Contributors

tuzovakaoff avatar

Watchers

James Cloos avatar  avatar

zip_path_traversal's Issues

License?

Hello Vadim,

Silly question, but under what license is this test case distributed under?
Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.