Service File permissions Weakness
Last updated
Last updated
Adversaries may execute their own malicious payloads by hijacking the binaries used by services. Adversaries may use flaws in the permissions of Windows services to replace the binary that is executed upon service start. These service processes may automatically execute specific binaries as part of their functionality or to perform other actions. If the permissions on the file system directory containing a target binary, or permissions on the binary itself are improperly set, then the target binary may be overwritten with another binary using user-level permissions and executed by the original process. If the original process and thread are running under a higher permissions level, then the replaced binary will also execute under higher-level permissions, which could include SYSTEM.
Adversaries may use this technique to replace legitimate binaries with malicious ones as a means of executing code at a higher permissions level. If the executing process is set to run at a specific time or during a certain event (e.g., system bootup) then this technique can also be used for persistence.
Example:
In this situation a user has PERMISSIONS to designate or modify one of the services run by SYSTEM in this situation we see a normal service already stopped, in this example its Ccleaner, also info on the BinPath that shows where the binary is located in the Windows System.
What if a User has permissions to change this binPath?, simple it can have it point to the malicious payload and when this services is started it will run the malicious payload.
Same Result but a more simpler configuration modification.