-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
any website can grab the server connection from browser dialer on localhost #3236
Comments
In fact, malicious JavaScript can obtain much more information than this, so I don't think that's a big problem ( |
can you elaborate? I don't think this is true, or shouldn't be.
…-------- Original Message --------
On 11 Apr 2024, 11:13, 风扇滑翔翼 wrote:
Closed [#3236](#3236) as completed.
—
Reply to this email directly, [view it on GitHub](#3236 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/BB3PZEFLQLXB76NNOITZSQTY4ZH4VAVCNFSM6AAAAABFZUN6WOVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJSGQZTGNRTGIZTOMA).
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Browser exposure of local web services is indeed a security issue |
please refer to https://stackoverflow.com/a/37837709
yes, it is very problematic behavior of browsers, but it is intentional. Websockets are old and stable, and it is unlikely to be fixed in browsers either way.
I think it is x-ray's responsibility to prevent attacks like this. At the same time I do respect the decision to not work on this in the case of browser dialer. My point is that if there are other configs (not using browser dialer) that leak like this, it should be fixed.
-------- Original Message --------
…On 11 Apr 2024, 11:20, 风扇滑翔翼 wrote:
> can you elaborate? I don't think this is true, or shouldn't be.
> […](#)
> -------- Original Message --------
> On 11 Apr 2024, 11:13, 风扇滑翔翼 wrote: Closed #3236 as completed. — Reply to this email directly, [view it on GitHub]([#3236 (comment)](#3236 (comment))), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/BB3PZEFLQLXB76NNOITZSQTY4ZH4VAVCNFSM6AAAAABFZUN6WOVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJSGQZTGNRTGIZTOMA). You are receiving this because you authored the thread.Message ID: @.***>
Browser exposure of local web services is indeed a security issue
I recommend reporting this question to Google and Mozilla
—
Reply to this email directly, [view it on GitHub](#3236 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/BB3PZECAS7N43YUITQAVQ3LY4ZIW3AVCNFSM6AAAAABFZUN6WOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBZGI3TKNRUHE).
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Isn't it expected behavior for popular browsers? There are so many legit use cases. If you do care about this, just add https://github.com/uBlockOrigin/uAssets/blob/master/filters/lan-block.txt to your ad-blocker. Also https://wicg.github.io/private-network-access/ is currently only a draft. Adding some authentication functions are enough. |
(I am not sure if you are responding to me or Fangliding)
blocking local IPs in ublock is also a good mitigation, but i think xray can fix this problem and be secure out of the box. yes the browser vendors say it is expected behavior. the suggested mitigations (validation of origin header) do not affect other usecases. unless there is a usecase to run the browser dialer JS code from a non-local IP somehow?
The draft is interesting!
|
I'm arguing too much, here's a possible fix for the issue: #3295 |
Fixes #3236 --------- Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
When running xray's browser dialer on localhost:3000, any website can connect to
ws://localhost:3000
, wait for a dialing attempt, and learn about the used proxy that way.Steps to reproduce:
XRAY_BROWSER_DIALER=127.0.0.1:3000 ./xray
3000
can be changed to something else as wellThe idea is that a domestic website could use this to detect whether somebody is connecting through xray, and through which server, then ban that server. It does not matter if the website itself has been accessed through xray, so the
geosite:cn
best-practice does nothing.Some notes:
Any one of these changes to xray could fix the issue:
Origin
is wrong, and ideally log a warning/
but some secret, user-defined subpathUsers who use the browser dialer (are there any?) can defend against this today without code changes by:
The text was updated successfully, but these errors were encountered: