A
Andreas Leitgeb
Before I run foreign java-programs on my machine, I generally
like to know what they *can* do. Assuming there are no
dll's involved (otherwise I wouldn't idly run the program,
anyway)
So I scan the constant pools of all classes(*). I'd expect that
any platform method call would have to appear there, so if nothing
suspicious (especially no references to ClassLoader.defineClass
and reflection-stuff) is found in the constant pools, are there
other tricks left that I'd need to check for possibly dangerous
API calls?
Are there any harmless looking(**) methods that would make it
possible to get new classes defined, or methods called through
dynamic strings?
I'm aware of SecurityManagers, but I don't trust my skills
to set one up for my demands without leaving too much open.
This is about "proglets" I download from web for offline
execution, with not exactly the same set of restrictions
as applets (some more some less). Any such proglet that
tries to call inappropriate stuff or open door to dynamic
code execution I'd throw away rather then let run.
(*): As written out by javap with appropriate options (-c,-verbose)
(**): to a pair of scjp-level eyes ;-)
like to know what they *can* do. Assuming there are no
dll's involved (otherwise I wouldn't idly run the program,
anyway)
So I scan the constant pools of all classes(*). I'd expect that
any platform method call would have to appear there, so if nothing
suspicious (especially no references to ClassLoader.defineClass
and reflection-stuff) is found in the constant pools, are there
other tricks left that I'd need to check for possibly dangerous
API calls?
Are there any harmless looking(**) methods that would make it
possible to get new classes defined, or methods called through
dynamic strings?
I'm aware of SecurityManagers, but I don't trust my skills
to set one up for my demands without leaving too much open.
This is about "proglets" I download from web for offline
execution, with not exactly the same set of restrictions
as applets (some more some less). Any such proglet that
tries to call inappropriate stuff or open door to dynamic
code execution I'd throw away rather then let run.
(*): As written out by javap with appropriate options (-c,-verbose)
(**): to a pair of scjp-level eyes ;-)