Files with names containing pure UTF-16 characters can bypass detection. The user-mode service will fail to open the file for scanning after the conversion is done to ANSI, because characters that cannot be converted from Unicode are replaced with '?'.
Below is an image demonstrating the bug. In the first case, the filename is in Arabic and in the second, the filename's first letter is the greek M (U+039C).
A fix would require a re-implementation of the parts of the service dealing with filenames to make them support Unicode.
@SouhailHammou Thank you for reporting the issue and for suggesting a fix.
Another possible fix would be that the driver sends to the user-mode service a HANDLE instead of the file name.
Files with names containing pure UTF-16 characters can bypass detection. The user-mode service will fail to open the file for scanning after the conversion is done to ANSI, because characters that cannot be converted from Unicode are replaced with '?'.
https://github.com/armadito/armadito-windows-driver/blob/06c826009397c244a13e4d7294587d97d6c41f0b/src/communication.c#L255-L263
Below is an image demonstrating the bug. In the first case, the filename is in Arabic and in the second, the filename's first letter is the greek M (U+039C).
A fix would require a re-implementation of the parts of the service dealing with filenames to make them support Unicode.