You’d have to uninstall the whole OS, any native package on your system can do this, the strict snaps at least have safeguards. But when you install a third party repo / PPA for example, you’re handing over admin access to the repository owner, because they can simply redefine any package to have anything they want in it.
So explicitly, if you add a PPA without trusting the publisher, said publisher can replace your Linux kernel and install cryptominers and all sorts. Classic snaps are in no different position there to every other package format, the only technical solution comes down to trust in publisher and trust in the system.
It’s why we encourage strict snaps, to shift trust from humans to the machine itself.
Imagine you have a bug in your HTTP server. You’ve done the classic easy mistake in C of assigning in an if statement rather than an equality comparison, something like:
if (user = 0)
, and now the authentication mechanism is knackered and people can remotely control it.
The sandboxing defends against that. The sandboxing also defends against the trust in publisher. If you publish as strict and try replace my Linux kernel, you’re going to have a bad time because it’s well beyond the permissions you’ll have.
The security model is relying on people being unable to do bad things, and not just specifically bad things, but make mistakes like everyone does; by imposing a lot of mitigations at every level of the stack. Now you don’t just need to find a logic bug in the HTTP server, you’ll have to find an exploit in the kernel itself, the barrier to making a trivial bug into an exploitable one shoots through the roof.
It’s not a silverbullet to all problems. The bug in the HTTP server for one of my own snaps mentioned earlier was still shockingly bad even with sandboxing. But the problem existed with or without snap, but it was significantly better with snap than without.
The answer is yes, you can drop permissions of the daemon with https://snapcraft.io/docs/system-usernames and you can write your wrapper script for the daemon to check if the daemon should run and abort if a setting isn’t set, I don’t know if you can define your daemon to default to not starting at all (the way Fedora would), but you can definitely make use of snap set
to set a boolean toggle, and in your daemon have a script that checks the toggle and cancels execution if it’s not supposed to be on.