Article
Allow self attachment (Attach Self): In Java 9 and later versions, processes are not allowed to attach themselves by default, and the code bypasses this restriction by modifying the JVM internal flag bits.Permit.godMode();Field AttachSelfEnabledFlag = Class.forName("sun.tools.attach.HotSpotVirtualMachine").getDeclaredField("ALLOW_ATTACH_SELF");
This method modifies the internal JVMALLOW_ATTACH_SELFFlag bit that allows the process to attach itself.
Permit.godMode():use
PermitLibrary bypasses Java access control.
Reflection operationļ¼
Comments (0)
Login to post a comment.