From 1170b176d3e00ad1b0d93ee375459df1745550d8 Mon Sep 17 00:00:00 2001 From: shreyamalviya Date: Mon, 14 Jun 2021 23:41:56 +0530 Subject: [PATCH] island: Fix Windows' secure file creation by using a different file flag --- monkey/monkey_island/cc/environment/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/environment/utils.py b/monkey/monkey_island/cc/environment/utils.py index 86370e01f..558b21b20 100644 --- a/monkey/monkey_island/cc/environment/utils.py +++ b/monkey/monkey_island/cc/environment/utils.py @@ -81,7 +81,7 @@ def _create_secure_file_windows(path: str): windows_permissions.get_security_descriptor_for_owner_only_perms() ) file_creation = win32file.CREATE_NEW # fails if file exists - file_attributes = win32file.FILE_ATTRIBUTE_NORMAL + file_attributes = win32file.FILE_FLAG_BACKUP_SEMANTICS win32file.CloseHandle(win32file.CreateFile( path,