blog-contributions/opsec/syncthing/index.html
prism_breaker a3a651a53a Fix typo
2024-11-22 14:32:43 +00:00

257 lines
11 KiB
HTML

<!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>Syncthing anonymous file sharing</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>Prism_Breaker</ba></p>
<h1>Use syncthing to share large file over tor </h1>
<p>Onionshare is a good choice when you want to share small files over tor. But onionshare cannot handle big files, when tor circuit fails(which is quite common) your download simply fails, and it does not support resuming the download at where it fails. Syncthing is a better alternative for sharing big files over tor, it does not need any setup or hosting, and it will automatically retry at break point when network fails.</p>
<p>Syncthing is FOSS software and has E2EE by default, and can run without a clearnet ip address. This means you can just spin up a client, and your data will be encrypted and sent through syncthing network. If you have a threat model that needs a way to reliably share files with minimum exposure, this setup will be suitable.</p>
<p>Syncthing has its own relays for supporting transmission of files between peers which are both behind the nat, and it works when both parties are behind tor. This guarantees the anonymity of both parties.</p>
<p>OPSEC Recommendations:
<br>1.Hardware : (Personal Computer / Laptop)
<br>2.Host OS: Linux (Or Qubes OS)
<br>3.Hypervisor: libvirtd QEMU/KVM (Or Qubes OS's Xen)
<br>4.Guest OS: Whonix setup
</p>
<p>
It is highly recommended to use whonix for this setup, because there are always cases that an app might not honor your proxy setting and somehow connects directly. It is always a good idea to put sensitive app behind whonix gateway, so your clearnet ip will never be exposed
</p>
<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>Initial Setup </b></h2>
<p>The first thing to do is to get syncthing to your whonix workstation.</p>
<p>For simplicity you can just do</p>
<pre><code class="nim">sudo apt-get install syncthing
</code></pre>
<p>Sometimes apt might not contains the up to date package, then you need to get it from the site</p>
<img src="1.png" class="imgRz">
<p>Next verify the sha256sum according to <a href="https://syncthing.net/security/">https://syncthing.net/security/</a></p>
<pre><code class="nim">curl -s https://syncthing.net/release-key.txt | gpg --import
</code></pre>
<p>Check the gpg fingerprint, it should be like this</p>
<pre><code class="nim">
gpg --fingerprint
/home/user/.gnupg/pubring.kbx
-----------------------------
pub rsa2048/0xD26E6ED000654A3E 2014-12-29 [SC]
Key fingerprint = 37C8 4554 E7E0 A261 E4F7 6E1E D26E 6ED0 0065 4A3E
uid [ unknown] Syncthing Release Management <release@syncthing.net>
sub rsa2048/0x681C3CFCF614F575 2014-12-29 [E]
</code></pre>
<p>Then download verify the checksum file, and check the checksum to see if it matches</p>
<pre><code class="nim">
$ curl -sLO https://github.com/syncthing/syncthing/releases/download/v1.23.6/sha256sum.txt.asc
$ gpg --verify sha256sum.txt.asc
gpg: Signature made Mo 03 Jul 2023 10:09:30 UTC
gpg: using RSA key D26E6ED000654A3E
gpg: Good signature from "Syncthing Release Management <release@syncthing.net>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
$ sha256sum -c sha256sum.txt.asc
...
sha256sum: syncthing-linux-386-v1.23.6.tar.gz: No such file or directory
syncthing-linux-386-v1.23.6.tar.gz: FAILED open or read
syncthing-linux-amd64-v1.23.6.tar.gz: OK <-- this one
sha256sum: syncthing-linux-armv5-v1.23.6.tar.gz: No such file or directory
syncthing-linux-armv5-v1.23.6.tar.gz: FAILED open or read
...
sha256sum: WARNING: 14 lines are improperly formatted
sha256sum: WARNING: 35 listed files could not be read
</code></pre>
<p>Next you need to do some changes in the tor browser, so you can access the web panel</p>
<p>type about:config inside the address bar, accept the risk and continue</p>
<img src="2.png" class="imgRz">
<p>search for no_proxies_on in the search bar, and add 127.0.0.1 to it</p>
<img src="3.png" class="imgRz">
<p>Editing your tor browser is fine if you are just using it to access local syncthing instance, but you should revert the change if you want to access the internet. Changing tor config might bring some unexpected browser fingerprint issue. You should get a separate whonix vm if paranoid.</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>Set up syncthing</b></h2> </br> </br>
<p>Next decompress the syncthing pack and execute it</p>
<pre><code class="nim">
$ tar xvf syncthing-linux-amd64-v1.28.0.tar.gz
$ cd syncthing-linux-amd64-v1.28.0/
$ ./syncthing
</code></pre>
<p>If you have setup your tor browser correctly it should automatically redirect you to http://127.0.0.1:8384/ and you will see the web panel</p>
<p>Next thing to do is to find your client id, it is in the actions menu</p>
<img src="4.png" class="imgRz">
<p></p>
<img src="5.png" class="imgRz">
<p>Next exchange this id with people you are sharing file with</p>
<p>After that add each other in both clients in the remote device section, if nothing goes wrong you should be able to see each other in the remote device section showed as "connected"</p>
<img src="6.png" class="imgRz">
<p></p>
<img src="7.png" class="imgRz">
<p></p>
<img src="8.png" class="imgRz">
</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>Sync files</b></h2> </br> </br>
<p>After the previous setup, you can share the file you want</p>
<p>Syncthing over tor is really slow! Because if both parties are behind tor, your file will probably goes through a circuit like this: </p>
<img src="Syncthing_circuit.jpg" class="imgRz">
<p>I personally tried this setup, and it took me 4 hours 30 minutes to send a 10GB file. So be patient when you are sending some large files</p>
<p>You and your peer will only see the relay server's ip address, unlike the vpn setup which will expose the vpn ip you are using, which you can check here <a href="https://blog.nowhere.moe/opsec/syncthingvpn/index.html">https://blog.nowhere.moe/opsec/syncthingvpn/index.html</a></p>
<p>You peer also won't know you are using tor if you do not tell him</p>
<img src="remote_node.png" class="imgRz">
<p>Choose add folder to create a new sharing Folder, and choose to share this folder with your peer</p>
<img src="9.png" class="imgRz">
<p></p>
<img src="10.png" class="imgRz">
<p>If nothing goes wrong, the receiver should see this</p>
<img src="11.png" class="imgRz">
<p>Agree and add the folder, after that syncthing will automatically transmit the files</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>PrismBreaker</h4>
<p>
Shatter the big brother.</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>About nihilist</h4>
<p style="word-wrap: break-word;"><u>Donate XMR:</u> 87iB34vdFvNULrAjyfVAZ7jMXc8vbq9tLGMLjo6WC8N9Xo2JFaa8Vkp6dwXBt8rK12Xpz5z1rTa9jSfgyRbNNjswHKTzFVh</p></br><p><u>Contact:</u> prismbreaker@waifu.club (<a href="https://keys.openpgp.org/vks/v1/by-fingerprint/735816B2B9E6F4660ECE44D983E602C4B6EA6AEE">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>