blog-contributions/opsec/p2ptorrents/index.html

258 lines
9.9 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="../../../../../../assets/img/favicon.png">
<title>Peer-to-Peer Large File Sharing (Torrents over VPN)</title>
<!-- Bootstrap core CSS -->
<link href="../../assets/css/bootstrap.css" rel="stylesheet">
<link href="../../assets/css/xt256.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="../../assets/css/main.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Static navbar -->
<div class="navbar navbar-inverse-anon navbar-static-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand-anon" href="\index.html">The Nihilism Blog</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="/about.html">About</a></li>
<li><a href="/blog.html">Categories</a></li>
<li><a href="https://blog.nowhere.moe/donate.html">Donate</a></li>
<li><a href="/contact.html">Contact</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
<!-- +++++ Posts Lists +++++ -->
<!-- +++++ First Post +++++ -->
<div id="anon2">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<a href="../index.html">Previous Page</a></br></br><p><img src="../../assets/img/user.png" width="50px" height="50px"> <ba>XMRonly - 2024 / 10 / 23</ba></p>
<h1>Peer-to-Peer Large File Sharing (Torrents over VPN)</h1>
<img src="0.png" style="width:250px">
<p> </p>
</div>
</div><!-- /row -->
</div> <!-- /container -->
</div><!-- /grey -->
<!-- +++++ Second Post +++++ -->
<div id="anon3">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<h2><b>Introduction</b></h2>
<p>
While many methods of sending files online exist, scaling file sending to accomodate larger and larger files can be a problem due to constraints on bandwidth, connection reliability and maintaining file integrity. To solve some of these issues, the technology of torrenting was born. At its core, torrenting simply involves taking a large file, breaking it into smaller chunks, transmitting those smaller chunks from one peer to another (hence P2P), and having the receiving party reconstruct those smaller chunks into the original file. The advantages here are that this process is decentralized, can be interrupted/resumed, and leechers can simultaneously download from multiple seeders thus speeding up the process. This process inherently relies on users' IP addresses for file transmission which are visible to anyone participating. As such, we must take precautions using a VPN to mask this information. In this article, we will explore how, after binding a VPN to their torrent clients, Sam the Seeder can privately share a large file with Larry the Leecher.
</p>
</div>
</div><!-- /row -->
</div> <!-- /container -->
</div><!-- /white -->
<div id="anon2">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<h2><b>Setup</b></h2> </br> </br>
<p>
We start from the perspective of both Sam and Larry as both will complete these inital steps.
<br>
<img src="sam.png"> <img src="larry.png">
</p>
<p>
It is presumed that both Sam and Larry have already purchased a subscription to a <a href=https://blog.nowhere.moe/opsec/vpn/index.html target=_blank>VPN</a>. For this example we will use Proton VPN, but other <a href=https://kycnot.me/?t=service&q=vpn target=_blank>non-KYC VPNs</a> that accept Monero, such as Mullvad, may also be used. To start, they will sign in to their VPN client, ensure kill switch is enabled in the Settings, connect to their VPN and verify their IP address.
<img src="1.png" class="imgRz">
</p>
<p>
Both Sam and Larry will install qBittorrent:
<pre>
<code class="nim">
sudo apt install qbittorrent
</code>
</pre>
</p>
<p>
Sam and Larry will open up qBittorrent and be greeted with a one-time pop-up.
<img src="2.png" class="imgRz">
</p>
<p>
Next, Sam and Larry need to bind their VPN to qBittorrent. Under Tools -> Preferences -> Advanced, there is an option to specify the network interface. Select tun0, then click OK. Note: this interface does not appear unless the VPN is connected.
<img src="3.png" class="imgRz">
</p>
<p>
With this step complete, all qBittorrent traffic is routed through the VPN. Should the VPN disconnect, all current downloads/uploads will stop without revealing Sam or Larry's true IP address due to the kill switch option previously enabled.
</p>
<p>
We will switch to Sam's perspective.
<br>
<img src="sam.png">
</p>
<p>
Sam is now ready to share a file with Larry. He has a 10GB file of "linux ISOs" for which he will need to create a .torrent file. To help with this, Sam will use <a href=https://privtracker.com target=_blank>PrivTracker</a>, a private BitTorrent tracker, to announce his .torrent file. Sam generates a private announce URL on the PrivTracker website and copies it to his clipboard.
<img src="4.png" class="imgRz">
</p>
<p>
Additionally, it is possible to self-host PrivTracker on a VPS. Following the instructions on their <a href=https://github.com/meehow/privtracker target=_blank>GitHub</a>, we need to run:
<pre>
<code class="nim">
Build
# Clone this repository.
$ git clone https://github.com/meehow/privtracker.git
# cd into the directory
$ cd privtracker
# Run go build
$ go build
Usage
# Runs on port 1337 and redirects to privtracker.com by default.
$ ./privtracker
# Export PORT and DOMAIN variables to use custom values.
$ export PORT=12345 DOMAIN=customprivtracker.com; ./privtracker
</code>
</pre>
</p>
<p>
In qBittorrent, Sam will go to Tools -> Torrent Creator. He selects the desired file, checks the box to make it a private torrent, clicks the box to start seeding immediately, pastes the previous copied announce URL in the Trackers URLs section and clicks on Create Torrent. Once the process finishes, he clicks OK.
<img src="5.png" class="imgRz">
</p>
<p>
Sam's qBittorrent client now shows he is now seeding the his 10GB file. Sam leaves his qBittorrent client running in order to be connectable and to seed the file to anyone connecting.
<img src="6.png" class="imgRz">
</p>
<p>
Sam now starts a <a href=https://blog.nowhere.moe/opsec/anonsimplex/index.html target=_blank>SimpleX</a> chat with Larry using disappearing messages and sends the newly created .torrent file.
<img src="7.png" class="imgRz">
</p>
<p>
We will switch to Larry's perspective.
<br>
<img src="larry.png">
</p>
<p>
Larry adds the .torrent file to his qBittorrent client to begin downloading the 10GB file. Under File -> Add Torrent File, Larry selects the .torrent file he received and clicks Open. Larry chooses where to save the 10GB file then clicks OK.
<img src="8.png" class="imgRz">
</p>
</div>
</div><!-- /row -->
</div> <!-- /container -->
</div><!-- /white -->
<!-- +++++ Second Post +++++ -->
<div id="anon1">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<h2><b>Conclusion</b></h2> </br> </br>
<p>
Larry is now leeching the file that Sam is seeding! After a bit of time the transfer will be complete. Additionally, when inspecting the connecting peers, Larry is only able to see Sam's VPN IP address and vice versa.
<img src="9.png" class="imgRz">
</p>
</div>
</div><!-- /row -->
</div> <!-- /container -->
</div><!-- /white -->
<!-- +++++ Footer Section +++++ -->
<div id="anonb">
<div class="container">
<div class="row">
<div class="col-lg-4">
<h4>Nihilism</h4>
<p>
Until there is Nothing left.</p></br></br><p>Creative Commons Zero: No Rights Reserved</br><img src="\CC0.png">
</p>
</div><!-- /col-lg-4 -->
<div class="col-lg-4">
<h4>My Links</h4>
<p>
<a target="_blank" rel="noopener noreferrer" href="http://blog.nowhere.moe/rss/feed.xml">RSS Feed</a><br/><a target="_blank" rel="noopener noreferrer" href="https://simplex.chat/contact#/?v=2-7&smp=smp%3A%2F%2FL5jrGV2L_Bb20Oj0aE4Gn-m5AHet9XdpYDotiqpcpGc%3D%40nowhere.moe%2FH4g7zPbitSLV5tDQ51Yz-R6RgOkMEeCc%23%2F%3Fv%3D1-3%26dh%3DMCowBQYDK2VuAyEAkts5T5AMxHGrZCCg12aeKxWcpXaxbB_XqjrXmcFYlDQ%253D&data=%7B%22type%22%3A%22group%22%2C%22groupLinkId%22%3A%22c3Y-iDaoDCFm6RhptSDOaw%3D%3D%22%7D">SimpleX Chat</a><br/>
</p>
</div><!-- /col-lg-4 -->
<div class="col-lg-4">
<h4 class="readable">About nihilist</h4>
<p style="word-wrap: break-word;"><u>Donate XMR:</u>
8AUYjhQeG3D5aodJDtqG499N5jXXM71gYKD8LgSsFB9BUV1o7muLv3DXHoydRTK4SZaaUBq4EAUqpZHLrX2VZLH71Jrd9k8
</p></br>
<p style="word-wrap: break-word;"><u>Donate XMR to the author:</u>
8AHNGepbz9844kfCqR4aVTCSyJvEKZhtxdyz6Qn8yhP2gLj5u541BqwXR7VTwYwMqbGc8ZGNj3RWMNQuboxnb1X4HobhSv3</p>
<p class="readable"><u>Contact:</u> nihilist@contact.nowhere.moe (<a
href="https://nowhere.moe/nihilist.pubkey">PGP</a>)</p>
</div><!-- /col-lg-4 -->
</div>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
</body>
</html>