JDownloader Community - Appwork GmbH
 

Go Back   JDownloader Community - Appwork GmbH > International Support > JDownloader 2
Reply
 
Thread Tools Display Modes
  #1  
Old 08.01.2015, 23:42
mikebell mikebell is offline
JD Adviser
 
Join Date: Oct 2009
Posts: 104
Default JD2 updates are sent over plain HTTP, easy to MITM and exploit

Guys,

Are there any plans of switching to HTTP+TLS connections for updates anytime soon? Just looking at the wire, I see that JD2 still uses HTTP which is trivial to intercept and send malicious code to.

Code:
17:36:00	http://update.appwork.org/jcgi/pkg?rt=SO&jn=JDownloader.jar&pv=1&uid=[uid]&pkh=[pkh]&app=JD&os=MAC&arch=X86&os64=1&jvm64=1&urev=4731&ct=Normal&dst=-1&rev=4723&awfcxz=1&eid=translator%2Cscheduler%2Cchat%2Cfolderwatch&eir=&eip=&lng=en&chlg=0&jdiff=1&1420756559855	GET
17:36:07	http://update.appwork.org/jcgi/pkg?rt=SO&jn=JDownloader.jar	HEAD
17:36:08	http://update.appwork.org/jcgi/pkg?rt=SO&jn=JDownloader.jar	GET
Sending updates over TLS with a pinned certificate would go a long way in assuring JD2 is safe to use.

Unless you're running JD2 inside of a VM, I'd be careful about hitting that Update button or having updates turned on automatically.
Reply With Quote
  #2  
Old 08.01.2015, 23:53
mikebell mikebell is offline
JD Adviser
 
Join Date: Oct 2009
Posts: 104
Default

Another security issue with JD2 is that NONE of the jar files are signed.

I checked a bunch of them and not even the core.jar is signed.

Code:
Core.jar
jar is unsigned. (signatures missing or not parable)
JDownloader.jar
jar is unsigned. (signatures missing or not parsable)
Given that none of the jar files are signed and given that updates are served over plain HTTP, JD2 is potentially unsafe to use and a big security risk that cannot be easily mitigated.

Suggestions:

1) start signing JAR files. start signing updates and install them only when they've been verified.

2) serve updates over TLS and pin a cert within the app itself and only accept updates from servers that match signatures.

Right now, there is absolutely no way to tell whether the JD2 has been compromised or not.
Reply With Quote
  #3  
Old 09.01.2015, 00:15
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,120
Default

Hi
Please send all of this to support@jdownloader.org.

GreeZ psp
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #4  
Old 09.01.2015, 03:48
mikebell mikebell is offline
JD Adviser
 
Join Date: Oct 2009
Posts: 104
Default

Quote:
Originally Posted by pspzockerscene View Post
Hi
Please send all of this to support@jdownloader.org.

GreeZ psp

Sent!

best, mike
Reply With Quote
  #5  
Old 09.01.2015, 14:01
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,614
Default

Jiaz did answer via email, but the gist is...
- protocol type has very little to do with been secure with this update system.
- updates are signed by the update system and checks are in place.

At worse when goes to install and the signs do not match, updates will not install. It can't be high jacked along the lines of OP posts.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]

Last edited by raztoki; 09.01.2015 at 14:03.
Reply With Quote
  #6  
Old 09.01.2015, 15:19
nichtvorhanden
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by raztoki View Post
Jiaz did answer via email, but the gist is...
- protocol type has very little to do with been secure with this update system.
- updates are signed by the update system and checks are in place.

At worse when goes to install and the signs do not match, updates will not install. It can't be high jacked along the lines of OP posts.
I can change anything in your data connection without secure connection like https. Example like other jdownloader.jar as website download. All other options are nice but not secure enough, maybe. More informations under ssllabs.com

FAIL1:
**External links are only visible to Support Staff**
**External links are only visible to Support Staff**
Result: No https connection (no secure connection)

FAIL2:
**External links are only visible to Support Staff****External links are only visible to Support Staff**
Result: No https connection (no secure connection)

FAIL3:
**External links are only visible to Support Staff****External links are only visible to Support Staff**
Result: No https connection (no secure connection)

Any question? No? Okay! I replace all jar files in the http connection with my evil jar files. Please use ALL ways to secure the updates and websites, THANKS!
Reply With Quote
  #7  
Old 09.01.2015, 15:34
Lram32's Avatar
Lram32 Lram32 is offline
Spanish Supporter
 
Join Date: Jul 2012
Location: Dark side of the moon
Posts: 9,905
Default

Please contact jiaz via EMail support@jdownloader.org
Then wait for his answer.
__________________
» Setup JD2 / Instalador de JD2 «
Spoiler:

Installer for Windows XP/Vista/Seven/Eight
|| JD2 x86 - x64 (Beta) ||

Installer for Mac
|| JD2 (Beta) ||

Installers for Linux
|| JD2 (Beta) x86 || <---> || JD2 (Beta) x64 ||

How to Create a Log
-» Click Here «-


¿Cómo crear un registro?
-» Click Aquí «-


Support Chat / Chat de Soporte
-» Click Here / Click Aquí «-


Reply With Quote
  #8  
Old 09.01.2015, 15:36
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,614
Default

How exactly are you going to replace jars without already having the client side compromised or the update server compromised?

or are you referring to installers themselves? Either way you would need to be control of transit (which could include your ISP) todo so such damage, unless I'm mistaken?.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #9  
Old 09.01.2015, 16:26
aeneon
Guest
 
Posts: n/a
Default

@mikebell
Why the hell are you posting this in public ? Everybody can read in here. You don´t even have to be registered.

My opinion: Mike isn´t wrong. HTTP isn´t the way to go. Evil people will find a way.
Reply With Quote
  #10  
Old 09.01.2015, 16:32
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,120
Default

@aeneon
As you can see until now he was not able to really tell us something we'd have to be afraid of - also our devs know about the "issue".

GreeZ psp
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #11  
Old 10.01.2015, 23:39
mikebell mikebell is offline
JD Adviser
 
Join Date: Oct 2009
Posts: 104
Default

Quote:
Originally Posted by raztoki View Post
Jiaz did answer via email, but the gist is...
- protocol type has very little to do with been secure with this update system.
- updates are signed by the update system and checks are in place.

At worse when goes to install and the signs do not match, updates will not install. It can't be high jacked along the lines of OP posts.
Hi,

Got a quick email from Jiaz. I won't go into too many details (to give bad guys even more clues but none of this is really advanced or intermediate... this stuff is basic as it comes) but your first assumption is wrong. Secure protocol is the #1 line of defense against an attack on any system.

I did not see any cryptographically signed updates. None of the updates served are recognized by Java6/7/8 verification checks.

Test it yourself:

Code:
jarsigner -verify /Applications/jDownloader.app/Contents/java/app/JDownloader.jar
Rolling out your own crypto signature system is a recipe for disaster and can always be bypassed since JVM is the only trusted part of the system and the only entity that can authenticate signature without being tricked into validating fake certs or other schemes.

Quote:
Originally Posted by raztoki View Post
How exactly are you going to replace jars without already having the client side compromised or the update server compromised?

or are you referring to installers themselves? Either way you would need to be control of transit (which could include your ISP) todo so such damage, unless I'm mistaken?.
You need to learn about MITM.
https://en.wikipedia.org/wiki/Man-in-the-middle_attack

Anyway, hope the changes in the future fix these two issues. Until then, I recommend people run JD/JD2 only within a VM since there are always java 0-days for privilege escalation available on black markets. You simply don't know if an update one day will include it as a payload. And JD2 update conveniently includes the OS, arch type, Java version etc so proper payload targeting is trivial.

Last edited by mikebell; 10.01.2015 at 23:48.
Reply With Quote
  #12  
Old 11.01.2015, 10:14
aeneon
Guest
 
Posts: n/a
Default

Solution: HTTPS and let JD/JD 2 validate that the TLS web server is authentic. (Certificate)

Sadly it costs money and JD 2 is freeware. I don´t know if appwork earns enough money with JD to pay for a CA and more.

Maybe we (the JD community) could donate somehow. Fundme ? I would donate a few bucks.
Reply With Quote
  #13  
Old 14.01.2015, 02:51
mikebell mikebell is offline
JD Adviser
 
Join Date: Oct 2009
Posts: 104
Default

Quote:
Originally Posted by aeneon View Post
Solution: HTTPS and let JD/JD 2 validate that the TLS web server is authentic. (Certificate)

Sadly it costs money and JD 2 is freeware. I don´t know if appwork earns enough money with JD to pay for a CA and more.

Maybe we (the JD community) could donate somehow. Fundme ? I would donate a few bucks.

You can get a cert for as little as $8/year.

In JD2's case, they could use self-signed certs since they're not going to be exposed to browsers so whether the cert is recognized by browsers is irrelevant.

However, CA-recognized cert is better for code signing.

**External links are only visible to Support Staff****External links are only visible to Support Staff**

App can easily check if the cert is valid, expired and whether it has been revoked.
Reply With Quote
  #14  
Old 14.01.2015, 03:42
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,120
Default

Are you serious?
So all of the sudden this is a major security issue?
I'll stay out of this conversation but please don't make our users paranoid.

GreeZ psp
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #15  
Old 14.01.2015, 08:52
aeneon
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by mikebell View Post
You can get a cert for as little as $8/year.

However, CA-recognized cert is better for code signing.

App can easily check if the cert is valid, expired and whether it has been revoked.
That´s what i said. Regarding the 8 Dollars.... You`ll also need the hardware, bandwidth, administrator, coder to implement this stuff into JD 2. It´s not just 8 Dollars.

Quote:
Originally Posted by pspzockerscene View Post
Are you serious?
So all of the sudden this is a major security issue?
I'll stay out of this conversation but please don't make our users paranoid.

GreeZ psp
Ok But as a network administrator i have the rule: Better safe than sorry.
The CA and Cert-Solution would make it much harder to "compromise".

I´m also out of this conversation. That´s all i had to say.
Isch habe fertisch haha
Reply With Quote
  #16  
Old 14.01.2015, 08:59
coalado's Avatar
coalado coalado is offline
JD Manager
 
Join Date: Feb 2009
Posts: 1,980
Default

Ok. Time to make this clear.

First of all: IF you find a security problem, contact the responsibles first in private, and give them a chance to fix it. If they don't do it, think about going public. If someone finds your door open, you'd probably prefer to get notified in private instead of reading about it in the newspaper. Anyway....there is no open door in the Update System, so we can continue to discuss this in public.

1) We do not use Jar signing, because this would not help us in any way. This would not improve security


2) How the Updates work.

The Update System uses a private/public key pair. The private Key is secret, the public key is known by the update server and all clients.
Here is the deploy process:
  1. A Build/Deploy Server builds JD and does Tests on it. It's important to note, that the Build, Test and Sign Processes are not accessible from the www.
  2. The Build/Deploy Server sends the new binaries to our Deploy Process
  3. The Deploy Process uses the private key to create a signature of every file (all files and update instructions) This signature contains the version of the file.
  4. The Deploy Process pushes files and signatures to our Update Server
  5. The Update Server validates all signatures and accepts the new version
  6. Done

When a Client requests an Update.. this happens:
  1. JDownloader sends it's current version to the Update Server
  2. The Update Server creates a package for him (incremental Updates)
  3. This package contains all changed files and instructions AND their signatures
  4. The Package gets encrypted with the public key, and spread to all update content distribution servers
  5. The Update Server returns all references (urls) to the client.
  6. The Client Downloads the package, and extracts it (public key)
  7. The Client validates all signatures (public key) and continues only if the signatures match
  8. If one or more signatures fail, The update will not get installed!


Think about this process, and you will see that this is MUCH stronger than any tls or ssl can ever be. Even of an attacker could control one of our update servers, he could - in the worst case - cut the users from getting updates. He could not distribute any data - the private key is missing.

A Man-In-The-Middle could modify packages - if he knows the public key, but during installation, the signature validation would fail, and the update will get rejected.

This is why, there is no reason for any additional man-in-the-middle protection.
__________________

Last edited by coalado; 14.01.2015 at 09:04.
Reply With Quote
  #17  
Old 14.01.2015, 09:27
aeneon
Guest
 
Posts: n/a
Default

Thanks for clearing this up. It sounds really secure. No offense coalado, but i don´t know if it´s a good idea to post the whole process in public.

Last edited by coalado; 14.01.2015 at 11:11.
Reply With Quote
  #18  
Old 14.01.2015, 11:11
coalado's Avatar
coalado coalado is offline
JD Manager
 
Join Date: Feb 2009
Posts: 1,980
Default

Quote:
Originally Posted by aeneon View Post
Thanks for clearing this up. It sounds really secure. No offense coalado, but i don´t know if it´s a good idea to post the whole process in public.

This System has to be secure by design, and not by obscurity. A public discussion can help us to make it even better.
__________________
Reply With Quote
  #19  
Old 14.01.2015, 12:51
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,614
Default

As I said earlier, its secure! Which I did allude too. Hopefully this helps those in this thread that thread think they know better, without knowing the facts. I was hoping that Jiaz cleared that up in email, but maybe not.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #20  
Old 14.01.2015, 15:11
aeneon
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by raztoki View Post
As I said earlier, its secure! Which I did allude too. Hopefully this helps those in this thread that thread think they know better, without knowing the facts. I was hoping that Jiaz cleared that up in email, but maybe not.
We care and we wanna make it better. This is why Mikebell posted here. This is no competition about who is right or wrong. And if you really think,"it´s secure", you are wrong. Nothing in the IT-Field is 100% secure. There are always flaws and bugs and whatsoever.

There are always people that will game the system and use it for their advantage. Never underestimate people und their abilities. And never overestimate your own system.

Trust me. I know what i´m talking about. Especially in the IT-Field.
Reply With Quote
  #21  
Old 14.01.2015, 15:53
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,120
Default

@aeneon
No one said it's 100% and anyone who'd have said this was wrong!
If you have the knowledge, go on and "hack" it - as long as you tell coalado first its all fine.

GreeZ psp
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #22  
Old 14.01.2015, 22:49
aeneon
Guest
 
Posts: n/a
Default

I´m not a hacker.

But..... your server seems pretty tight and secure. Nice work. Checked just a few small things in less than 2 minutes. Don´t worry.

I don´t know if my information is correct. If you are still using nginx 1.5.6, i would update. If i would try to hack your server, i would probably try to exploit svnserve on port 3690 first.
Reply With Quote
  #23  
Old 15.01.2015, 03:01
speedery
Guest
 
Posts: n/a
Default

good discussion ... and thanks for this great app jdownloader .
Reply With Quote
  #24  
Old 15.01.2015, 10:54
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,563
Default

@aeneon: you can contact me at support@jdownloader.org (in case you want to talk about this or find some security issue)
-nginx are all up2date (depends on used distro version)
-lighttpd are all up2date (depends on used distro version)
-svn is newest available version, so I hope not exploitable
-many services run in their own vm
-still working on server migration so many older distro will be gone soon
__________________
JD-Dev & Server-Admin
Reply With Quote
  #25  
Old 15.01.2015, 11:09
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,614
Default

@aeneon
My statement wasn't directed at anyone in particular, just those that didn't believe that the update system wasn't designed with security in mind. I also never stated it was 100% secure, other than it was secure (to the best of our knowledge). Without any proof of concept or disclosure to prove otherwise, we still believe its safe. Hopefully now the users (many with worry/uncertainty) in this thread, now have some understanding of how the update system was designed/works (in the real world) without the need to make assumptions. I also have IT based background and I comprehend that even with the best intent, hardware and software can be used outside architects/programmers parameters.

raztoki
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #26  
Old 15.01.2015, 12:57
aeneon
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Jiaz View Post
@aeneon: you can contact me at support@jdownloader.org (in case you want to talk about this or find some security issue)
-nginx are all up2date (depends on used distro version)
-lighttpd are all up2date (depends on used distro version)
-svn is newest available version, so I hope not exploitable
-many services run in their own vm
-still working on server migration so many older distro will be gone soon
I will Great work you are doing there!

Quote:
Originally Posted by raztoki View Post
@aeneon
My statement wasn't directed at anyone in particular, just those that didn't believe that the update system wasn't designed with security in mind. I also never stated it was 100% secure, other than it was secure (to the best of our knowledge). Without any proof of concept or disclosure to prove otherwise, we still believe its safe. Hopefully now the users (many with worry/uncertainty) in this thread, now have some understanding of how the update system was designed/works (in the real world) without the need to make assumptions. I also have IT based background and I comprehend that even with the best intent, hardware and software can be used outside architects/programmers parameters.

raztoki
Right now i think it´s safe too. It´s all good
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 16:15.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.