Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Security Privacy

Researcher Finds Tor Exit Node Adding Malware To Downloads 126

Trailrunner7 writes: A security researcher has identified a Tor exit node that was actively patching binaries users download, adding malware to the files dynamically. The discovery, experts say, highlights the danger of trusting files downloaded from unknown sources and the potential for attackers to abuse the trust users have in Tor and similar services. Josh Pitts of Leviathan Security Group ran across the misbehaving Tor exit node while performing some research on download servers that might be patching binaries during download through a man-in-the middle attack.

What Pitts found during his research is that an attacker with a MITM position can actively patch binaries–if not security updates–with his own code. In terms of defending against the sort of attack, Pitts suggested that encrypted download channels are the best option, both for users and site operators. "SSL/TLSis the only way to prevent this from happening. End-users may want to consider installing HTTPS Everywhere or similar plugins for their browser to help ensure their traffic is always encrypted," he said via email.
This discussion has been archived. No new comments can be posted.

Researcher Finds Tor Exit Node Adding Malware To Downloads

Comments Filter:
  • by i kan reed ( 749298 ) on Friday October 24, 2014 @01:35PM (#48223601) Homepage Journal

    And I'm glad the article says everything is just fine and there are no problems. What a relief.

  • Checksums (Score:2, Insightful)

    by Anonymous Coward

    Or check the checksum

    • Re:Checksums (Score:4, Interesting)

      by thieh ( 3654731 ) on Friday October 24, 2014 @02:02PM (#48223947)
      What assurances do you have that they are not patching the checksum as well?
      • by gweihir ( 88907 )

        None. What you need is a digital signature instead.

        • Re:Checksums (Score:4, Insightful)

          by bug1 ( 96678 ) on Friday October 24, 2014 @03:06PM (#48224649)

          What you need is a digital signature instead.

          And make sure its signed by a large well known company that works at the government level. Then you are really safe !!!

          • by gweihir ( 88907 )

            The stupidity of some people is staggering. You have really zero clue what you are talking about.

            • by bug1 ( 96678 )

              So the extra exclamation points didnt help to explain it then ?

              • I only start to get it after at least 4 exclamation marks.

              • Gweihir is saying you dont understand how digital signatures work, and Im inclined to agree.

                The file would be signed by the one distributing it, with a private key. Private keys are not disclosed to outside parties-- not even when you're getting your certificate issued by a trusted root. Even then, you simply generate a CSR, and hold the private key. The CSR and public key are sent to the certificate authority who signs them-- but as they NEVER see your private key, they have no ability to forge digital

                • by gweihir ( 88907 )

                  Thanks, that is what I meant. I find that as I get older, my tolerance for clueless people gets lower.

                  A side-note on this: That the CA never sees your private key is a myth. In practically all real-world situations, the CA generates your private key (stupid, yes, I know, but greed, a.k.a. "business", trumps reason in this world) with the one exception of a PGP web-of-trust. That is why PGP signatures are a lot more trustworthy when verifying binaries these days.

                  • In practically all real-world situations, the CA generates your private key (stupid, yes, I know, but greed, a.k.a. "business", trumps reason in this world) with the one exception of a PGP web-of-trust.

                    This just isnt true. Having worked with StartSSL, GoDaddy, Network Solutions, and a number of others-- all of them have you generate a CSR and keypair, and ask you to paste the CSR into a web form.

                    They NEVER generate your private key that I have seen, and I've been in consulting for nearly a decade.

        • by ne0n ( 884282 )
          Just torrent it FFS, come on people. Then start an exit node on your network.
        • by ihtoit ( 3393327 )

          who is your trustworthy CA?

          Answer should be: NONE, one compromised CA should prompt the realisation and/or assumption that they're ALL compromised.

          • by gweihir ( 88907 )

            Who said anything about a CA? That idea is broken...

            • by ihtoit ( 3393327 )

              where else would you go to check the authenticity of what is essentially a random string salted based on a derived value of an arbitrary binary object?

              • by gweihir ( 88907 )

                Not form a CA, that is for sure. But listen kid, this is a really complicated area. Read up on it, and the solution how to do it right may make itself known to you. (Yes, you just asked a beginner's question.)

    • by jythie ( 914043 )
      While in theory a good idea, any security that requires the average user to take extra (and tedious) manual steps will become another point of failure. Checksums are not a solution, they are just a way for people to feel superior.
  • Is "SSL connections only" an option with Tor? If so, it should be the default. Shouldn't be relying on the browser.

    • by thieh ( 3654731 )
      The problem is not everything can be accessed with SSL. Which makes me wonder why aren't we checking the files and checksum from different exit nodes. I don't think all of them patches the same malware do they?
      • Nit: SSL 3.0 is deprecated and only supports lower-security algorithms. TLS 1.2 is the current, secure version of the standard.

        Since a man-in-the-middle can negotiate TLS connections downward, SSL should be disabled entirely.

        • by jythie ( 914043 )
          Yeah, SSL is not exactly a pancea since it is only really useful if you have a chain of trust you can use, which puts things in the hands of a few private points of failure.
      • by Richy_T ( 111409 )

        True enough. But then a click-through disclaimer or somesuch should be required to proceed. Or you could go into the settings and turn it off.

    • by lgw ( 121541 )

      "HTTPS only" is a plug-in, on by default in the Tor Browser Bundle. The Tor dev team is really focused on making the browsing experience as normal as possible to encourage use over strong security by default. JS is enabled by default, for example (noscript is the other plug-in bundled, but I think it's turned off by default - haven't looked at Tor for a few years).

      I understand the desire of the Tor team to encourage many people to use Tor for normal, legal browsing, and ultimately that's the best security

      • Re:Defaults (Score:5, Informative)

        by lgw ( 121541 ) on Friday October 24, 2014 @02:22PM (#48224179) Journal

        Sorry, "HTTPS everywhere", not "-only" - it tries HTTPS first, which helps with a bunch of sites so you don't have to bookmark the https version specifically, but still falls back to HTTP when needed.

        Everyone should use that plugin in normal browsing IMO - it will drive traffic to HTTPS, and really there's no reason for non-HTTPS sites anymore Slashdot are you listening, you HTTP-only weenies?

  • Who's to say that your friendly ISP or government agency isn't doing the same? Or even better yet, how about for OS updates.

    Last time I checked even my linux *.list files were referencing HTTP hosts rather than HTTPS (not that HTTPS is really much better, when gov't agencies are concerned)

    Might make sense to use an SSL-enabled connection and a key that's provided with the distro.

    • by Anonymous Coward

      Last time I checked even my linux *.list files were referencing HTTP hosts rather than HTTPS

      If the packages are cross-checked against thumbprint files (which they really should be), then this sort of automatic infection system would fail unless it was somehow smart enough to remember the hashes and update the thumbprint files accordingly (which would require a LOT of state to maintain, as well as not being able to handle clients that download the thumbprint first). And if the packages are checked against G

    • by caseih ( 160668 )

      What does SSL have to do with it? As you say yourself, as long as you are checking the signing key on each package, you can guarantee that the package is intact and genuine, not matter what the MITM tries to do. The worst that happens with http is that someone can determine which file you downloaded. Hence the injecting of malware can't happen to Linux packages (if the private key is secured by the distro maker). Couldn't happen to any signed executable either, but on Windows users often blindly allow p

    • Probably varies Linux distro to distro. In Windows, the MSU files are all signed by MS so the download path isn't of issue, since if it is compromised any alterations to the file would break the signature.

    • by Burz ( 138833 )

      Who's to say that your friendly ISP or government agency isn't doing the same? Or even better yet, how about for OS updates.

      Your OS should already check binaries before installation; This is done with digital signatures (i.e. GPG and such) so HTTPS isn't required for protection.

      The threat TFA is about is when the user/admin uses an installation method that circumvents or ignores the signature check.

      In the Linux realm most popular distros are reasonably secure, but I noticed that Fedora's signature regime is incomplete and so is open to a MITM attack where any number of packages can be selectively prevented from receiving securit

    • I would bet good money that the NSA is behind the exit node talked about in the article.
  • Does the malware run under Linux? Unless they're able to infect Linux software, I really don't care because that's all I run.
    • by Anonymous Coward

      If you are downloading binaries through tor and not doing any sort of signature verification on it then exactly the same thing can happen on any platform, it doesn't matter that this specific malicious exit was targeting windows executables.

      • It's very rare, now, that you download binaries and run them on Linux to install something. Most of the time, what you get is an rpm, a deb or whatever the equivalent is for your distro. Adding malware to such a package without making it uninstallable is not as easy as it is with a Windows executable. I won't say it can't be done, because I'm sure that it can, but I will say it's more work especially as the exact technique depends on what type of package you're working with. And, of course, that gets ev
  • by Animats ( 122034 ) on Friday October 24, 2014 @01:47PM (#48223745) Homepage

    Cloudflare offers a fake SSL service called "Flexible SSL". [cloudflare.com] Cloudfront gets a cert generated with a long list of domains. Users connect to Cloudfront, Cloudflare sets up a secure connection from the user's browser to Cloudflare, acts as a man-in-the-middle, and makes an unencrypted connection to the destination host.

    And, of course, there's an exploit for this. [bh.ht.vc]

    Even if you buy Cloudflare'ss "most secure" option, and have SSL to your own server using your own certificate, you have to give Clouldflare your SSL cert's private keys. Does Clouldflare take responsiblity for the security of your private keys? No. [cloudflare.com]

    So do not use Cloudflare for sites which handle any valuable data, such as credit card numbers.

    • by Guspaz ( 556486 )

      What does Cloudflare have to do with this article? Besides, Cloudflare does not require your private key if you use their "Keyless SSL" service,

      • by Animats ( 122034 )

        This attack on binaries requires a MITM attack. The attacker must be in a position to intercept and modify the data. SSL only prevents that if it's end to end SSL. Using SSL over Cloudflare doesn't eliminate the possibility of an attack on binaries, because Cloudflare is a MITM itself. The exit from Cloudflare is vulnerable in exactly the way the exit from Tor is.

        • by Guspaz ( 556486 )

          Unless you're using SSL settings that CloudFlare themselves caution is "less secure", the data is encrypted between the client and CloudFlare, and it's encrypted between CloudFlare and the origin server. There is no opportunity for a third party to modify the data, and the attack that you've described won't work.

    • Yeah, but cloudflare is fair enough and warns TOR users with "Attention required"! :-)

    • by gweihir ( 88907 )

      There is no cloud service provider that is approved for handling credit card information at this time. That is not an accident.

      • by hawguy ( 1600213 )

        There is no cloud service provider that is approved for handling credit card information at this time. That is not an accident.

        It's not clear which flavor of "cloud" you're referring to.

        If you mean IaaS, Amazon AWS is PCI certified:

        https://aws.amazon.com/complia... [amazon.com]

        If you mean PaaS, WIndows Azure is certified:

        http://azure.microsoft.com/blo... [microsoft.com]

        If you mean SaaS, Stripe is certified:

        https://stripe.com/help/securi... [stripe.com]

        Of course, even if the service provider is certified, it's up to the customer to ensure that their own implementation is compliant - the service provider certification is just one checkmark in the requirements.

        • by gweihir ( 88907 )

          So they have managed that now? A pity. I wonder how much pressure was applied and how much money paid to get that.

          • by hawguy ( 1600213 )

            So they have managed that now? A pity. I wonder how much pressure was applied and how much money paid to get that.

            If by "now", you mean 4 years ago, yeah, AWS managed it.

            https://aws.amazon.com/blogs/a... [amazon.com]

            I doubt it took any pressure from any single vendor since lacking PCI certification locked them out of a lot of potential customers.

            Why do you say it's a pity? Is having security controls and processes validated by a third party auditor somehow a bad thing? Regardless of what you think of the PCI DSS, having an auditor validate security sounds like a good thing.

            • by gweihir ( 88907 )

              It is a pity, because there is no way to give these services a PCI compliance and stay honest. It is just not possible to actually reach the required security-level.

    • by pavon ( 30274 )

      While that is good information in general, SSL would help in this particular attack, as it would still block the Tor exit node from seeing the data.

    • Even if you buy Cloudflare'ss "most secure" option, and have SSL to your own server using your own certificate, you have to give Clouldflare your SSL cert's private keys.

      If you need the sort of service cloudflare provides, it wont matter who your actual provider is. ANYONE acting as a proxy for your HTTPS site will require your private key.

  • Digital signatures is exactly the technology that solves this problem. If you download binaries from the internet (especially if you have need to use Tor to get them!), check the signatures!

    Now, it may be possible to also dynamically patch the signatures when these are downloaded -- but that requires much greater control since signatures can be obtained separately, and since Tor can mitigate the problem by routing different downloads through different exit notes.

    • by gweihir ( 88907 )

      No, signatures cannot be "patched". The only way to do that is to have the original signature key available. Really, maybe acquire a bit of knowledge before coming up with BS scenarios?

      • by l2718 ( 514756 )

        I you really let me sit between you and the source of the download, I can mess with your download of the public key, and therefore replace signatures.

        In other words, OS updates cannot be attacked this way (presumably OS vendor's the public key is included in the installation). But if you patch my download from www.example.com, you can also patch my download when I get the public key used by www.example.com to sign downloads.

        • by sinij ( 911942 )

          Yes and no.
           
          You could substitute hash, but if it is actually public-key signed then you'd have less luck. Your substitution would not originate from example.com OR would not belong to the same root CA.

          • by gweihir ( 88907 )

            A hash is not a "signature". It is very important to remember that. A hash is a hash.

            • Minor nit-pick: A hash is not a hash. I'm sure you are aware, but just for clarity -- Cryptographic hashes are intended to make it very hard to modify the binary stream without changing the hash. Not all hashes have that property. If you know what the cryptographic hash is supposed to be (you trust the hash) then you can be confident the stream has not been modified if the hashes match (ignoring known weaknesses, e.g. in MD5.)
              • by gweihir ( 88907 )

                Really, anybody talking crypto and not meaning a "crypto hash" when saying "hash" has no clue at all. You know, there are also non-cryptographic "ciphers" and even "signatures" that have nothing to do with crypto. Yet when talking crypto, the prefix is implicitly assumed.

                But while we nit-pick, crypto-hashes also need some more properties in order to be secure (and insecure crypto-hash can of course drop all these, so to be exact, we would always need to say "secure crypto-hash"...;-), for example collision

                • Point taken -- thanks for the clarification. There are a few comments in this thread that seem to be saying that you can't trust that something hasn't been altered, even when the hash matches, but it's hard to tell what they're saying.
                  • by gweihir ( 88907 )

                    I fully agree on that.

                  • by sinij ( 911942 )
                    To clarify:

                    Scenario A: MitM insert malware into download of Foo installer. If your only defense is to manually check published hash, and website where published hash is displayed is not protected, what would prevent MitM attacker from also altering published hash that you see? Convoluted attack, but feasible.

                    Scenario B: Now, if you use public-key signature to sign Foo installer it becomes much harder to compromise. MitM attacker could alter your download, and sign it with their own signature, but unless t
        • by gweihir ( 88907 )

          Yes, once. And you may need to create a whole fake history. For example, I downloaded the Linux kernel signing key a long time ago. Unless all my downloads since then have been tampered with, it is good. Sure, if you just only ever download the public part of the signature key together with the binary and never bother to check any signatures on that key, you are screwed. But if you even bother to find out a bit about how PGP signatures work, then they work pretty well.

  • And get nailed by a fake cert? How does this sidestep the trust issue?

    • by Anonymous Coward

      Much harder to obtain a fake cert than tweak a HTTP stream. They'd need a compromised CA trusted by the majority of the Tor users.

  • by Anonymous Coward

    I thought the general consensus by now was that Tor is essentially a honeypot for the NSA & FBI...

  • The only thing that really works is verifying PGP signatures. SSL is broken and the Tor node may well have legitimate certificates at its disposal.

    • by Burz ( 138833 )

      The only thing that really works is verifying PGP signatures. SSL is broken and the Tor node may well have legitimate certificates at its disposal.

      Actually, its HTTPS and its use of PKI (many unaccountable CAs) that is broken.

  • by Anonymous Coward

    Is there any wonder why when I use Tor I always compare files with that obtained via a VPN or at another site to see if they match, I have been doing this long before digital signed executables came on the scene.

  • by qubezz ( 520511 ) on Friday October 24, 2014 @03:19PM (#48224783)

    There have been several reports of Bitcoin users that use online wallets and exchanges, even over https, getting MITM attacked when using Tor. They visit the wallet site, get bad certificates but continue anyway, and poof, their Bitcoins in the service are gone and their passwords are known by the attacker. With recent SSL vulnerabilities or clever redirection, the cert errors could be avoided also. For other sites, users can be piped through a "universal phisher" to steal any credentials.

    Clearly Tor users are under attack by exit nodes, many of them running automated tools against many web destinations.

  • by MartinG ( 52587 ) on Friday October 24, 2014 @03:54PM (#48225113) Homepage Journal

    Tor provides anonymity. It does not provide authenticity or secrecy, and doesn't pretend to. If you want those things, you should use something else in addition to tor. For example, TLS or SSH might suit your needs.

    • Tor provides anonymity. It does not provide authenticity or secrecy, and doesn't pretend to.

      Not only it doesn't provide these things, it potentially cripples then by adding a random computer as a Man In The Middle! What did you guys expect?

      Also, seeing that people who usually perform activities of this type (spreading malware) should be the ones most interested in TOR, I see some signs as to the kind of organizations who would attempt to do this...

  • Comment removed based on user account deletion

As you will see, I told them, in no uncertain terms, to see Figure one. -- Dave "First Strike" Pare

Working...