You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
context.log.debug(f"Connecting to share {share_name}...")
78
-
tid=conn.connectTree(share_name)
79
-
exceptSessionErrorase:
80
-
context.log.debug(f"Could not connect to share {share_name}: {e}")
81
-
continue
82
-
try:
83
-
context.log.debug(f"Creating file in {share_name}...")
84
-
fid=conn.createFile(tid, self.file_name,
85
-
desiredAccess=FILE_SHARE_WRITE,
86
-
shareMode=FILE_SHARE_DELETE,
87
-
fileAttributes=FILE_ATTRIBUTE_ENCRYPTED)
88
-
conn.closeFile(tid, fid)
89
-
try:
90
-
# this can happen when we have special permissions to create encrypted files
91
-
conn.deleteFile(share_name, self.file_name)
92
-
exceptSessionErrorase:
93
-
error=get_error_string(e)
94
-
iferror=="STATUS_OBJECT_NAME_NOT_FOUND":
95
-
pass
96
-
context.log.fail(f"Error DELETING created temp file {self.file_name} on share {share_name}: {error}")
97
-
exceptSessionErrorase:
98
-
context.log.debug(f"Error writing encrypted file on share {share_name}: {get_error_string(e)} (This does not necessarily mean that the attack failed!)")
99
-
100
-
try:
101
-
tid=conn.connectTree("IPC$")
102
-
conn.waitNamedPipe(tid, "efsrpc", 10)
103
-
context.log.highlight("Successfully activated efsrpc named pipe!")
104
-
exceptSessionErrorase:
105
-
error=get_error_string(e)
106
-
iferror=="STATUS_OBJECT_NAME_NOT_FOUND":
107
-
context.log.debug("efsrpc pipe was not activated.")
108
-
else:
109
-
context.log.fail(f"Error waiting for named pipe: {error}", color="magenta")
110
-
return
18
+
context.log.fail('[REMOVED] This module has been made obsolete and EFS will be activated automatically by "coerce_plus"')
0 commit comments