Most active commenters
  • johnisgood(4)
  • HSO(3)

←back to thread

421 points saeedesmaili | 18 comments | | HN request time: 1.514s | source | bottom
Show context
gejose ◴[] No.45308131[source]
This is one way to look at it, but ignores the fact that most users use third party community plugins.

Obsidian has a truly terrible security model for plugins. As I realized while building my own, Obsidian plugins have full, unrestricted access to all files in the vault.

Obsidian could've instead opted to be more 'batteries-included', at the cost of more development effort, but instead leaves this to the community, which in turn increases the attack surface significantly.

Or it could have a browser extension like manifest that declares all permissions used by the plugin, where attempting to access a permission that's not granted gets blocked.

Both of these approaches would've led to more real security to end users than "we have few third party dependencies".

replies(18): >>45308149 #>>45308208 #>>45308212 #>>45308222 #>>45308224 #>>45308241 #>>45308572 #>>45308600 #>>45308749 #>>45310219 #>>45310642 #>>45310881 #>>45310991 #>>45311185 #>>45311760 #>>45311782 #>>45312975 #>>45313054 #
ibash ◴[] No.45310219[source]
> Obsidian plugins have full, unrestricted access to all files in the vault.

Unless something has changed, it's worse than that. Plugins have unrestricted access to any file on your machine.

When I brought this up in discord a while back they brushed it aside.

replies(4): >>45310455 #>>45310482 #>>45310762 #>>45310878 #
1. HSO ◴[] No.45310762[source]
What if you run little snitch and block any communications from obsidian to anything?
replies(2): >>45311159 #>>45311167 #
2. formerly_proven ◴[] No.45311159[source]
Little snitch can block open(2)?
replies(3): >>45311288 #>>45311855 #>>45312838 #
3. elric ◴[] No.45311167[source]
Or firejail. Or QubesOS using a dedicated VM. There are options, but it would still be nice if Obsidian had a more robust security model.
replies(1): >>45311195 #
4. johnisgood ◴[] No.45311195[source]
I have been using firejail for most of these kind of applications, be it Obsidian, Discord, or the browser I am using. I definitely recommend people start using it.
replies(1): >>45311393 #
5. 4ndrewl ◴[] No.45311288[source]
I believe they're saying it can open, it just can't send the data anywhere.

Seems a little excessive, but here we are.

replies(2): >>45311853 #>>45312113 #
6. dotancohen ◴[] No.45311393{3}[source]
Sell it to us! Why do you use specifically firejail?

There are so many options, from so many different security perspectives, that analysis paralysis is a real issue.

replies(1): >>45312026 #
7. notpushkin ◴[] No.45311853{3}[source]
It still can encrypt everything and demand you pay some ₿₿₿₿.
8. HSO ◴[] No.45311855[source]
Very, very good point

I got lazy

Time to crank the paranoidmeter up again

ty

9. johnisgood ◴[] No.45312026{4}[source]
I feel like I should keep track of all my comments on HN because I remember writing a lengthy comment on firejail more than once. I cannot keep doing this. :D

For user-space, there is usually bubblewrap vs. firejail. I have not personally used bubblewrap, so I cannot comment on that, but firejail is great at what it does.

The last comment was about restricting clipboard access to either X11 or Wayland which is possible with firejail quite easily, so if you want that, you can have that.

You can do a LOT more with firejail though.

https://wiki.archlinux.org/title/Firejail

https://man.archlinux.org/man/firejail.1

replies(2): >>45312081 #>>45312546 #
10. wonger_ ◴[] No.45312081{5}[source]
FYI you can search your comment history with hn.algolia.com:

https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...

replies(1): >>45314028 #
11. lxgr ◴[] No.45312113{3}[source]
If it can open and write any file on the OS, it's pretty much game over. Too many ways to exfiltrate data even without network/socket access.
replies(1): >>45312679 #
12. rufugee ◴[] No.45312546{5}[source]
So do you configure firejail to give each app their own separate, permanent home directories? Like "firejail --private=/home/user/firejails/discord discord", "firejail --private=/home/user/firejails/chromium chromium", and so on?
replies(1): >>45313982 #
13. HSO ◴[] No.45312679{4}[source]
Worse, what keeps this from editing the config files for Little Snitch (or similar blockers)?
replies(2): >>45312858 #>>45313080 #
14. TomaszZielinski ◴[] No.45312838[source]
I treat LS as a privacy/anti-telemetry/anti-accident tool, not as anti malware.

Obviously it can detect malware if there’s a connection to some weird site, but it’s more like a bonus than a reliable test.

If you need to block FS access, then per app containers or VMs are the way to go. The container/VM sandboxes your files, and Little Snitch can then manage externa connectivity (you might still want to allow connection to some legit domains—-but maybe not github.com as that can be use to upload your data. I meant something like updates.someapp.com)

15. TomaszZielinski ◴[] No.45312858{5}[source]
I believe LS has some protections against this. Never tried them, but there are config related security options, incl. protection against synthetic events. So they definitely put some thought into that.
16. 4ndrewl ◴[] No.45313080{5}[source]
File system permissions?
17. johnisgood ◴[] No.45313982{6}[source]
I have my own Discord.profile!

This is my ~/.config/firejail/Discord.profile[1]:

  include disable-common.inc
  include disable-devel.inc
  include disable-interpreters.inc
  include disable-shell.inc

  noblacklist /sys/fs
  noblacklist /sys/module

  keep-config-pulse
  keep-dev-shm

  name discord
  apparmor
  caps.drop all
  caps.keep sys_admin,sys_chroot
  netfilter
  nodvd
  #nogroups
  #noinput
  nonewprivs
  noroot
  notv
  #nou2f
  #novideo
  protocol unix,inet,inet6
  #shell none

  disable-mnt
  private-cache
  #private-tmp

  noexec /tmp

  dbus-user filter
  dbus-user.talk org.freedesktop.Notifications

  private-bin Discord,cut,echo,egrep,electron,electron[0-9],electron[0-9][0-9],grep,head,sed,sh,tr,xdg-mime,xdg-open,zsh,gzip,wget,curl,notify-send
  private-etc alternatives,asound.conf,ca-certificates,crypto-policies,fonts,group,ld.so.cache,ld.so.preload,localtime,login.defs,machine-id,password,pki,pulse,resolv.conf,ssl

  noblacklist /usr/lib/discord/
  whitelist ${HOME}/.config/discord
  read-write ${HOME}/.config/discord
  whitelist ${DOWNLOADS}
  whitelist ${HOME}/.config/pulse/*

  include whitelist-common.inc
  include whitelist-var-common.inc
  include whitelist-run-common.inc
  include whitelist-runuser-common.inc
I have some things commented out but you could probably uncomment most.

Some has this, too:

  disable-mnt
  private-dev
  private-cache

  env http_proxy=socks5://127.0.0.1:9050
  env https_proxy=socks5://127.0.0.1:9050
FWIW, once you start whitelisting, it will only have access to those directories and files only, so Discord has no access to anything other than its own directory and ${DOWNLOADS}, which I should probably change.

You should check out the default profiles for many programs / apps under directory "/etc/firejail".

[1] You run it via "firejail Discord" or "firejail ./Discord" if you name it "Discord.profile".

18. johnisgood ◴[] No.45314028{6}[source]
Thank you, exactly what I have been looking for!