syncthing-security.7 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .
  4. .nr rst2man-indent-level 0
  5. .
  6. .de1 rstReportMargin
  7. \\$1 \\n[an-margin]
  8. level \\n[rst2man-indent-level]
  9. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  10. -
  11. \\n[rst2man-indent0]
  12. \\n[rst2man-indent1]
  13. \\n[rst2man-indent2]
  14. ..
  15. .de1 INDENT
  16. .\" .rstReportMargin pre:
  17. . RS \\$1
  18. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  19. . nr rst2man-indent-level +1
  20. .\" .rstReportMargin post:
  21. ..
  22. .de UNINDENT
  23. . RE
  24. .\" indent \\n[an-margin]
  25. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  26. .nr rst2man-indent-level -1
  27. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  28. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  29. ..
  30. .TH "SYNCTHING-SECURITY" "7" "Jun 02, 2024" "v1.27.7" "Syncthing"
  31. .SH NAME
  32. syncthing-security \- Security Principles
  33. .sp
  34. Security is one of the primary project goals. This means that it should not be
  35. possible for an attacker to join a cluster uninvited, and it should not be
  36. possible to extract private information from intercepted traffic. Currently this
  37. is implemented as follows.
  38. .sp
  39. All device to device traffic is protected by TLS. To prevent uninvited devices
  40. from joining a cluster, the certificate fingerprint of each device is compared
  41. to a preset list of acceptable devices at connection establishment. The
  42. fingerprint is computed as the SHA\-256 hash of the certificate and displayed
  43. in a human\-friendly encoding, called Device ID.
  44. .sp
  45. Incoming requests for file data are verified to the extent that the requested
  46. file name must exist in the local index and the global model.
  47. .sp
  48. For information about ensuring you are running the code you think you are and
  49. for reporting security vulnerabilities, please see the official \X'tty: link https://syncthing.net/security'\fI\%security page\fP <\fBhttps://syncthing.net/security\fP>\X'tty: link'\&.
  50. .SH INFORMATION LEAKAGE
  51. .SS Global Discovery
  52. .sp
  53. When global discovery is enabled, Syncthing sends an announcement every 30
  54. minutes to the global discovery servers so that they can keep a mapping
  55. between your device ID and external IP. The announcement contain the device
  56. ID and listening port(s). Also, when connecting to other devices that have
  57. not been seen on the local network, a query is sent to the global discovery
  58. servers containing the device ID of the requested device. The connection to
  59. the discovery server is encrypted using TLS and the discovery server
  60. certificate is verified, so the contents of the query should be considered
  61. private between the device and the discovery server. The discovery servers
  62. are currently hosted by \X'tty: link https://github.com/calmh'\fI\%@calmh\fP <\fBhttps://github.com/calmh\fP>\X'tty: link'\&. Global discovery defaults to \fBon\fP\&.
  63. .sp
  64. When turned off, devices with dynamic addresses not on the local network cannot
  65. be found and connected to.
  66. .sp
  67. An eavesdropper on the Internet can deduce which machines are running
  68. Syncthing with global discovery enabled, and what their device IDs are.
  69. .sp
  70. The operator of the discovery server can map arbitrary device addresses to
  71. IP addresses, and deduce which devices are connected to each other.
  72. .sp
  73. If a different global discovery server is configured, no data is sent to the
  74. default global discovery servers.
  75. .SS Local Discovery
  76. .sp
  77. When local discovery is enabled, Syncthing sends broadcast (IPv4) and multicast
  78. (IPv6) packets to the local network every 30 seconds. The packets contain the
  79. device ID and listening port. Local discovery defaults to \fBon\fP\&.
  80. .sp
  81. An eavesdropper on the local network can deduce which machines are running
  82. Syncthing with local discovery enabled, and what their device IDs are.
  83. .sp
  84. When turned off, devices with dynamic addresses on the local network cannot be
  85. found and connected to.
  86. .SS Upgrade Checks
  87. .sp
  88. When automatic upgrades are enabled, Syncthing checks for a new version at
  89. startup and then once every twelve hours. This is by an HTTPS request to the
  90. download site for releases, currently hosted by \X'tty: link https://github.com/calmh'\fI\%@calmh\fP <\fBhttps://github.com/calmh\fP>\X'tty: link'\&.
  91. Automatic upgrades default to \fBon\fP (unless Syncthing was compiled with
  92. upgrades disabled).
  93. .sp
  94. Even when automatic upgrades are disabled in the configuration, an upgrade check
  95. as above is done when the GUI is loaded, in order to show the “Upgrade to …”
  96. button when necessary. This can be disabled only by compiling Syncthing with
  97. upgrades disabled.
  98. .sp
  99. The actual download, should an upgrade be available, is done from
  100. \fBGitHub\fP, thus exposing the user to them.
  101. .sp
  102. The upgrade check (or download) requests \fIdo not\fP contain any identifiable
  103. information about the user or device.
  104. .SS Usage Reporting
  105. .sp
  106. When usage reporting is enabled, Syncthing reports usage data at startup and
  107. then every 24 hours. The report is sent as an HTTPS POST to the usage reporting
  108. server, currently hosted by \X'tty: link https://github.com/calmh'\fI\%@calmh\fP <\fBhttps://github.com/calmh\fP>\X'tty: link'\&. The contents of the usage report can
  109. be seen behind the “Preview” link in settings. Usage reporting defaults to
  110. \fBoff\fP but the GUI will ask once about enabling it, shortly after the first
  111. install.
  112. .sp
  113. The reported data is protected from eavesdroppers, but the connection to the
  114. usage reporting server itself may expose the client as running Syncthing.
  115. .SS Sync Connections (BEP)
  116. .sp
  117. Sync connections are attempted to all configured devices, when the address is
  118. possible to resolve. The sync connection is based on TLS 1.2 or TLS 1.3. The TLS
  119. certificates can be obtained by an eavesdropper, although it is more difficult to do so in TLS 1.3. This means that the contents of the certificate are visible, which includes certificate Common Name (by default \fBsyncthing\fP).
  120. .sp
  121. An eavesdropper can deduce that this is a Syncthing connection and under certain circumstances calculate the
  122. device IDs involved based on the hashes of the sent certificates.
  123. .sp
  124. Likewise, if the sync port (default 22000) is accessible from the internet, a
  125. port scanner may discover it, attempt a TLS negotiation and thus obtain the
  126. device certificate. This provides the same information as in the eavesdropper
  127. case.
  128. .SS Relay Connections
  129. .sp
  130. When relaying is enabled, Syncthing will look up the pool of public relays
  131. and establish a connection to one of them (the best, based on an internal
  132. heuristic). The selected relay server will learn the connecting device’s
  133. device ID. Relay servers can be run by \fBanyone in the general public\fP\&.
  134. Relaying defaults to \fBon\fP\&. Syncthing can be configured to disable
  135. relaying, or only use specific relays.
  136. .sp
  137. If a relay connections is required between two devices, the relay will learn
  138. the other device’s device ID as well.
  139. .sp
  140. Any data exchanged between the two devices is encrypted as usual and not
  141. subject to inspection by the relay.
  142. .SS Web GUI
  143. .sp
  144. If the web GUI is accessible, it exposes the device as running Syncthing. The
  145. web GUI defaults to being reachable from the \fBlocal host only\fP\&.
  146. .SH IN SHORT
  147. .sp
  148. Parties doing surveillance on your network (whether that be corporate IT, the
  149. NSA or someone else) will be able to see that you use Syncthing, and your device
  150. IDs \X'tty: link https://docs.syncthing.net/users/faq.html#should-i-keep-my-device-ids-secret'\fI\%are OK to share anyway\fP <\fBhttps://docs.syncthing.net/users/faq.html#should-i-keep-my-device-ids-secret\fP>\X'tty: link',
  151. but the actual transmitted data is protected as well as we can. Knowing your
  152. device ID can expose your IP address, using global discovery.
  153. .SH PROTECTING YOUR SYNCTHING KEYS AND IDENTITY
  154. .sp
  155. Anyone who can access the Syncthing TLS keys and config file on your device can
  156. impersonate your device, connect to your peers, and then have access to your
  157. synced files. Here are some general principles to protect your files:
  158. .INDENT 0.0
  159. .IP 1. 3
  160. If a device of yours is lost, make sure to revoke its access from your other
  161. devices.
  162. .IP 2. 3
  163. If you’re syncing confidential data on an encrypted disk to guard against
  164. device theft, put the Syncthing config folder on the same encrypted disk to
  165. avoid leaking keys and metadata. Or, use whole disk encryption.
  166. .UNINDENT
  167. .SH AUTHOR
  168. The Syncthing Authors
  169. .SH COPYRIGHT
  170. 2014-2019, The Syncthing Authors
  171. .\" Generated by docutils manpage writer.
  172. .