mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-01-14 17:37:27 +01:00
Merge branch 'upstream/master' into transport-refactor
This commit is contained in:
commit
34db0d71bb
@ -26,7 +26,7 @@
|
||||
<plugin>
|
||||
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
|
||||
<artifactId>android-maven-plugin</artifactId>
|
||||
<version>3.5.3</version>
|
||||
<version>3.7.0</version>
|
||||
|
||||
<extensions>true</extensions>
|
||||
</plugin>
|
||||
@ -38,8 +38,8 @@
|
||||
<artifactId>android-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<sdk>
|
||||
<!-- platform or api level (api level 4 = platform 1.6)-->
|
||||
<platform>3</platform>
|
||||
<!-- platform or api level (api level 10 = platform 2.3)-->
|
||||
<platform>10</platform>
|
||||
</sdk>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
@ -47,7 +47,7 @@
|
||||
<plugin>
|
||||
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
|
||||
<artifactId>android-maven-plugin</artifactId>
|
||||
<version>3.5.3</version>
|
||||
<version>3.7.0</version>
|
||||
|
||||
<extensions>true</extensions>
|
||||
</plugin>
|
||||
@ -59,8 +59,8 @@
|
||||
<artifactId>android-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<sdk>
|
||||
<!-- platform or api level (api level 4 = platform 1.6)-->
|
||||
<platform>3</platform>
|
||||
<!-- platform or api level (api level 10 = platform 2.3)-->
|
||||
<platform>10</platform>
|
||||
</sdk>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
@ -9,8 +9,8 @@ import com.metasploit.meterpreter.command.Command;
|
||||
public class check_root_android implements Command {
|
||||
|
||||
private static final int TLV_EXTENSIONS = 20000;
|
||||
private static final int TLV_TYPE_CHECK_ROOT_BOOL = TLVPacket.TLV_META_TYPE_BOOL
|
||||
| (TLV_EXTENSIONS + 9019);
|
||||
private static final int TLV_TYPE_CHECK_ROOT_BOOL =
|
||||
TLVPacket.TLV_META_TYPE_BOOL | (TLV_EXTENSIONS + 9019);
|
||||
|
||||
@Override
|
||||
public int execute(Meterpreter meterpreter, TLVPacket request,
|
||||
@ -27,27 +27,29 @@ public class check_root_android implements Command {
|
||||
return true;
|
||||
}
|
||||
|
||||
try {
|
||||
File file = new File("/system/app/Superuser.apk");
|
||||
if (file.exists()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
//Added check for SuperSU
|
||||
file = new File("/system/app/SuperSU.apk");
|
||||
if (file.exists()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
} catch (Exception e1) {
|
||||
|
||||
}
|
||||
|
||||
return canExecuteCommand("/system/xbin/which su")
|
||||
return fileInstalled("/system/app/SuperSU")
|
||||
|| fileInstalled("/system/app/SuperSU.apk")
|
||||
|| fileInstalled("/system/app/Superuser")
|
||||
|| fileInstalled("/system/app/Superuser.apk")
|
||||
|| fileInstalled("/system/xbin/su")
|
||||
|| fileInstalled("/system/xbin/_su")
|
||||
|| canExecuteCommand("/system/xbin/which su")
|
||||
|| canExecuteCommand("/system/bin/which su")
|
||||
|| canExecuteCommand("which su");
|
||||
}
|
||||
|
||||
private static boolean fileInstalled(String packageName) {
|
||||
boolean installed;
|
||||
try {
|
||||
File file = new File("/system/app/" + packageName);
|
||||
installed = file.exists();
|
||||
} catch (Exception e1){
|
||||
installed = false;
|
||||
}
|
||||
|
||||
return installed;
|
||||
}
|
||||
|
||||
private static boolean canExecuteCommand(String command) {
|
||||
boolean executedSuccesfully;
|
||||
try {
|
||||
|
@ -2,14 +2,14 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.metasploit</groupId>
|
||||
<artifactId>Metasploit-JavaPayload-Compatibility-android-api3</artifactId>
|
||||
<artifactId>Metasploit-JavaPayload-Compatibility-android-api10</artifactId>
|
||||
<parent>
|
||||
<groupId>com.metasploit</groupId>
|
||||
<artifactId>Metasploit-JavaPayload-Compatibility-parent</artifactId>
|
||||
<version>1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<packaging>jar</packaging>
|
||||
<name>JavaPayload Compatibility Checks (Android API 3)</name>
|
||||
<name>JavaPayload Compatibility Checks (Android API 10)</name>
|
||||
<url>http://www.metasploit.com/</url>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
@ -72,8 +72,8 @@
|
||||
<configuration>
|
||||
<signature>
|
||||
<groupId>net.sf.androidscents.signature</groupId>
|
||||
<artifactId>android-api-level-1</artifactId>
|
||||
<version>1.0_r2</version>
|
||||
<artifactId>android-api-level-10</artifactId>
|
||||
<version>2.3.3_r2</version>
|
||||
</signature>
|
||||
</configuration>
|
||||
</execution>
|
@ -54,6 +54,6 @@
|
||||
<module>java14</module>
|
||||
<module>java13</module>
|
||||
<module>java12</module>
|
||||
<module>android-api3</module>
|
||||
<module>android-api10</module>
|
||||
</modules>
|
||||
</project>
|
||||
|
Loading…
Reference in New Issue
Block a user