![]() |
Java Server
I'm thinking about making a Java server for a series of clients to conect to. All that it is suppose to do is relay the incoming strings to the other clients. It was brought to my attention that it can be hacked and who knows what else can happen afterwords. Is running this server a hackers dream or an overstatement?
|
Um... It depends entirely how you go about implementing it.
The only things I can think of that would make this insecure is whether you need to keep track of who is sending which string, and whether you care that the strings could be intercepted. Both of these problems can be solved relatively easily. |
I don't intend to keep track of anything and the strings aren't sensitive, it just allows connection with the proper password, and sends whatever other strings comes it way to the other clients.
It was also brought to my attention that allowing the server through the firewall leaves my computer vulnerable through the port it uses because it's exposed/open. Is that true? |
Quote:
Quote:
I'll give you an example of a potential vulnerability that a program could have, just so you have some idea of what makes a system vulnerable to attack. Let's say you've made a file server, which people can use to download files off you. You probably don't want to give them access to your entire hard drive, so you limit them to a single directory, like so: :
String filenameUserRequested = getFilenameFromUser();At first glance, this may look okay. But what if someone requests a file called "..\\My Private Folder\\My_bank_account_password.txt". The ".." at the beginning will cause the operating system to skip up a folder, so: :
C:\My Shared Folder\..\My Private Folder\My_bank_account_password.txt:
C:\My Private Folder\My_bank_account_password.txtBut there's nothing magical about how the attacker broke in. All the attacker can do is to try and trick your server with strange inputs. A key rule of computer security is to always check your user's data thoroughly. This may sound simple, but it's one of the prime causes of computer vulnerabilities. Again, I should emphasis that hackers aren't magicians; they break into servers by capitalizing on your mistakes. However, your system is simple, and you don't appear to need to let the users access files on the hard drives or anything like that. This vastly reduces the points at which a malicious user might gain entry. The more features a server has, the more points where mistakes can be made, and more points where vulnerabilities could potentially show. However, assuming you also use some encryption to guard your, it's safe to say that it shouldn't be too hard to make your server more-or-less utterly impregnable. |
Ah, I see. Thank you! That defiantly cleared up a lot of confusion.
|
| All times are GMT -5. The time now is 1:48 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC