2010-08-20 07:09:51 +00:00
|
|
|
<?xml version="1.0"?>
|
2011-07-18 23:15:06 +00:00
|
|
|
<project name="JavaPayload4Meterpreter" default="deploy">
|
2010-08-20 07:09:51 +00:00
|
|
|
|
|
|
|
<target name="clean">
|
|
|
|
<delete dir="build" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="compile">
|
|
|
|
<mkdir dir="build" />
|
2010-11-02 19:59:57 +00:00
|
|
|
<javac srcdir="src" destdir="build" source="1.1" target="1.1" classpath="lib/servlet-api-2.2.jar" debug="no" />
|
2010-08-20 07:09:51 +00:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="jar" depends="compile">
|
2011-07-18 23:15:06 +00:00
|
|
|
<!-- example: spawning bind -->
|
2010-08-20 07:09:51 +00:00
|
|
|
<propertyfile file="build/metasploit.dat">
|
|
|
|
<entry key="Spawn" value="2"/>
|
|
|
|
<entry key="LPORT" value="5555" />
|
|
|
|
</propertyfile>
|
|
|
|
<jar destfile="example-spawn-bind.jar">
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Main-Class" value="metasploit.Payload"/>
|
|
|
|
</manifest>
|
|
|
|
<fileset dir="build">
|
|
|
|
<include name="metasploit/Payload.class"/>
|
|
|
|
<include name="metasploit.dat"/>
|
|
|
|
</fileset>
|
|
|
|
</jar>
|
|
|
|
<delete file="build/metasploit.dat"/>
|
|
|
|
</target>
|
2011-07-15 20:42:31 +00:00
|
|
|
|
|
|
|
<target name="buildrmi" depends="compile">
|
|
|
|
<!-- build dummy jar used for capturing communication and for testing -->
|
|
|
|
<propertyfile file="build/metasploit.dat">
|
|
|
|
<entry key="LPORT" value="4444" />
|
|
|
|
<entry key="LHOST" value="127.0.0.1" />
|
|
|
|
</propertyfile>
|
|
|
|
<jar destfile="rmidummy.jar">
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Main-Class" value="metasploit.Payload"/>
|
|
|
|
</manifest>
|
|
|
|
<fileset dir="build">
|
|
|
|
<include name="metasploit/RMILoader.class"/>
|
|
|
|
<include name="metasploit/RMIPayload.class"/>
|
|
|
|
<include name="metasploit/Payload.class"/>
|
|
|
|
<include name="metasploit.dat"/>
|
|
|
|
</fileset>
|
|
|
|
</jar>
|
|
|
|
|
|
|
|
<!-- rename local metasploit/RMILoader.class to ensure a classloader URL will be serialized -->
|
|
|
|
<move file="build/metasploit/RMILoader.class" tofile="build/metasploit/RMILoader.class.tmp" />
|
|
|
|
|
|
|
|
<!-- run the capture server -->
|
|
|
|
<java classpath="build" classname="rmi.RMICaptureServer" />
|
|
|
|
|
|
|
|
<!-- rename back -->
|
|
|
|
<move file="build/metasploit/RMILoader.class.tmp" tofile="build/metasploit/RMILoader.class" />
|
|
|
|
</target>
|
2010-11-02 19:59:57 +00:00
|
|
|
|
2011-07-18 23:15:06 +00:00
|
|
|
<target name="deploy" depends="compile">
|
2010-11-02 19:59:57 +00:00
|
|
|
<copy todir="../../../data/java">
|
|
|
|
<fileset dir="build">
|
2011-07-15 20:42:31 +00:00
|
|
|
<exclude name="metasploit/PayloadApplet.class" />
|
|
|
|
<exclude name="rmi/**" />
|
|
|
|
<exclude name="metasploit.dat" />
|
2010-11-02 19:59:57 +00:00
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
</target>
|
2010-08-20 07:09:51 +00:00
|
|
|
</project>
|