The greater issue is that browsers are allowing code executing from the public Internet scope (scope meaning security domain) network access to the localhost scope or the Intranet scope (RFC1918 addresses.) If anything, this should require very explicit permission granting from the user. I’d prefer it be something more like an undocumented toggle accessible solely to developer types.
The company may be interested in whether they want to grant access to the user to access to their systems. Does the user shoulder any responsibility?
Why Is This Website Port Scanning Me?
331–340 of 448 posts
Re: Why Is This Website Port Scanning Me?
#332How does it work in practice? It seems in Chrome these errors cannot be caught try-catch blocks. try { var socket = new WebSocket('ws://localhost:808'); } catch (ex) { console.log(ex) // control does not reach here }
socket.onerror = (...args) => console.log('async error', ...args)Re: Why Is This Website Port Scanning Me?
#333Earlier quoted context omitted.
> I hack on Mastodon and it uses WSS for streams and they're very helpful. I'm not familiar with Mastodon or WSS. Can you describe how using WSS make the end user's experience better? What would be different if web sockets weren't used?
Mastodon is a federated/distributed social networking server that communicates with other servers via a protocol called ActivityPub. The interface feels sorta like Twitter, but it doesn't have to be. There are other FOSS ActiviyPub servers such as Pleroma (written in Elixir), Pixelfed (Instagram type interface) and PeerTube (distributed video). ActivityPub is a protocol (like e-mail/SMTP) for subscribing and replying…
Re: Why Is This Website Port Scanning Me?
#334Re: Why Is This Website Port Scanning Me?
#335Re: Why Is This Website Port Scanning Me?
#336Earlier quoted context omitted.
> to the localhost scope or the Intranet scope That's too little. All access from a different origin should be blocked by default, not only to local nets.
I stand corrected. I think yours is the correct approach. How shall origin be defined? I can envision the likes of Microsoft which have many, many second-level domains making calls between them. We can’t allow the site itself to grant access. How would this be managed, other than “please stop and think what a domain name is supposed to be before spraying your product across twelve of them?”
Re: Why Is This Website Port Scanning Me?
#337Earlier quoted context omitted.
CORS is set by the target, so localhost CORS policy is directly in the hands of the user. intranet CORS policy is set by whoever operates that intranet service
You’re right; a bit of a brain fail there for me. Still, doesn’t mitigate attacks against non-HTTP speakers.
Re: Why Is This Website Port Scanning Me?
#338Earlier quoted context omitted.
> to the localhost scope or the Intranet scope That's too little. All access from a different origin should be blocked by default, not only to local nets.
That's what CORS is for, but it appears that there is no CORS for WebSockets.
Re: Why Is This Website Port Scanning Me?
#339How does it work in practice? It seems in Chrome these errors cannot be caught try-catch blocks. try { var socket = new WebSocket('ws://localhost:808'); } catch (ex) { console.log(ex) // control does not reach here }
It probably fires as an async error, I'd expect this would log it (if inserted at the end of the try block): socket.onerror = (...args) => console.log('async error', ...args)
Re: Why Is This Website Port Scanning Me?
#340Lots of chat in the comments about how this is all websockets' fault, but don't forget you can portscan localhost with pure JS as well. https://portswigger.net/research/exposing-intranets-with-rel...