Cyber Risks · Google Project Zero

Windows Exploitation Tricks: Arbitrary Directory Creation to Arbitrary File Read

Summary: James Forshaw of Google Project Zero described a technique that turns an arbitrary directory creation bug into an arbitrary file read on Windows, using a vulnerable workshop driver that calls ZwCreateFile with FILE_DIRECTORY_FILE and FILE_OPEN_IF without OBJ_FORCE_ACCESS_CHECK. The method abuses NTFS mount points, which can redirect to a file when neither FILE_DIRECTORY_FILE nor FILE_NON_DIRECTORY_FILE is set, and targets the NtGetNlsSectionPtr system call, which opens code page files with ZwOpenFile passing 0 for those flags.

Why it matters: A directory creation bug that looks minor can become a file read because NtGetNlsSectionPtr opens files without access checks and without the directory-or-file flags, so a mount point planted in a writable location can redirect it to a file the caller should never see.

Read the original at Google Project Zero ↗

Topics
Vulnerabilities & Patching
Related