سرویس های پیازی سرویس هایی هستند که تنها از طریق تور قابل دسترسی می باشند. اجرا یک سرویس پیازی به کاربران شما امنیت HTTPS همراه با مزایای حریم خصوصی مرورگر تور را ارائه می دهد.
چرا سرویس های پیازی؟
سرویس های پیازی مزایای امنیتی و حریم خصوصی متنوعی به کاربران خود ارائه می کنند.
پنهانسازی موقعیت جغرافیایی
نشانی IP یک سرویس پیازی محافظت شده می باشد. سرویس های پیازی یک شبکه همپوشان روی TCP/IP می باشد بنابراین به معنایی نشانیهای آیپی برای سرویس های پیازی معنایی ندارند: آن ها حتی در پروتکل مورد استفاده قرار نمی گیرند.
احراز هویت سرتاسر
وقتی یک کاربر از یک سرویس پیازی دیدن می کند، می دانند که محتوایی که مشاهده می کنند فقط از آن سرویس پیازی آمده است. بنابراین امکان جعل هویت وجود ندارد. معمولاً دسترسی به یک سایت به معنای این نیست که مرد میانی به جای دیگری مسیریابی مجدد نکرده است (مانند حملات ساناد).
رمزگذاری سرتاسر
ترافیک سرویس پیازی از کلاینت به میزبان پیازی رمزگذاری می شود. این مانند دریافت اساسال/پروتکل امن انتقال ابرمتن به صورت رایگان می باشد.
پانچینگ برگردان نشانی شبکه
آیا شبکه شما فیتلر شده است و نمی توانید روی دیوار آتش خود درگاه باز کنید؟ اگر در محوطه دانشگاه، دفتر اداری، فرودگاه یا هرجای دیگری که هستید اتفاق افتادن چنین چیزی ممکن است. سرویس های پیازی به درگاه های باز نیاز ندارند چون از ترجمه برگردان شبکه پانچ را انجام می دهند. فقط اتصال های خروجی را برقرار می کنند.
پروتکل سرویس پیازی: بررسی اجمالی
حالا سوال این است که چه نوع پروتکلی برای چنین خصوصیاتی مورد نیاز است؟ معمولاً، افراد به یک نشانی آیپی وصل می شوند و همه چیز تمام می شود ولی چگونه به چیزی وصل می شوید که یک نشانی آیپی ندارد؟
به طور مشخص، نشانی یک سرویس پیازی به این شکل است: vww6ybal4bd7szmgncyruucpgfkqahzddi37ktceo3ah7ngmcopnpyyd.onion
این تصادفی و عجیب به نظر می رسد چون کلید عمومی هویت سرویس پیازی می باشد. این یکی از دلایلی است که قادر هستیم تا خصوصیات امنیتی بالا را داشته باشیم.
The onion service protocol uses the Tor network so that the client can introduce itself to the service, and then set up a rendezvous point with the service over the Tor network. این تشریح مراحل فوق می باشد:
عمل 1: سرویس پیازی نقاط معرفی خود را برپا می کند
Let's imagine that your local newspaper decides to set up an onion service (using SecureDrop) to receive anonymous tips. As the first step in the protocol, the onion service will contact a bunch of Tor relays and ask them to act as its introduction points by establishing long-term circuits to them. These circuits are anonymized circuits, so the server does not reveal the service location to the introduction points.
The onion service will hide and protect itself behind the Tor network by only allowing access through three introduction points that it connects to through a two-hop Tor circuit.
عمل 2: جایی که سرویس پیازی توصیفگر خود را منتشر می کند
Now that the introduction points are set up, we need to create a way for clients to be able to find them.
For this reason, the onion service assembles an onion service descriptor, containing a list of its introduction points (and "authentication keys"), and signs this descriptor with the onion service's identity private key. کلید خصوصی هویت استفاده شده در اینجا بخش خصوصی از کلید عمومی کدگذاری شده در نشانی سرویس پیازی می باشد.
The onion service upload that signed descriptor to a distributed hash table, which is part of the Tor network, so that clients can also get it. It uses an anonymized Tor circuit to do this upload so that it does not reveal its location.
Act 3: Where a client wants to visit the onion service
Say you want to anonymously send some tax fraud data to your local newspaper through its SecureDrop. You find the onion address for the newspaper's SecureDrop from a public website or friend.
Act 4: Where the client introduces itself to the onion service
All the previous steps were just set up for the onion service so that it's reachable by clients. Now let's fast-forward to the point where an actual client wants to visit the service.
In this case, the client has the onion address of SecureDrop and want to visit it, so they connect to the service with Tor Browser. Now the next thing that needs to happen is that the client goes to the distributed hash table from Step 2 and ask for the signed descriptor of SecureDrop's onion service.
Act 5: Where the client verify onion address signature
When the client receives the signed descriptor, they verify the signature of the descriptor using the public key that is encoded in the onion address. This provides the end-to-end authentication security property, since we are now sure that this descriptor could only be produced by that onion service and no one else.
And inside the descriptor, there are the introduction points that allow the client to introduce themselves to SecureDrop's onion service.
Act 6: Where the client establishes a rendezvous point
Before the introduction takes place, the client (in this case, you) picks a Tor relay and establishes a circuit to it. The client asks the relay to become their rendezvous point and give it an "one-time secret" that will be used as part of the rendezvous procedure.
Act 7: Where the onion service rendezvous with the client
The introduction point passes your details (secret string and rendezvous address) on to the onion service, which runs multiple verification processes to decide whether you're trustworthy or not.
Act 8: Where the rendezvous point verifies the client's secret
سرویس پیازی به نقطه دیدار وصل می شود (این از طریق زنجیره ناشناس شده خواهد بود) و "رمز یک دفعهای" را به آن ارسال می کند. The rendezvous point makes one final verification to match the secret strings from you and service (the latter also comes from you but has been relayed through the service).
نقطه دیدار پیام ها (رمزگذاری شده سرتاسر) را از کلاینت به سرویس و برعکس بازپخش می کند.
Act 9: Where the onion service rendezvous with the client
In general, the complete connection between client and onion service consists of 6 relays: 3 of them were picked by the client, with the third being the rendezvous point, and the other 3 were picked by the onion service. This provides location hiding to this connection.
Finally, using the rendezvous point, a Tor circuit is formed between you and your newspaper's SecureDrop onion service.
منابع بیشتر
This was just a high-level overview of the Tor onion services protocol. Here are some more resources if you want to learn more:
- The Tor design paper describing the original design.
- The Tor v3 onion services protocol specification.
- Presentations about onion services: Understanding Tor Onion Services and Their Use Cases - HOPE XI 2016, DEF CON 25 - Roger Dingledine - Next Generation Tor Onion Services.