1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-01-02 11:36:22 +01:00
metasploit-payloads/java
OJ bbe1ab529b Transport refactoring, dispatch functionality, and more
This commit adds a new idea to the dispatch loop that allows commands to
exit. It also adds the core_shutdown command so that it functions
correct. There are a bunch of other changes around transports as well,
and this commit adds a "resilient" TCP transport.

HTTP/S to come. progress being made. This commit is messy with debug
statements all through it, and they'll get removed down the track.
2015-06-24 19:57:09 +10:00
..
androidpayload Modify the staging process 2015-06-24 13:20:25 +10:00
javapayload fix a little more whitespace, remove superfluous ; 2015-05-19 10:33:34 -05:00
meterpreter Transport refactoring, dispatch functionality, and more 2015-06-24 19:57:09 +10:00
version-compatibility-check Land #5, @schierlm's meterpreter plugin maven archetype 2015-02-02 09:55:00 -06:00
.gitignore Land #25, @jvazquez-r7's MBean loading support 2015-02-02 13:08:03 -06:00
.travis.yml Update .gitignore and .travis.yml for new repo 2013-06-11 19:47:15 +02:00
pom.xml Build NDK Stager with root deploy. 2014-03-10 20:55:05 -05:00
README.md update readme 2014-03-15 19:48:42 +00:00

To compile JavaPayload for Metasploit (including Java Meterpreter), you need Maven 3.0 or above. Just run

mvn package

to package all the files, or

mvn -P deploy package

to package all the files and copy them into the correct place for Metasploit (../metasploit-framework/data/java). If you get spurious compilation errors, make sure that there is an exclude rule in your antivirus for the Metasploit directory (or that your antivirus is disabled).

If the path to your metasploit framework repository is not ../metasploit-framework, but for example ../msf3, use

mvn -D deploy.path=../msf3 -P deploy package

In case you want to edit/debug JavaPayload for Metasploit or Java Meterpreter, Maven provides plugins to auto-generate project files for your favourite IDE (at least for Eclipse, Netbeans or IntelliJ). I use Eclipse, so to generate project files I use

mvn eclipse:eclipse

This will generate project files that can be imported via

File->Import->Existing Projects into Workspace

into your Eclipse workspace.

(Note that if this is your first Maven project you want to use in Eclipse, you also have to run

mvn -Declipse.workspace=/path/to/your/workspace eclipse:configure-workspace

to set up path variables like M2_REPO to point to the correct location.)

For NetBeans or IntelliJ IDEA, refer to the documentation at

http://maven.apache.org/netbeans-module.html http://maven.apache.org/plugins/maven-idea-plugin/

Android

  1. Download the Android SDK, and the Android NDK somewhere
  2. Launch the sdk/tool/android program
  3. Install API version 3, and update the "Android SDK Tools" and "Android SDK Platform-tools"
  4. Compile android meterpreter:
mvn package -Dandroid.sdk.path=/path/to/android-sdk -Dandroid.ndk.path=/path/to/android-ndk -Dandroid.release=true -P deploy