In this blogpost we demonstrate an attack on the integrity of Sysmon which generates a minimal amount of observable events making this attack difficult to detect in environments where no additional security products are installed.
tl;dr:
- Suspend all threads of Sysmon.
- Create a limited handle to Sysmon and elevate it by duplication.
- Clone the pseudo handle of Sysmon to itself in order to bypass SACL as proposed by James Forshaw.
- Inject a hook manipulating all events (in particular ProcessAccess events on Sysmon).
- Resume all threads.
We also release a POC called SysmonEnte.