Skip to content

Conversation

covertivy
Copy link
Contributor

Hello,
Following my previous contribution in #1894 I changed the default behavior of the getFile method of the SMBConnection class.
Now it always uses overly permissive share access modes instead of overly restrictive ones.
This is very useful if we wish to read "locked" files (files that have active open process handles to them).
But in doing so I forgot a crucial element of impacket's exec suite.
All of them rely on receiving a STATUS_SHARING_VIOLATION error in order to know when the command stops being executed remotely.
This commit fixes all exec examples and modules.

@covertivy covertivy changed the title Fix issues introduced in #1894 Fix breaking issues introduced in #1894 Sep 13, 2025
@anadrianmanrique
Copy link
Collaborator

Hi @covertivy, thanks for the PR. We've decided to merge #2044 instead, as we want to have better control on who is actually performing getFile with access to locked files, and also keep the getFile original behavior for those code clients that don't need this particular feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants