Could we gain security by mounting home with noexec
(and nosuid
[among other useful mount options])?
How does noexec
help if one can use
bash ./script
sh ./script
python ./script
etc.?
EDIT: bash ./script
etc. does not require ./script
being executable. It will work on any file even when setting chmod -x ./script
beforehand.
ticket: lock down interpreters (interpreter lock)
noexec
might make most sense when combined with all the other stuff form Related
below tin this post?
lynis even recommended to prevent access to compilers such as gcc.
EDIT:
Keep shared folder vs noexec
in mind too.
Tor Browser is in user home folder. (Details of this mess: Tor Browser Advanced Topics) And needs some files being executable.
So it may not be possible to mount home with noexec for all VMs. But letās overlook Tor Browser for a moment. Maybe a solution could be found. (Such as a wrapper.) Edit: created Tor Browser vs NOEXEC - Where should the Tor Browser folder be placed? for it.
Either way this could at least be an easy opt-in with most things shipped by default but not enabled by default if not a good idea.
Related:
- Restrict root access - #15 by madaidan
- SUID Disabler and Permission Hardener - #5 by Patrick
- walled garden, firewall whitelisting, application whitelisting, sudo lockdown, superuser mode, protected mode
- Tor Browser vs NOEXEC - Where should the Tor Browser folder be placed?
- multiple boot modes for better security: persistent user | live user | persistent secureadmin | persistent superadmin | persistent recovery mode
I also had in mind various boot modes:
- persistent + root
- persistent + noroot
- live + root
- live + noroot
Not all might make sense.
Or think of noroot
has āhardeningā where we can do stuff like noexec, nosuid, no root/sudo possible at all.
But various boot modes is best discussed in a separate thread. Please quote me on this in a different thread. Just wanted to briefly mention the idea here so that something that isnāt great as a default for everyone all the time must not necessarily block alternative configurations / boot options. Created: