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

Add support for ZIP file generation in zip_slip exploit #14075

Merged
merged 2 commits into from
Sep 2, 2020

Conversation

ggkitsas
Copy link
Contributor

Add support for generating ZIP files for the zip_slip exploit.

Verification

  • Start msfconsole
  • use exploits/multi/fileformat/zip_slip
  • set FTYPE zip
  • exploit
  • Verify A file msf.zip should be created
  • Verify zipinfo -1 msf.zip should present ../payload.bin

@ggkitsas ggkitsas changed the title Add support for zip generation in zip_slip exploit Add support for ZIP file generation in zip_slip exploit Aug 31, 2020
@ggkitsas ggkitsas marked this pull request as draft August 31, 2020 12:39
Comment on lines 51 to 52
OptString.new('FILENAME', [true, 'The tar file (tar)', 'msf.tar']),
OptString.new('FNAME', [true, 'The name of the archive file (without extension)', 'msf']),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This parameter should still be named FILENAME for a couple of reasons.

  1. With the new FTYPE defaulting to tar we can keep this at the same value as msf.tar and maintain backwards compatibility
  2. FTYPE is presumably short for "file type" not "file extension". If the user wants to name their ZIP file something.tar we should allow them to. This might seem odd for zip vs tar, but consider scenarios where the user wants to impersonate a file type based on ZIPs such as CBZ or JAR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, reverted

@ggkitsas ggkitsas marked this pull request as ready for review September 1, 2020 21:10
@bwatters-r7 bwatters-r7 self-assigned this Sep 2, 2020
bwatters-r7 added a commit that referenced this pull request Sep 2, 2020
Merge branch 'land-14075' into upstream-master
@bwatters-r7 bwatters-r7 merged commit 62d3d9b into rapid7:master Sep 2, 2020
@bwatters-r7
Copy link
Contributor

bwatters-r7 commented Sep 2, 2020

Release Notes

Updated exploits/multi/fileformat/zip_slip to support generating ZIP files.

@adfoster-r7 adfoster-r7 added the rn-enhancement release notes enhancement label Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants