473,513 Members | 2,513 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Java Server Client application Signing the client jar

micmast
144 New Member
Hello,

I'm doing some research in to Java security, and I have a question. In my line of work I find from time to time client applications written in java (so a .jar) that connects to a server, but the server will not work with a manipulated .jar. Now my question is, how does that work? After reading on the net I found that it is possible to sign a jar file with either a key or a certificate (maybe others), but nothing about how this would be checked from the serverside of the architecture.

Could somebody give me some pointers as to how it works or where I could find information?

Thx
Nov 27 '09 #1
10 3032
Frinavale
9,735 Recognized Expert Moderator Expert
Not sure what type of application you are implementing but it seems as simple as checking a hash code...if the hash code doesn't match then the jar has been modified.

Signing works along these lines.

-Frinny
Dec 2 '09 #2
micmast
144 New Member
Does that mean that their is not a general function in place in the Java console (the sandbox) that would allow to check the .jar independently. I'm talking from a security point of view, so if the jar is responsible for it's own signing, it would just be an open lock on a door?
Dec 2 '09 #3
Frinavale
9,735 Recognized Expert Moderator Expert
I'm so sorry but I'm actually not a Java expert.
I am familiar with signing code because I use signing quite a bit...
I hope that a Java expert can jump in and help you further.

I wouldn't think that the jar is responsible for it's own signing.

I would think that your server application would store the signature/hash that it creates for the jar files based on what is in the jar...when the jar is submitted to the server later it would check to see that the signature/hash is valid to ensure that it isn't working with a modified jar file.

You might be right. There could be a Java Specific tool available to you that does this without having to rely on your code/application to do it. In fact I would be surprised if there isn't such a feature.

I still don't understand how your server is using the jar files or what your application does.

Again, I'm sorry but I'm not a Java expert...I can only help you from a conceptual point of view.

-Frinny
Dec 2 '09 #4
micmast
144 New Member
The server-client application that I'm talking about is a bit as follows:

a client has to download a java jar file that will act as a client for the application. the client will use it to enter data, modify things, login,... but the result is checked & verified by the server. but there should be some security measure in place that would prevent a malicious user from modifying the client jar file.

Already big thanks Frinavale for your input, you have helped me a lot already.
Dec 2 '09 #5
Frinavale
9,735 Recognized Expert Moderator Expert
What exactly is sent to the server?
The jar file itself? Or is it some output that is the result of some calculations/operations that the client application does?

-Frinny
Dec 3 '09 #6
micmast
144 New Member
the result of some calculation, credentials,...
Dec 3 '09 #7
Frinavale
9,735 Recognized Expert Moderator Expert
Wouldn't this mean that you need to validate the result, not the jar file?


-Frinny
Dec 3 '09 #8
micmast
144 New Member
that is one part of the security model, but how could you prevent a malicious attacker from modifying the content of the jar. This is under the assumption that the JAR file contains some data that will not be checked by the server and is excepted as is.
Dec 3 '09 #9
Frinavale
9,735 Recognized Expert Moderator Expert
I don't think there is any way to prevent someone from un-jaring your jar file and modifying the code.

Signing the jar file certainly won't help with this.

The first thing that came to my mind would be to sign the jar file and then have the client application re-hash the currently used jar and send that signature to the server to verify the signature of the jar used to produce the output.

BUT my immediate next thought was: the malicious user would simply modify your code to have it create a hash based on your original jar....

I can't see how signing is going to help at all.

You could try taking a look at what Sun has to say on Java Security technologies.


I would recommend looking at the security design for the system as a whole.

You said that this is a server/client application....

Why not move all "sensitive" methods to the server side and leave the client side stripped of anything that could potentially leave a security hole in it.

For example, if your application requires that the user authenticates against something move this functionality to the server. Don't leave this up to the client since the client could potentially be modified to get around this authentication.

And Always do validation on the server....that's just one of those rules that has to be implemented in order to develop a secure application.

-Frinny
Dec 3 '09 #10
micmast
144 New Member
I agree with your recommendations Frinny. But like I said, I have seen companies that used this method. I would never ever attempt to do it like this, I believe that a client by default is malicious so all checks should be done on the serverside.

Thanks a lot Frinny
Dec 3 '09 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2690
by: Dominique | last post by:
I am trying to communicate to a prolog server from a java client, however even though the connection is successfully made every time I try to perform QueryExecute I get an error, either Socket...
5
13634
by: Rowland | last post by:
Hi, I know this question has prob. been asked a million times, but I couldn't find it in the FAQ, so here goes : I'm trying to write a Java applet to call a dll that resides on the web server...
3
5988
by: Robert Bralic | last post by:
Hello, I writed small graphical editor for probabilystic networks in JAVA, but there was problem with making save file inJAVA. I thinked about it and I concluded that Save in JAVA is great...
11
9213
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
0
2758
by: netgeni59 | last post by:
Hello fellow C# friends, I am trying to write a C# TCP client that was formerly written in Java. The server must still remain in Java. I cannot get text data from the C# client to be received...
0
5218
by: Tomek | last post by:
Welcome. I`m trying to prepere some project that shows how to use Corba technology i heterogenic systems.I`d like to create CORBA server with Borland Delphi (or C#.NET) and few client...
2
6928
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
0
7260
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7161
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7539
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7101
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7525
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5089
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3234
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3222
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1596
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.