The Windows Process Journey — “WerFault.exe” (Windows Problem Reporting)

Shlomi Boutnaru, Ph.D.
2 min readJul 13, 2024

--

“WerFault.exe” is a PE binary located at “%windir%\system32\WerFault.exe”. On 64-bit systems there is also a 32-bit version of the binary located at “%windir%\SysWOW64\WerFault.exe”. This binary is one of the components of the “Windows Error Reporting” feature (https://medium.com/@boutnaru/the-windows-concept-journey-wer-windows-error-reporting-812316b8eb0a) of the operating system which interacts with the “Windows Error Reporting Service” (WerSvc).

Moreover, “WerFault.exe” is created when a process crashes (https://www.microsoft.com/en-us/security/blog/2021/03/02/hafnium-targeting-exchange-servers/). The goal of the binary is to collect data, exception info and even memory dumps. Later “WerFault.exe” is used for uploading the data to Microsoft’s cloud. In case there is no Internet connection “WerFault.exe” saves the reports locally which can be later uploaded by “wermgr.exe” (https://medium.com/@boutnaru/the-windows-process-journey-wermgr-exe-windows-problem-reporting-a9055d0a6b96).

Thus, in case of an unhandled exception a signal (WNF_WER_SERVICE_START) is sent to ensure the “Windows Error Reporting Service” (WerSvc) is started. Afterwards the crashed process talks with “WerSvc” using ALPC which leads to the creation of “WerFault.exe” as a sub-process of the crashed process (with the same level of user-permissions and not with the token of local system as “WerSvc”) — as shown in the diagram below. The reports created by “WerFault.exe” are saved at “C:\ProgramData\Microsoft\Windows\WER\ReportQueue\” and moved to “C:\ProgramData\Microsoft\Windows\WER\ReportArchive” in case the report was not uploaded due to network problems/issues (https://msrndcdn360.blob.core.windows.net/bluehat/bluehatil/2022/assets/doc/Exploiting%20Errors%20in%20Windows%20Error%20Reporting.pdf).

See you in my next writeup ;-) You can follow me on twitter — @boutnaru (https://twitter.com/boutnaru). Also, you can read my other writeups on medium — https://medium.com/@boutnaru. You can find my free eBooks at https://TheLearningJourneyEbooks.com.

--

--