5

First off, before I ask, i would like to point out that this question is for education. I want to know to expand my understanding of Java and network security (what little there is).

How could you use Java for network security and counter attacks? I have been using server/sockets for a while now (for non system security stuffs), but I don't quite understand what I'm doing. Naturally, I should learn up on networking, but where to start? There is a protocol for everything, heck there are protocols to have protocols. To further expand, how could you use Java to say, port sniff, catch packets or kill/open a port remotely?

I guess to phrase the question more adequately; does anyone know of any good sources that I could look at to get a more in depth look/study of how Java handles network security and counter hacking and malware containment?

2 Answers 2

5

I think the best thing to do would be to learn concepts, then worry about using Java to implement the concepts later on. There are some gaps in your understanding (for example, I don't even know what "open a port remotely" might mean) and the best thing to do would be to solidify your understanding of how networks work first.

I don't really have a list of network security texts I can recommend -- probably someone else will! -- but IMHO it might not hurt to start with a classic like Steven's "UNIX Network Programming" to shore up the fundamentals, if you can find a copy.

Sign up to request clarification or add additional context in comments.

Comments

2

how could you use java to say, port sniff, catch packets or kill/open a port remotely?

You can't use Java to sniff ports.

You can't use Java to catch packets.

You can't use Java to kill/open a port remotely.

how Java handles network security and counter hacking and malware containment?

Java doesn't handle network security other than internally for its own applications via the security sandbox.

Java doesn't handle counter hacking.

Java doesn't handle malware containment other than internally for its own applications via the security sandbox and bytecode verifier.

One of those things above can be done via an add-on to Java, but basically Java isn't the correct tool for this job.

4 Comments

Uh, to make more clear: Is it strictly c/c++ that can do these things? Is there another language you recommend that I should look into?
I think a few of these are a little too strong. You certainly can do port sniffing with Java, and jnetpcap, a very popular wrapper for the native libpcap lets you do all sorts of low-level packet-capture-based activities. If by "counter hacking" we mean launching DDOS attacks, or SQL injection attacks or other website intrusion attacks, there's no reason why you couldn't do those things in Java. Stuff that deals with actual viruses, or binary code injection of various kinds, on the other hand, you definitely can't do with Java.
@Ernest Friedman-Hill: Re port sniffing, no. You can only do conventional socket I/O in Java. You can't sniff someone else's ports. Port scanning, yes, but he didn't ask about that. Re packet capture, yes, I did mention an add-on. "Counter hacking" doesn't mean "hacking", it means countering it.
@AedonEtLIRA: it is strictly C, C++ and any other language that can talk directly to the native OS API, plus, in most of the cases you've mentioned, a device driver inserted into the TCP/IP protocol stack. Some of it can be done via libpcap or its Windows version winpcap.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.