9 ms·
Oh, man. The idea that TextEdit automatically parsed .txt files as HTML if they started with a certain file signature is problematic... ...but the fact that fi
by crazygringo 6y ago
Oh, man. The idea that TextEdit automatically parsed .txt files as HTML if they started with a certain file signature is problematic...
...but the fact that file:// schemes can access remote files by appending /net/ followed by a domain name is pretty shocking.
I mean, the entire purpose of "file://" would seem to be to provide access to local/mounted files and only those.
The fact that a Mac engineer thought it would be a great "feature" to allow file:// to access the entire internet is... kinda terrifying. Did that get patched, or was it only TextEdit?
- jjtheblunt 6y agoI think it carries over from NeXTstep, iirc.
- ethbr0 6y agoIt feels like a choice when "net" meant "my campus network", not "the internet." Because why would you be connected to the internet all the time? And how could you even afford those long distance calls?
- 1MachineElf 6y agoBecause why would you be connected to the internet all the time? And how could you even afford those long distance calls? That one East German guy in Cliff Stoll's The Cuckoo's Egg found a creative answer for both of those.
- deleted 6y ago[deleted]
- SquibblesRedux 6y agoLooking in /etc/auto_master, which is the configuration for Autofs, the /net mount point is commented out by default. I do not know when (or if) it was ever turned on by default.
- tmp538394722 6y agoWhether or not a default configuration is vulnerable is a pretty typical component of accessing a vulnerability’s severity. Unfortunate that the author didn’t mention this. Obviously this doesn’t excuse the bug, but it’s important to contextualize if we hope to compare relative impact and have frank discussions.
- icedchai 6y agoI'm stilling running Mojave (10.14.x) and it is uncommented. The file dates to 2014 so I suspect it was set up with the original OS that came with this machine.
- azinman2 6y ago/net is really meant for things like nfs.
- tmp538394722 6y ago“Everything’s a file!”
- rcrisan 6y agoperhaps this is the worst possible abstraction to be protected by a security framework.
- extropy 6y agoIMO not so much. Just assume all files are malicious unless accompanied by metadata saying otherwise. That is pretty much the status quo already. Except we have some grandfathered file types that are implicitly trusted.
- Jabbles 6y agoIn the article, the remote file's contents were not malicious, but merely trying to access it was. That would require a very different security posture to "assume all files are malicious".
- DyslexicAtheist 6y ago> the remote file's contents were not malicious until ... one day ... they are!
- boomlinde 6y agoThe remote file is only one of two files in the story.
- Lucasoato 6y agoAnd what about malicious metadata?
- aenario 6y agoI can see a way this would be useful to use the same abstraction to limit app/user web access to a single domain. For instance the dropbox binary can only access "/home/dropbox" and "/net/dropbox.com" if this was more well-known/used.
- bawolff 6y ago> ...but the fact that file:// schemes can access remote files by appending /net/ followed by a domain name is pretty shocking. Not that shocking. Windows has had that with SMB networking for ages file://SMBSERVERNAME/path/file . Linux somewhat supports /dev/tcp/HOSTNAME/PORT (technically that's application level in bash so not everywhere), and im sure there's daemons you could run to automount things on the fly.
- ngcc_hk 6y agoActually if I am not mistaken it is after they want to fight the browser war they break the barrier between the file system and internet system. It is not in the early version of windows or IE. the integration is one of the major mistakes Microsoft made. And surprise apple fall for it as well. Can’t trust these two or ,,, who can we trust for network security.
- tetha 6y ago> Linux somewhat supports /dev/tcp/HOSTNAME/PORT (technically that's application level in bash so not everywhere), and im sure there's daemons you could run to automount things on the fly. Do note that this has been disabled in the major distributions at compile time for pretty much ever. The debian bug to build bash with that feature by default is ~20 years old (and was closed as wontdo).
- exikyut 6y agoOn two different Debian 10 boxes bash seems to have it enabled: Terminal 1 $ echo hi > /dev/tcp/127.0.0.1/9999 Terminal 2 $ nc -vvvlp 9999 Listening on [0.0.0.0] (family 2, port 9999) Connection from 127.0.0.1 57540 received! hi $
- amenod 6y agoFor anyone wondering, it is enabled by default on Ubuntu too. I wonder what made someone think that this was a good idea?
- benatkin 6y agoThe extension is meaningless outside of Windows...
- Thorrez 6y agoIt doesn't sound like that from the article: >the default text reader on OSX, TextEdit is used to open files with TXT extension by default. >Gatekeeper doesn’t quarantine TXT files
- tsimionescu 6y agoFile extensions are routinely used by all sorts of software, at least as hints if nothing else. For example, gcc will handle files named .c differently from files named .cpp, and will not even work with static libraries unless they are named .a.
- andylynch 6y agoFar from it. Even Mac OS stopped using type and creator codes in favour of file extensions, 11 years ago (with snow leopard).
- canadianfella 6y agoNo
- comex 6y agoIt's not specific to the file:// URI scheme; /net is an actual filesystem path that works with anything that accesses paths. Or used to work, anyway; it was recently changed to be disabled by default.
- tim44 6y agoholy batman
- StavrosK 6y agoMost likely nobody decided to have file:// access the network. Most likely, someone decided to make file:// the scheme for accessing files, and someone else decided to mount the network as a file.
- alfiedotwtf 6y agoMy memory is hazy, but I think this was a “feature” of Plan9
- rualca 6y ago> I mean, the entire purpose of "file://" would seem to be to provide access to local/mounted files and only those. This is the only story here. Everything else sounds like clueless hyperboles.
- neycoda 6y agoA file can be accessed locally, on a private network, or over the internet. The fact that /net/ exists is redundant to http file download... so there's an argument there, but to access a local network file through http requires a webserver which may not be desired. So, having file /net/ solves that problem but of course could work the same way on an internet network so... we're kind of screwed really.