Is it possible for a Java JAR file to damage your system and how can you check what it's doing?

Benton picture Benton · Jan 23, 2011 · Viewed 19.7k times · Source

I want to evaluate a software solution where multiple people have submitted JAR files to perform a task on Windows.

Is it possible to check whether the JAR file performs any additional unwanted behaviors besides those it claims to perform on your machine?

Answer

nrobey picture nrobey · Jan 23, 2011

First, you can use a JVM set with SecurityManager to do run your application in a way that it can have limited access to sensitive functions.

You can also set up a "sandbox" so the jar cannot have permissions outside of the sandbox... you could use chroot or a similar tool in a linux/unix environment.