Created
May 7, 2024 21:30
-
-
Save dadevel/903d78cc0dc8535063a80ba5b1405bcd to your computer and use it in GitHub Desktop.
EFS Trigger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
int main() { | |
HANDLE file = CreateFileA(".\\test.txt", GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_ENCRYPTED|FILE_FLAG_DELETE_ON_CLOSE, NULL); | |
if (!file || file == INVALID_HANDLE_VALUE) { | |
return GetLastError(); | |
} | |
CloseHandle(file); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment