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

MacroMilter bypass with nested ZIP files #19

Closed
robert-scheck opened this issue Oct 7, 2017 · 2 comments
Closed

MacroMilter bypass with nested ZIP files #19

robert-scheck opened this issue Oct 7, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@robert-scheck
Copy link
Contributor

robert-scheck commented Oct 7, 2017

I can bypass MacroMilter by using nested ZIP files, example:

  1. Sample file zipwithinfectedandnotinfectedword.zip will be detected as malicious
  2. zip nested.zip zipwithinfectedandnotinfectedword.zip
  3. Sample file nested.zip will not be detected as malicious
2017-10-07 03:38:17,729 -    DEBUG: connect from localhost at ('::1', 52922, 0, 0)
2017-10-07 03:38:17,779 -    DEBUG: [3] Content-type: 'multipart/mixed'
2017-10-07 03:38:17,779 -    DEBUG: [3] Content-type: 'text/plain'
2017-10-07 03:38:17,779 -    DEBUG: [3] Analyzing attachment None
2017-10-07 03:38:17,779 -    DEBUG: [3] Content-type: 'application/zip'
2017-10-07 03:38:17,779 -    DEBUG: [3] Analyzing attachment 'nested.zip'
2017-10-07 03:38:17,779 -    DEBUG: Find Attachment with archive extension - File name: nested.zip
2017-10-07 03:38:17,779 -     INFO: File in zip detected! Name: zipwithinfectedandnotinfectedword.zip - check for VBA
2017-10-07 03:38:17,780 -    DEBUG: The attachment 'nested.zip' is clean.

I initially wanted to test an archive bomb, however this poorly failed. In case the observed behaviour is a bug and gets fixed, please avoid to get vulnerable to archive bombs (by adding max. nesting limits).

@sbidy sbidy self-assigned this Oct 8, 2017
@sbidy sbidy added the bug label Oct 8, 2017
@sbidy sbidy added this to the 3.4 milestone Oct 8, 2017
@sbidy
Copy link
Owner

sbidy commented Oct 10, 2017

Under development and implemented in testing branch.
Fixed:

  • ZipBomb detection
  • Extend config with "MAX_ZIP" parameter
  • Now detect nested vba-files in archives

@robert-scheck
Copy link
Contributor Author

Successfully verified with 3.4.3:

  • Suspicious macros in nested ZIP files are detected
  • Too many nested ZIP files are not handled, but rejected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants