Skip to content

Readme.txt.monkey blocks file encryption #1304

@VakarisZ

Description

@VakarisZ

Describe the bug

If a README.txt.monkey file is present in the ransomware target directory the encryption of the files fail with {'path': 'C:\\w\\Dump\\README.txt', 'success': False, 'error': "[WinError 183] Cannot create a file when that file already exists: 'C:\\\\w\\\\Dump\\\\README.txt' -> 'C:\\\\w\\\\Dump\\\\README.txt.m0nk3y'"}

To Reproduce

Steps to reproduce the behavior:

  1. Create a directory and add some files
  2. Enter a the directory as a ransomware target dir into the configuration
  3. Run monkey 3 times in a row (or create a README.txt.m0nk3y file)
  4. On the third run, monkey will throw an error and files won't get encrypted

Expected behavior

Monkey shouldn't encrypt README.txt and README.txt.m0nk3y files

Machine version (please complete the following information):

  • OS: Windows

Tasks

  • Check hash of README.txt file. If it's ours, skip it. (0d) @mssalvatore
    • Experiment to see under what conditions Windows will change the README file's line endings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugAn error, flaw, misbehavior or failure in the Monkey or Monkey Island.Complexity: LowImpact: Low

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions