text stringlengths 0 1.99k |
|---|
This scan was made before a patch was available for the vulnerabilities, |
therefore we can determine that these servers were vulnerable. A package |
maintainer could disable SHA hash support at compile time, however SHA |
would not appear in the server greeting. There are no other configuration |
options of which we are aware that can prevent the vulnerability from |
triggering. |
Amongst the patches for the reported vulnerabilities was an increase in |
the protocol version: |
make it easier to spot unpatched servers |
--- |
rsync.h | 2 +- |
1 file changed, 1 insertion(+), 1 deletion(-) |
diff --git a/rsync.h b/rsync.h |
index b9a7101a..9be1297b 100644 |
--- a/rsync.h |
+++ b/rsync.h |
@@ -111,7 +111,7 @@ |
/* Update this if you make incompatible changes and ALSO update the |
* SUBPROTOCOL_VERSION if it is not a final (official) release. */ |
-#define PROTOCOL_VERSION 31 |
+#define PROTOCOL_VERSION 32 |
/* This is used when working on a new protocol version or for any |
* unofficial protocol tweaks. It should be a non-zero value for |
* each pre-release repo |
-- |
2.34.1 |
The protocol version was explicitly changed to make scanning for |
vulnerable servers easier for defenders. |
-- 3.1.0 - Disclaimer and Assumptions We Make |
In the following sections, we present case studies of Rsync servers that |
were likely vulnerable at the time of writing. We speculate about |
potential attacks a hypothetical attacker could have launched by |
compromising these systems. However, because we never exploited these |
issues on servers for which we did not have permission, it is difficult to |
verify whether some assumptions are correct in individual cases. |
We assume that: |
* When Rsync and HTTP(S) traffic are served by the same domain (e.g. |
example.com), we assume that both processes run on the same backend |
server(s). We have no way of knowing backend infrastructure. It may, for |
example, be possible that rsync traffic is routed to a different backend |
server by a reverse proxy. |
* The attackers are in possession of kernel exploits that allow them to |
escalate privileges on an updated Linux server, even with some hardening. |
The exploit facilitates cross-process interaction between e.g. rsync and |
HTTP(S) servers. We have seen such exploits regularly in kCTF [14][15]. |
* The servers found by the aforementioned server-greeting method are |
vulnerable and exploitable. At the time of writing this document, no patch |
to these vulnerabilities was available for Rsync. |
-- 3.2.0 - Precedent |
In 2003, a Gentoo mirror was believed to be compromised [16] through an |
Rsync heap buffer overflow. The forensic analysis revealed that the most |
likely scenario was that an attacker used a Rsync vulnerability to execute |
arbitrary code, and then used a kernel exploit to gain root access and |
install a root-kit. |
From various LWN articles, it looks like someone compromised Debian [17] |
servers, the Linux kernel CVS [18], and the Savannah CVS [19]. All of this |
happened the same year. While we don't have any evidence to support this, |
it may be possible that an organized actor has targeted distribution |
infrastructure in similar ways that we outline here. |
-- 3.3.0 - Attack Scenario: Missing Signatures |
While it is not common, there are still package managers that make signing |
packages optional. This becomes an issue when an attacker can compromise |
the official download server of the package manager or mirrors of it. |
There is nothing preventing an attacker from simply serving malicious |
files. |
The following section will provide a case-study about melpa.org, a popular |
Emacs Package Archive. |
-- 3.3.1 - melpa.org Compromised Mirror Can Serve Backdoored Packages |
Melpa is a popular Emacs Package Archive providing an alternative to |
elpa.gnu.org, which is used by default in Emacs. According to its website |
[20], it serves almost 6000 packages which have been downloaded a total of |
372,988,308 times at the time of writing. While melpa.org provides more |
package flexibility, it does not sign packages [21] before making them |
available to download from its official server. |
The project's GitHub README.md [22] does warn users that it is not |
responsible for the contents of unofficial mirrors. However, if any of the |
official mirrors using Rsync to synchronize packages is ever compromised, |
nothing is standing in the way of an attacker backdooring the packages. |
To confirm that there were no further conditions or constraints on an |
attacker launching a supply chain attack from a compromised mirror server, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.