|
|
Log in / Subscribe / Register

Security

Spoiled onions and Tor exit relays

By Nathan Willis
January 29, 2014

The Tor network offers users a valuable set of features designed to ensure anonymity, but those features rely on the availability of well-behaved Tor nodes. A research team in Sweden recently explored the Tor network looking for malicious nodes, and its newly-released findings indicate that while the bad actors are few, they are indeed out there.

The team is led by Philipp Winter and Stefan Lindskog at Karlstad University; their past research has looked at other potential threats to Tor, such as the "Great Firewall of China" and various deep-packet inspection (DPI) techniques. The new study took a look at Tor exit relays, the final nodes in Tor's network circuits which make the last-hop connections with Internet servers. These connections are not encrypted by Tor (although the payload connection itself could certainly be running over SSL/TLS), so they are particularly important to the integrity of the Tor network as a whole. A malicious exit relay could undermine its connections with a variety of man-in-the-middle (MITM) attacks: traffic sniffing, DNS poisoning, SSL stripping, or even HTTPS MITM interception.

Like a relay over trouble water

Winter and Lindskog monitored the Tor network for four months in 2013, analyzing the behavior of more than 1000 exit relays. They published their results [PDF] in January 2014. To detect a malicious relay, they used a lightweight Python tool that creates Tor circuits to a decoy destination, specifically choosing each exit relay used in order to test as many as possible. This is a non-standard feature of the test program; Tor clients can choose the circuit they use for their connection (in order to make it harder for outside attackers to predict the circuit), but by default Tor randomizes the circuit, rather than asking the user for input.

Relays conducting HTTPS MITM attacks could be detected by simply comparing the fingerprint of the destination's X.509 certificate as reported by the relay with the known, correct certificate. The tool could also detect SSL stripping attacks, in which the malicious relay would rewrite HTTPS URLs as HTTP equivalents. Here again, detecting the interference of the exit relay is a simple matter of comparing the document returned through Tor with the known original.

The team also tested SSH connections, in which a malicious relay might attempt to replace the destination server's public key, as well as DNS requests. SSH MITM attacks are more difficult to carry out, they note, because replacing the destination key only fools the SSH client if the client has never connected to the server before—for a known server, SSH will report the key mismatch to the user. DNS poisoning, they note, is not common, but in the past there have been incidents reported where Tor exit relays inadvertently blocked certain sites by running filtering software.

Results and impact

Over the course of the four-month scan, the team encountered just 25 misbehaving exit relays. As a percentage of Tor's total network, that is quite small; the roughly 1000 relays scanned during the test accounted for every active exit relay the team saw. Still, some might consider 2.5% high, particularly in light of the fact that most Tor clients cannot select the exit relay used for their connection.

The bad relays are summarized in a table as well as in the paper. The majority of the attacks detected were HTTPS MITM (18), followed by SSH MITM (5); several relays were found to mount both attacks. There were also two SSL-stripping relays, two relays that redirected DNS requests, and one that used an HTML injection attack.

Looking at the fake HTTPS certificates returned by the bad relays revealed another interesting fact: the researchers found that all of the HTTPS MITM relays returned a certificate signed by the same root Certificate Authority (labeled "Main Authority," which is not a genuine CA). That may suggest that all of the malicious exit relays were run by the same attacker, although there are other possibilities (such as a malicious-relay-in-a-box program). These exit relays were located in several countries, in several different IP address blocks, but in addition to using the same root CA, they were all running the same version of Tor.

The decoy destination site requested during each test also appears to have made a difference. The team reports that some of the tested relays would only launch an attack against their decoy site that used the word "bank" in its domain name.

Interpreting the significance of these results is a subjective exercise. The Tor network has mechanisms in place to block an exit relay if it is believed to be acting maliciously. The paper also notes that the HTTPS MITM attacks would be difficult to pull off against a real user, because the phony root CA used would trigger an invalid-certificate warning from the browser. Of course, that supposes that the user takes the invalid-certificate warning seriously, which is certainly not guaranteed, but it could be argued that a Tor user would be more cautious than average.

Going forward, the researchers recommend a few possible paths to protect users against attack. One is fetching server certificates in parallel over multiple Tor circuits, a technique that has also been recommended elsewhere for use with direct HTTPS connections (such as Convergence). They also speculate that initiating a certificate fetch (over a different circuit) whenever an invalid-certificate warning is encountered could be valuable.

For its part, the Tor project has historically been good about anticipating new threats and adapting to them. The Tor Browser Bundle, for example, incorporates the HTTPS Everywhere extension specifically to guard against SSL-stripping attacks. Whether or not 25 bad exit relays constitutes a significant-enough threat to prompt changes to Tor is up to the project to decide. The existing countermeasures can certainly block out 25 bad exit relays, but perhaps there would be ways to detect these relays without requiring a four-month study. For Tor users, the good news is that the vast majority of tor exit relays seem to be behaving properly—but the bad news is that there are no guarantees.

Comments (6 posted)

Brief items

Quotes of the week

RESOLVED, the Republican National Committee encourages Republican lawmakers to immediately take action to halt current unconstitutional surveillance programs and provide a full public accounting of the NSA’s data collection programs.
The US Republican National Committee

Results show that the representative consumer is willing to make a one-time payment for each app of $2.28 to conceal their browser history, $4.05 to conceal their list of contacts, $1.19 to conceal their location, $1.75 to conceal their phone’s identification number, and $3.58 to conceal the contents of their text messages. The consumer is also willing to pay $2.12 to eliminate advertising. Valuations for concealing contact lists and text messages for “more experienced” consumers are also larger than those for “less experienced” consumers.
Scott Savage and Donald M. Waldman, via Bruce Schneier

Comments (none posted)

New vulnerabilities

libreswan: denial of service

Package(s):libreswan CVE #(s):CVE-2013-6467
Created:January 29, 2014 Updated:January 29, 2014
Description: From the CVE entry:

Libreswan 3.7 and earlier allows remote attackers to cause a denial of service (NULL pointer dereference and IKE daemon restart) via IKEv2 packets that lack expected payloads.

Alerts:
Fedora FEDORA-2014-1092 libreswan 2014-01-29
Fedora FEDORA-2014-1121 libreswan 2014-01-29

Comments (none posted)

cxxtools: denial of service

Package(s):cxxtools CVE #(s):CVE-2013-7298
Created:January 29, 2014 Updated:February 17, 2014
Description: From the CVE entry:

query_params.cpp in cxxtools before 2.2.1 allows remote attackers to cause a denial of service (infinite recursion and crash) via an HTTP query that contains %% (double percent) characters.

Alerts:
Fedora FEDORA-2014-1207 cxxtools 2014-01-29
Mageia MGASA-2014-0073 cxxtols 2014-02-16

Comments (none posted)

clamav: multiple vulnerabilities

Package(s):clamav CVE #(s):
Created:January 28, 2014 Updated:January 29, 2014
Description: From the openSUSE advisory:

Code quality fixes in libclamav, clamd, sigtool, clamav-milter, clamconf, and clamdtop. Code quality fixes in libclamav, libclamunrar and freshclam. Valgrind suppression rules for dl_catch_error complaints. bb #8385: a PDF ASCII85Decode zero-length fix. libclamav: SCAN_ALL mode fixes. bb #7436: elf64 header early exit. iso9660: iso_scan_file rewrite.

Alerts:
openSUSE openSUSE-SU-2014:0144-1 clamav 2014-01-28

Comments (none posted)

tor: poor random number generation

Package(s):tor CVE #(s):CVE-2013-7295
Created:January 28, 2014 Updated:February 13, 2014
Description: From the bug report:

Tor 0.2.4.20 fixes potentially poor random number generation for users who 1) use OpenSSL 1.0.0 or later, 2) set "HardwareAccel 1" in their torrc file, 3) have "Sandy Bridge" or "Ivy Bridge" Intel processors, and 4) have no state file in their DataDirectory (as would happen on first start). Users who generated relay or hidden service identity keys in such a situation should discard them and generate new ones.

Alerts:
Mandriva MDVSA-2014:123 tor 2014-06-11
openSUSE openSUSE-SU-2014:0143-1 tor 2014-01-28
Mageia MGASA-2014-0059 tor 2014-02-12

Comments (none posted)

python-jinja2: code execution

Package(s):python-jinja2 CVE #(s):CVE-2014-1402
Created:January 27, 2014 Updated:September 2, 2014
Description: From the Mageia advisory:

Jinja2, a template engine written in pure python, was found to use /tmp as a default directory for jinja2.bccache.FileSystemBytecodeCache, which is insecure because the /tmp directory is world-writable and the filenames used like 'FileSystemBytecodeCache' are often predictable. A malicious user could exploit this bug to execute arbitrary code as another user.

Alerts:
Gentoo 201408-13 jinja 2014-08-29
Ubuntu USN-2301-1 jinja2 2014-07-24
Fedora FEDORA-2014-7399 python-jinja2 2014-06-22
Fedora FEDORA-2014-7166 python-jinja2 2014-06-22
CentOS CESA-2014:0747 python-jinja2 2014-06-11
Red Hat RHSA-2014:0747-01 python-jinja2 2014-06-11
Mandriva MDVSA-2014:096 python-jinja2 2014-05-16
Scientific Linux SLSA-2014:0747-1 python-jinja2 2014-06-11
Oracle ELSA-2014-0747 python-jinja2 2014-06-11
Red Hat RHSA-2014:0748-01 python33-python-jinja2 2014-06-11
Mageia MGASA-2014-0028 python-jinja2 2014-01-24

Comments (none posted)

strongswan: denial of service

Package(s):strongswan CVE #(s):CVE-2013-6076
Created:January 27, 2014 Updated:January 29, 2014
Description: From the CVE entry:

strongSwan 5.0.2 through 5.1.0 allows remote attackers to cause a denial of service (NULL pointer dereference and charon daemon crash) via a crafted IKEv1 fragmentation packet.

Alerts:
Fedora FEDORA-2014-0567 strongswan 2014-01-25
Fedora FEDORA-2014-0516 strongswan 2014-01-25

Comments (none posted)

xen: denial of service

Package(s):xen CVE #(s):CVE-2014-1642 CVE-2014-1666
Created:January 27, 2014 Updated:February 3, 2014
Description: From the Xen advisories:

[XSA-82]: AMD CPU erratum 793 "Specific Combination of Writes to Write Combined Memory Types and Locked Instructions May Cause Core Hang" describes a situation under which a CPU core may hang.

A malicious guest administrator can mount a denial of service attack affecting the whole system. (CVE-2013-6885)

[XSA-87]: The PHYSDEVOP_{prepare,release}_msix operations are supposed to be available to privileged guests (domain 0 in non-disaggregated setups) only, but the necessary privilege check was missing.

Malicious or misbehaving unprivileged guests can cause the host or other guests to malfunction. This can result in host-wide denial of service. Privilege escalation, while seeming to be unlikely, cannot be excluded. (CVE-2014-1666)

Alerts:
Gentoo 201407-03 xen 2014-07-16
openSUSE openSUSE-SU-2014:0483-1 xen 2014-04-04
SUSE SUSE-SU-2014:0373-1 Xen 2014-03-14
SUSE SUSE-SU-2014:0372-1 Xen 2014-03-14
CentOS CESA-2014:X002 xen 2014-01-25
Fedora FEDORA-2014-1559 xen 2014-02-03
Fedora FEDORA-2014-1552 xen 2014-02-03

Comments (none posted)

openjdk-7: unspecified vulnerability

Package(s):openjdk-7 CVE #(s):CVE-2014-0408
Created:January 24, 2014 Updated:February 3, 2014
Description:
Alerts:
Gentoo 201401-30 oracle-jdk-bin 2014-01-26
Ubuntu USN-2089-1 openjdk-7 2014-01-23
openSUSE openSUSE-SU-2014:0180-1 java-1_7_0-openjdk 2014-02-03
openSUSE openSUSE-SU-2014:0177-1 java-1_7_0-openjdk 2014-01-31
openSUSE openSUSE-SU-2014:0174-1 java-1_7_0-openjdk 2014-01-31

Comments (1 posted)

libmicrohttpd: code execution

Package(s):libmicrohttpd CVE #(s):CVE-2013-7039
Created:January 24, 2014 Updated:January 31, 2014
Description:

From the Red Hat bug tracker:

A stack overflow flaw was found in the MHD_digest_auth_check() function in libmicrohttpd. If MHD_OPTION_CONNECTION_MEMORY_LIMIT was configured to allow large allocations, a remote attacker could possibly use this flaw to cause an application using libmicrohttpd to crash or, potentially, execute arbitrary code with the privileges of the user running the application. This issue has been resolved in version 0.9.32.

Alerts:
Mageia MGASA-2014-0030 libmicrohttpd 2014-01-31
Fedora FEDORA-2014-0946 libmicrohttpd 2014-01-31
Fedora FEDORA-2014-0939 libmicrohttpd 2014-01-24
Gentoo 201402-01 libmicrohttpd 2014-02-02

Comments (none posted)

openstack-heat: two vulnerabilities

Package(s):openstack-heat CVE #(s):CVE-2013-6426 CVE-2013-6428
Created:January 23, 2014 Updated:January 29, 2014
Description:

From the Red Hat advisory:

It was found that heat did not properly enforce cloudformation-compatible API policy rules. An in-instance attacker could use the CreateStack or UpdateStack methods to create or update a stack, resulting in a violation of the API policy. Note that only setups using Orchestration's cloudformation-compatible API were affected. (CVE-2013-6426)

A flaw was found in the way Orchestration's REST API implementation handled modified request paths. An authenticated remote user could use this flaw to bypass the tenant-scoping restriction by modifying the request path, resulting in privilege escalation. Note that only setups using Orchestration's cloudformation-compatible API were affected. (CVE-2013-6428)

Alerts:
Red Hat RHSA-2014:0090-01 openstack-heat 2014-01-22

Comments (none posted)

openstack-neutron: information disclosure

Package(s):openstack-neutron CVE #(s):CVE-2013-6419
Created:January 23, 2014 Updated:January 29, 2014
Description:

From the Red Hat advisory:

It was discovered that the metadata agent in OpenStack Networking was missing an authorization check on the device ID that is bound to a specific port. A remote tenant could guess the instance ID bound to a port and retrieve metadata of another tenant, resulting in information disclosure. Note that only OpenStack Networking setups running neutron-metadata-agent were affected. (CVE-2013-6419)

Alerts:
Red Hat RHSA-2014:0231-01 openstack-nova 2014-03-04
Red Hat RHSA-2014:0091-01 openstack-neutron 2014-01-22

Comments (none posted)

Resources

Alkema: Misconceptions about forward-secrecy

Thijs Alkema has posted a blog entry addressing several common misconceptions about forward secrecy. Included in the discussion are a debunking of the notion that using more keys results in greater difficulty breaking the encryption ("To break a number of Diffie-Hellman negotiated keys all using the same Diffie-Hellman group, a number of different attacks are known. Many of these scale pretty well in the number of sessions.") and a look at the notion that forward secrecy makes it impossible to break future sessions. "The first two steps do not use the key at all, their result can be stored for later use to decrypt future keys. There is a trade-off here, though: the larger the factor base, the slower the first and second stages are, but the faster the third stage is. It’s unlikely that it is worth the effort to make the third stage as efficient as decrypting a session with a RSA private key is, but it’s not impossible."

Comments (none posted)

Page editor: Nathan Willis
Next page: Kernel development>>


Copyright © 2014, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds