Re:Using LD_PRELOAD to cheat, inject features and investigat...
by tfmatt on Monday December 04, 2017 @12:55AM
(#15841770)
Is there a similar Java centric type override? Would it be as simple as dropping a jar in the right location or is there an environment variable that can be over written? Also it would be neat to know the java code to chain the "open" system call like he did.
[ Parent
| on HN ]
Re:Using LD_PRELOAD to cheat, inject features and investigat...
by nitwit005 on Monday December 04, 2017 @01:11AM
(#15841817)
Probably not with an environment variable, but you can always replace the java executable with another executable that adds an option like -Xbootclasspath.
Re:Using LD_PRELOAD to cheat, inject features and investigat...
by jmalicki on Monday December 04, 2017 @01:02AM
(#15841801)
You can override the ClassLoader (and use other reflection tricks after that) to do almost anything, see e.g. http://blog.cyberborean.org/2007/07/04/custom-classloaders-t...
Re:Using LD_PRELOAD to cheat, inject features and investigat...
by half-kh-hacker on Monday December 04, 2017 @04:49AM
(#15842739)
You can write a Java agent to overwrite the classfiles as they're loaded.
At startup, you can use the `-javaagent:<path/to/jar>` option, and you can also bind an agent to other JVMs, programmatically, at runtime with a bit of hackery.