3 ms·
> ...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
by 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?
- rijoja 6y agoIf you follow the everything is a file philosophy it seems quite natural does it not?
- soulofmischief 6y agoExcept permissions aren't granular enough / are too confusing, it's a giant footgun with the current Linux architecture, which doesn't have all the nice things Plan9 does
- bawolff 6y agoI mean, unless you're host is extremely locked down you'll probably also have telnet,netcat, etc installed, so no great difference.
- nolok 6y agoI'm no specialist but I'm inclined to disagree, for me it's the difference between the ability to run an arbitrary binary and the ability to read/write an arbitrary filepath
- capitainenemo 6y agoThey are imaginary paths in the bash executable. They aren't usable outside it. Thus the netcat analogy.
- LinuxBender 6y agoAnything you can do in telnet or netcat can also be done in python, perl, ruby. One of those is likely installed, most probably python.
- rijoja 6y agoAnd if you think about if all applications where using files for communication blocking one program from the internet would be as simple as a chmod.
- kevinoid 6y agoAlthough it was disabled in Debian bash 2.04-5 on 2000-06-05, it was re-enabled in bash 4.0-5 on 2009-09-13 and is currently enabled. See https://metadata.ftp-master.debian.org/changelogs/main/b/bash/bash_5.1-2_changelog https://metadata.ftp-master.debian.org/changelogs/main/b/bas...
- crazygringo 6y agoSMB is more understandable though, since you have more trust for things on your local network, and an attacker usually won't have control over those resources. And it's a fairly common and reasonable expectation in a business environment that network drives appear as part of the filesystem. Whereas a domain name over the open internet is an entirely different story.
- bawolff 6y agoIts been a while since i've done windows stuff, but i thought you could use IP addresses in addition to netbios names for smb - \\1.2.3.4\share\file
- ComodoHacker 6y agoYou can use \\domain.name\share\ as well.