Protecting Users from Running Arbitrary Code on Windows
If you're worried about the safety of less tech-literate friends, family, or colleagues who might click before thinking, here's a practical way to protect them. Moving them to Linux isn’t always viable, so let's use Windows' powerful permissions system instead.
Steps to Secure the Downloads Directory:
Access Security Settings:
- Right-click the Downloads directory, select
Properties, go to theSecuritytab, and clickAdvanced.
- Right-click the Downloads directory, select
Remove Inheritance:
- Click
Remove inheritanceand thenRemove. - If the username remains on the list, double-click it. If not, click
Add, thenSelect a principal,Advanced,Findand select the username.
- Click
Set Permissions for Folders:
- Change
Applies totoThis folder and subfolders. - Ensure
Full controlis checked and clickOK.
- Change
Add New Permission for Files:
- Click
Add, select the user again, changeApplies totoFiles only. - Click
Advanced, deselectTraverse folder / execute file, and clickOKthrice.
- Click
Inform the User:
- Installation: They need to move downloaded installers to a different directory (e.g., Desktop) to run them.
- Security: Explain that if they can't open an invoice, invitation or any other such file from the downloads directory, it was an attack attempt that was just stopped, not a legitimate file and they should just remove it without trying to bypass that protection.
Important note:
This will not prevent vulnerabilities in document viewers from performing ACE, only stop vast list of known executable formats from being run, keeping software up to date and protecting the most important data other ways is still advisable.