syncthing-security.7 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH "SYNCTHING-SECURITY" "7" "July 17, 2016" "v0.14" "Syncthing"
  4. .SH NAME
  5. syncthing-security \- Security Principles
  6. .
  7. .nr rst2man-indent-level 0
  8. .
  9. .de1 rstReportMargin
  10. \\$1 \\n[an-margin]
  11. level \\n[rst2man-indent-level]
  12. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  13. -
  14. \\n[rst2man-indent0]
  15. \\n[rst2man-indent1]
  16. \\n[rst2man-indent2]
  17. ..
  18. .de1 INDENT
  19. .\" .rstReportMargin pre:
  20. . RS \\$1
  21. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  22. . nr rst2man-indent-level +1
  23. .\" .rstReportMargin post:
  24. ..
  25. .de UNINDENT
  26. . RE
  27. .\" indent \\n[an-margin]
  28. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  29. .nr rst2man-indent-level -1
  30. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  31. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  32. ..
  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 nodes
  40. from joining a cluster, the certificate fingerprint of each node is compared
  41. to a preset list of acceptable nodes at connection establishment. The
  42. fingerprint is computed as the SHA\-256 hash of the certificate and displayed
  43. in BASE32 encoding to form a reasonably compact and convenient string.
  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 \fI\%security page\fP <\fBhttp://syncthing.net/security.html\fP>\&.
  50. .SH INFORMATION LEAKAGE
  51. .SS Global Discovery
  52. .sp
  53. When global discovery is enabled, Syncthing sends an announcement packet every
  54. 30 minutes to the global discovery server so that it can keep a mapping
  55. between your device ID and external IP. The packets contain the device ID and
  56. listening port. Also, when connecting to other devices that have not been seen
  57. on the local network, a query is sent to the global discovery server
  58. containing the device ID of the requested device. The discovery server is
  59. currently hosted by \fI\%@calmh\fP <\fBhttps://github.com/calmh\fP>\&. Global discovery defaults to \fBon\fP\&.
  60. .sp
  61. When turned off, devices with dynamic addresses not on the local network cannot
  62. be found and connected to.
  63. .sp
  64. An eavesdropper on the Internet can deduce which machines are running
  65. Syncthing with global discovery enabled, what their device IDs are, and what
  66. device IDs they are attempting to connect to via global discovery.
  67. .sp
  68. If a different global discovery server is configured, no data is sent to the
  69. default global discovery server.
  70. .SS Local Discovery
  71. .sp
  72. When local discovery is enabled, Syncthing sends broadcast (IPv4) and multicast
  73. (IPv6) packets to the local network every 30 seconds. The packets contain the
  74. device ID and listening port. Local discovery defaults to \fBon\fP\&.
  75. .sp
  76. An eavesdropper on the local network can deduce which machines are running
  77. Syncthing with local discovery enabled, and what their device IDs are.
  78. .sp
  79. When turned off, devices with dynamic addresses on the local network cannot be
  80. found and connected to.
  81. .SS Upgrade Checks
  82. .sp
  83. When automatic upgrades are enabled, Syncthing checks for a new version at
  84. startup and then once every twelve hours. This is by an HTTPS request to the
  85. download site for releases, currently \fBhosted at GitHub\fP\&. Automatic upgrades
  86. default to \fBon\fP (unless Syncthing was compiled with upgrades disabled).
  87. .sp
  88. Even when automatic upgrades are disabled in the configuration, an upgrade check
  89. as above is done when the GUI is loaded, in order to show the "Upgrade to ..."
  90. button when necessary. This can be disabled only by compiling syncthing with
  91. upgrades disabled.
  92. .sp
  93. In effect this exposes the majority of the Syncthing population to tracking by
  94. the operator of the download site (currently GitHub). That data is not available
  95. to outside parties (including \fI\%@calmh\fP <\fBhttps://github.com/calmh\fP> etc), except that download counts
  96. per release binary are available in the GitHub API. The upgrade check (or
  97. download) requests \fIdo not\fP contain any identifiable information about the user,
  98. device, Syncthing version, etc.
  99. .SS Usage Reporting
  100. .sp
  101. When usage reporting is enabled, Syncthing reports usage data at startup and
  102. then every 24 hours. The report is sent as an HTTPS POST to the usage reporting
  103. server, currently hosted by \fI\%@calmh\fP <\fBhttps://github.com/calmh\fP>\&. The contents of the usage report can
  104. be seen behind the "Preview" link in settings. Usage reporting defaults to
  105. \fBoff\fP but the GUI will ask once about enabling it, shortly after the first
  106. install.
  107. .sp
  108. The reported data is protected from eavesdroppers, but the connection to the
  109. usage reporting server itself may expose the client as running Syncthing.
  110. .SS Sync Connections (BEP)
  111. .sp
  112. Sync connections are attempted to all configured devices, when the address is
  113. possible to resolve. The sync connection is based on TLS 1.2. The TLS
  114. certificates are sent in clear text (as in HTTPS etc), meaning that the
  115. certificate Common Name (by default \fBsyncthing\fP) is visible.
  116. .sp
  117. An eavesdropper can deduce that this is a Syncthing connection and calculate the
  118. device IDs involved based on the hashes of the sent certificates.
  119. .sp
  120. Likewise, if the sync port (default 22000) is accessible from the internet, a
  121. port scanner may discover it, attempt a TLS negotiation and thus obtain the
  122. device certificate. This provides the same information as in the eavesdropper
  123. case.
  124. .SS Web GUI
  125. .sp
  126. If the web GUI is accessible, it exposes the device as running Syncthing. The
  127. web GUI defaults to being reachable from the \fBlocal host only\fP\&.
  128. .SH IN SHORT
  129. .sp
  130. Parties doing surveillance on your network (whether that be corporate IT, the
  131. NSA or someone else) will be able to see that you use Syncthing, and your device
  132. IDs \fI\%are OK to share anyway\fP <\fBhttp://docs.syncthing.net/users/faq.html#should-i-keep-my-device-ids-secret\fP>,
  133. but the actual transmitted data is protected as well as we can. Knowing your
  134. device ID can expose your IP address, using global discovery.
  135. .SH PROTECTING YOUR SYNCTHING KEYS AND IDENTITY
  136. .sp
  137. Anyone who can access the Syncthing TLS keys and config file on your device can
  138. impersonate your device, connect to your peers, and then have access to your
  139. synced files. Here are some general principles to protect your files:
  140. .INDENT 0.0
  141. .IP 1. 3
  142. If a device of yours is lost, make sure to revoke its access from your other
  143. devices.
  144. .IP 2. 3
  145. If you\(aqre syncing confidential data on an encrypted disk to guard against
  146. device theft, put the Syncthing config folder on the same encrypted disk to
  147. avoid leaking keys and metadata. Or, use whole disk encryption.
  148. .UNINDENT
  149. .SH AUTHOR
  150. The Syncthing Authors
  151. .SH COPYRIGHT
  152. 2015, The Syncthing Authors
  153. .\" Generated by docutils manpage writer.
  154. .