When I kill
wininit.exe, Windows 7 suddenly shuts down. Can someone explain this using Windows mechanics?
I feel like this might because the process provides something important, or this might be a security feature.
Windows Initialization Process (Wininit.exe)
This is correct.
wininit.exe is flagged as critical.
and killing critical system processes is not allowed and Windows will bugcheck the system with CRITICAL_OBJECT_TERMINATION
A post on groovypost.com explains the origin of
winit.exe ("Windows Initialize") and that today it primarily acts as a launcher for the majority of the background applications that are always running.
Look at the screenshot in that blog post which explains that killing the
wininit.exe process will also affect anything that was launched by that process:
[...] wininit.exe is a critical system process the Windows requires in order to function. Ending this process will likely result in a critical system error in which you’ll need to restart your computer. As you can see in the chart below, wininit.exe is at the top of the process tree for all of windows services, including svchost.exe.
wininit.exe process is the windows start up application which is found in the
%systemroot%\system32 folder (in most systems, %systemroot% maps to C:\Windows).
During boot, the smss.exe process creates wininit, which in turn create the lsass.exe (Local Security Authority Subsystem), services.exe (the services controller manager), and lsm.exe (Local Session Manager).
Since wininit.exe is in the system32 folder, if wininit.exe is found outside of it's folder (in C:\Windows\ or in your application data folder), then it is most likely malicious.