java - What are the dangers of bytecode manipulation (if any)? -
bytecode enhancement seems interesting java technique, has feel of bit of "black magic" it. there disadvantages using (other fact functionality added classes not apparent source code)?
does cause problems security, serialization, etc.?
are there disadvantages using (other fact functionality added classes not apparent source code)?
one thing bugs created bytecode manipulation more difficult diagnose. examination of source code, , source level debugging harder.
does cause problems security,
the verifier should (in theory) prevent modified bytecode breaking core type system , corrupting jvm. (and goes without saying untrusted code shouldn't allowed bytecode modification, can discount scenario.) however, in past, java byte code verifiers have been less thorough.
furthermore, bytecode modification :
- makes harder proper source code based security analysis, and
- could nullify (limited) security benefits of using static analysis tool such findbugs.
serialization, etc.?
bytecode modification can things make existing serialized objects readable modified class; e.g. adding , removing fields, or changing classes superclass , interfaces. however, can same thing changing sourcecode.
Comments
Post a Comment