Skip to content

Commit 0836dd9

Browse files
timwrtimwr
authored andcommitted
Merge pull request #2 from schierlm/android-scents
Animal-Sniffer-Plugin for Android
2 parents 2c73323 + af0691d commit 0836dd9

File tree

5 files changed

+169
-2
lines changed

5 files changed

+169
-2
lines changed

external/source/javapayload/androidpayload/library/src/com/metasploit/meterpreter/AndroidMeterpreter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import com.metasploit.meterpreter.stdapi.stdapi_fs_separator;
2929
import com.metasploit.meterpreter.stdapi.stdapi_fs_sha1;
3030
import com.metasploit.meterpreter.stdapi.stdapi_fs_stat;
31-
import com.metasploit.meterpreter.stdapi.stdapi_net_config_get_interfaces_V1_6;
31+
import com.metasploit.meterpreter.stdapi.stdapi_net_config_get_interfaces_V1_4;
3232
import com.metasploit.meterpreter.stdapi.stdapi_net_config_get_routes_V1_4;
3333
import com.metasploit.meterpreter.stdapi.stdapi_net_socket_tcp_shutdown_V1_3;
3434
import com.metasploit.meterpreter.stdapi.stdapi_sys_config_getuid;
@@ -70,7 +70,7 @@ public String[] loadExtension(byte[] data) throws Exception {
7070
mgr.registerCommand("stdapi_fs_separator", stdapi_fs_separator.class);
7171
mgr.registerCommand("stdapi_fs_stat", stdapi_fs_stat.class);
7272
mgr.registerCommand("stdapi_fs_sha1", stdapi_fs_sha1.class);
73-
mgr.registerCommand("stdapi_net_config_get_interfaces", stdapi_net_config_get_interfaces_V1_6.class);
73+
mgr.registerCommand("stdapi_net_config_get_interfaces", stdapi_net_config_get_interfaces_V1_4.class);
7474
mgr.registerCommand("stdapi_net_config_get_routes", stdapi_net_config_get_routes_V1_4.class);
7575
mgr.registerCommand("stdapi_net_socket_tcp_shutdown", stdapi_net_socket_tcp_shutdown_V1_3.class);
7676
mgr.registerCommand("stdapi_sys_config_getuid", stdapi_sys_config_getuid.class);
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<project>
2+
<modelVersion>4.0.0</modelVersion>
3+
<groupId>com.metasploit</groupId>
4+
<artifactId>android-api3-scents</artifactId>
5+
<version>1.5_r4</version>
6+
<packaging>pom</packaging>
7+
<build>
8+
<plugins>
9+
<plugin>
10+
<groupId>org.codehaus.mojo</groupId>
11+
<artifactId>build-helper-maven-plugin</artifactId>
12+
<version>1.8</version>
13+
<executions>
14+
<execution>
15+
<id>attach-artifacts</id>
16+
<phase>package</phase>
17+
<goals>
18+
<goal>attach-artifact</goal>
19+
</goals>
20+
<configuration>
21+
<artifacts>
22+
<artifact>
23+
<file>${project.artifactId}-${project.version}.signature</file>
24+
<type>signature</type>
25+
</artifact>
26+
</artifacts>
27+
</configuration>
28+
</execution>
29+
</executions>
30+
</plugin>
31+
</plugins>
32+
</build>
33+
<profiles>
34+
<profile>
35+
<!-- regenerate the .signature file like this: -->
36+
<!-- mvn -Dandroid.sdk.path=... -P regenerate package -->
37+
<id>regenerate</id>
38+
<build>
39+
<plugins>
40+
<plugin>
41+
<groupId>org.codehaus.mojo</groupId>
42+
<artifactId>animal-sniffer-maven-plugin</artifactId>
43+
<version>1.9</version>
44+
<executions>
45+
<execution>
46+
<id>regenerate</id>
47+
<phase>package</phase>
48+
<goals>
49+
<goal>build</goal>
50+
</goals>
51+
</execution>
52+
</executions>
53+
<configuration>
54+
<javaHomeClassPath>
55+
<javaHomeClassPath>${android.sdk.path}/platforms/android-3/android.jar</javaHomeClassPath>
56+
</javaHomeClassPath>
57+
</configuration>
58+
</plugin>
59+
<plugin>
60+
<artifactId>maven-antrun-plugin</artifactId>
61+
<version>1.7</version>
62+
<executions>
63+
<execution>
64+
<phase>package</phase>
65+
<goals>
66+
<goal>run</goal>
67+
</goals>
68+
<configuration>
69+
<target>
70+
<copy todir="${project.basedir}"
71+
file="${project.basedir}/target/${project.artifactId}-${project.version}.signature" />
72+
</target>
73+
</configuration>
74+
</execution>
75+
</executions>
76+
</plugin>
77+
</plugins>
78+
</build>
79+
</profile>
80+
</profiles>
81+
</project>
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>com.metasploit</groupId>
5+
<artifactId>Metasploit-JavaPayload-Compatibility-android-api3</artifactId>
6+
<parent>
7+
<groupId>com.metasploit</groupId>
8+
<artifactId>Metasploit-JavaPayload-Compatibility-parent</artifactId>
9+
<version>1-SNAPSHOT</version>
10+
</parent>
11+
<packaging>jar</packaging>
12+
<name>JavaPayload Compatibility Checks (Android API 3)</name>
13+
<url>http://www.metasploit.com/</url>
14+
<dependencies>
15+
<dependency>
16+
<groupId>com.google.android</groupId>
17+
<artifactId>android</artifactId>
18+
<version>1.5_r4</version>
19+
</dependency>
20+
</dependencies>
21+
<build>
22+
<plugins>
23+
<plugin>
24+
<groupId>org.apache.maven.plugins</groupId>
25+
<artifactId>maven-compiler-plugin</artifactId>
26+
<version>3.0</version>
27+
<configuration>
28+
<source>1.5</source>
29+
<target>1.5</target>
30+
</configuration>
31+
</plugin>
32+
<plugin>
33+
<artifactId>maven-antrun-plugin</artifactId>
34+
<version>1.7</version>
35+
<executions>
36+
<execution>
37+
<id>copy-source</id>
38+
<phase>generate-sources</phase>
39+
<goals>
40+
<goal>run</goal>
41+
</goals>
42+
<configuration>
43+
<target>
44+
<mkdir dir="${project.basedir}/target/generated-sources/copy/" />
45+
<copy todir="${project.basedir}/target/generated-sources/copy">
46+
<fileset dir="${project.basedir}/../java16/target/generated-sources/copy">
47+
<include name="**/*.java" />
48+
<exclude name="**/stdapi_net_config_get_interfaces_V1_6.java" />
49+
<exclude name="**/stdapi_fs_stat_V1_6.java" />
50+
<exclude name="**/stdapi_ui_desktop_screenshot_V1_4.java" />
51+
<exclude name="metasploit/PayloadApplet.java" />
52+
</fileset>
53+
<fileset dir="${project.basedir}/../../androidpayload/app/src" includes="**/*.java" excludes="**/MainActivity.java" />
54+
<fileset dir="${project.basedir}/../../androidpayload/library/src" includes="**/*.java" />
55+
</copy>
56+
</target>
57+
</configuration>
58+
</execution>
59+
</executions>
60+
</plugin>
61+
<plugin>
62+
<groupId>org.codehaus.mojo</groupId>
63+
<artifactId>animal-sniffer-maven-plugin</artifactId>
64+
<version>1.9</version>
65+
<executions>
66+
<execution>
67+
<id>verify-java</id>
68+
<phase>test</phase>
69+
<goals>
70+
<goal>check</goal>
71+
</goals>
72+
<configuration>
73+
<signature>
74+
<groupId>com.metasploit</groupId>
75+
<artifactId>android-api3-scents</artifactId>
76+
<version>1.5_r4</version>
77+
</signature>
78+
</configuration>
79+
</execution>
80+
</executions>
81+
</plugin>
82+
</plugins>
83+
</build>
84+
</project>

external/source/javapayload/version-compatibility-check/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,7 @@
5454
<module>java14</module>
5555
<module>java13</module>
5656
<module>java12</module>
57+
<module>android-api3-scents</module>
58+
<module>android-api3</module>
5759
</modules>
5860
</project>

0 commit comments

Comments
 (0)