major refactor from ws to rs

This commit is contained in:
thefiresonthebird
2026-01-27 09:28:06 -05:00
parent fbe7f59990
commit d46e32a0b2
84 changed files with 274 additions and 237 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
BSD 3-Clause License
Copyright (c) 2024, WithSecure
Copyright (c) 2026, Reversec
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
+1 -1
View File
@@ -1,5 +1,5 @@
package com.WithSecure.jsolar.api;
package com.reversec.jsolar.api;
option optimize_for = SPEED;
+1 -1
View File
@@ -12,7 +12,7 @@ A pre-built image can be pulled by running:
```docker pull drozerdocker/drozer```
Alternatively, to build this container yourself, use the `docker build` command, pointing it towards WithSecure's GitHub repository:
Alternatively, to build this container yourself, use the `docker build` command, pointing it towards Reversec's GitHub repository:
```docker build -t drozerdocker/drozer https://github.com/ReversecLabs/drozer.git#develop:docker```
+12 -13
View File
@@ -14,7 +14,7 @@ Another resource which makes extensive use of drozer in its Android chapters is
drozer allows you to assume the role of an Android app and interact with other apps. It can do anything that an installed application can do, such as make use of Android’s Inter-Process Communication (IPC) mechanism and interact with the underlying operating system.
drozer is open-source software, released under a BSD license and maintained by WithSecure. To get in touch with the project, please use our GitHub project at [https://github.com/WithSecureLabs/drozer](https://github.com/WithSecureLabs/drozer).
drozer is open-source software, released under a BSD license and maintained by Reversec. To get in touch with the project, please use our GitHub project at [https://github.com/ReversecLabs/drozer](https://github.com/ReversecLabs/drozer).
## 1.2 Conventions
@@ -64,7 +64,7 @@ libexpat1 libexpat1-dev libpython3-dev python-is-python3 zip default-jdk
Then build drozer for Python wheel
```
git clone https://github.com/WithSecureLabs/drozer.git
git clone https://github.com/ReversecLabs/drozer.git
cd drozer
python setup.py bdist_wheel
```
@@ -79,7 +79,7 @@ pip install dist/drozer-<version>-py3-none-any.whl
On any Arch-based installation, until proper pkgbuilds and pip packages are created, please use a [virtualenv](https://wiki.archlinux.org/title/Python/Virtual_environment).
```
git clone https://github.com/WithSecureLabs/drozer.git
git clone https://github.com/ReversecLabs/drozer.git
cd drozer
virtualenv -p /usr/bin/python3 venv
source venv/bin/activate
@@ -89,21 +89,21 @@ sudo pip install dist/drozer-<version>-py3-none-any.whl
### 2.1.4 Docker
WithSecure maintains a [Docker image](https://hub.docker.com/r/withsecurelabs/drozer) which can be pulled from the Docker Hub by running:
Reversec maintains a [Docker image](https://hub.docker.com/r/drozerdocker/drozer) which can be pulled from the Docker Hub by running:
```
docker pull withsecurelabs/drozer
docker pull drozerdocker/drozer
```
Alternatively, to build this container yourself, use the `docker build` command, pointing it towards WithSecure's GitHub repository:
Alternatively, to build this container yourself, use the `docker build` command, pointing it towards Reversec's GitHub repository:
```
docker build -t withsecurelabs/drozer https://github.com/WithSecureLabs/drozer.git#develop:docker
docker build -t drozerdocker/drozer https://github.com/ReversecLabs/drozer.git#develop:docker
```
Refer to the [Run and Connect instructions](https://hub.docker.com/r/withsecurelabs/drozer) within the image's documentation to get up and running.
Refer to the [Run and Connect instructions](https://hub.docker.com/r/drozerdocker/drozer) within the image's documentation to get up and running.
The source Dockerfile is available [here](https://github.com/WithSecureLabs/drozer/blob/develop/docker/Dockerfile).
The source Dockerfile is available [here](https://github.com/ReversecLabs/drozer/blob/develop/docker/Dockerfile).
### 2.1.5 Testing the installation
@@ -132,7 +132,7 @@ Commands:
### 2.2 Installing the Agent
The drozer Agent can be obtained from the [drozer-agent](https://github.com/WithSecureLabs/drozer-agent) repository as an Android Package (.apk) file. This can be installed onto your emulator or device using Android Debug Bridge (adb):
The drozer Agent can be obtained from the [drozer-agent](https://github.com/ReversecLabs/drozer-agent) repository as an Android Package (.apk) file. This can be installed onto your emulator or device using Android Debug Bridge (adb):
```
$ adb install agent.apk
@@ -159,7 +159,7 @@ $ drozer console connect --server <phone's IP address>
If you are using the Docker container, the equivalent command would be:
```
docker run --net host -it withsecurelabs/drozer console connect --server <phone's IP address>
docker run --net host -it drozerdocker/drozer console connect --server <phone's IP address>
```
### 2.3.2 Option 2: Connect to the phone via USB
@@ -232,8 +232,7 @@ Each module implements a very specific function, e.g. listing all packages insta
Once you have successfully installed drozer, and have established a session between your PC and device, you will no doubt want to find out how to use drozer.
This section guides you through how to perform a limited section of an assessment of a vulnerable app. The name of the app being used is Sieve, which can be downloaded from the WithSecure Labs website:
yaytagyay insert website
This section guides you through how to perform a limited section of an assessment of a vulnerable app. The name of the app being used is Sieve, which can be downloaded from the Reversec Labs website: https://github.com/ReversecLabs/sieve
## 3.1 Sieve
+6 -6
View File
@@ -14,7 +14,7 @@ dependencies = ["protobuf>=4.25.2",
"requests"]
requires-python = ">=3.8"
authors = [
{ name = "WithSecure", email = "drozer@withsecure.com" },
{ name = "reversec", email = "drozer@reversec.com" },
]
description = "The Leading Android Security Testing Framework"
readme = "README.md"
@@ -28,10 +28,10 @@ classifiers = [
]
[project.urls]
Homepage = "https://labs.withsecure.com/tools/drozer/"
Documentation = "https://labs.withsecure.com/tools/drozer/"
Repository = "https://github.com/WithSecureLabs/drozer.git"
Issues = "https://github.com/WithSecureLabs/drozer/issues"
Homepage = "https://labs.reversec.com/tools/drozer/"
Documentation = "https://labs.reversec.com/tools/drozer/"
Repository = "https://github.com/ReversecLabs/drozer.git"
Issues = "https://github.com/ReversecLabs/drozer/issues"
[project.scripts]
drozer = "drozer.main:main"
@@ -40,7 +40,7 @@ drozer-complete = "drozer.autocomplete:main"
[tool.setuptools.package-dir]
drozer = "src/drozer"
WithSecure = "src/WithSecure"
reversec = "src/reversec"
pysolar = "src/pysolar"
[tool.setuptools.dynamic]
+5 -5
View File
@@ -1,17 +1,17 @@
Source: drozer
Section: misc
Priority: optional
Homepage: https://labs.mwrinfosecurity.com
Homepage: https://reversec.com
Package: drozer
Architecture: all
Installed-Size: <FILE_SIZE>
Version: <VERSION>
Maintainer: MWR Infosecurity
Maintainer: Reversec
Depends: bash (>= 2.05a-11)
Description: The Leading Security Testing Framework for Android.
drozer enables you to search for security vulnerabilities in apps and devices by assuming the role of an app and interacting with the Dalvik VM, other apps’ IPC endpoints and the underlying OS.
drozer provides tools to help you use and share public Android exploits. It helps you to deploy a drozer agent by using weasel – MWR’s advanced exploitation payload.
For the latest drozer updates, follow @mwrdrozer.
drozer provides tools to help you use and share public Android exploits. It helps you to deploy a drozer agent by using weasel – Reversec’s advanced exploitation payload.
For the latest drozer updates, follow @reversec.
.
drozer allows you to use dynamic analysis during an Android security assessment. By assuming the role of an Android app you can:
* find information about installed packages.
@@ -20,4 +20,4 @@ Description: The Leading Security Testing Framework for Android.
* check an app’s attack surface, and search for known vulnerabilities.
* create new modules to share your latest findings on Android.
.
drozer’s remote exploitation features provide a unified framework for sharing Android payloads and exploits. It helps to reduce the time needed for vulnerability assessments and mobile red-teaming exercises, and includes the outcome of some of MWR’s cutting-edge research into advanced Android payloads and exploits.
drozer’s remote exploitation features provide a unified framework for sharing Android payloads and exploits. It helps to reduce the time needed for vulnerability assessments and mobile red-teaming exercises, and includes the outcome of some of Reversec’s cutting-edge research into advanced Android payloads and exploits.
+5 -5
View File
@@ -18,8 +18,8 @@ Version: %{version}
Release: 1
# For a breakdown of the licensing, see PACKAGE-LICENSING
License: BSD and GPL2+ and Apache2 and MITx11
Group: MWR InfoSecurity
URL: https://labs.mwrinfosecurity.com
Group: Reversec
URL: https://labs.reversec.com
Source: %{name}-%{version}.tar.gz
Requires: python >= 2.7
Requires: protobuf-python >= 2.4.1
@@ -35,8 +35,8 @@ AutoReq: 0
%description
drozer enables you to search for security vulnerabilities in apps and devices by assuming the role of an app and interacting with the Dalvik VM, other apps’ IPC endpoints and the underlying OS.
drozer provides tools to help you use and share public Android exploits. It helps you to deploy a drozer agent by using weasel – MWR’s advanced exploitation payload.
For the latest Mercury updates, follow @mwrdrozer.
drozer provides tools to help you use and share public Android exploits. It helps you to deploy a drozer agent by using weasel – Reversec’s advanced exploitation payload.
For the latest Mercury updates, follow @reversec.
Features
drozer allows you to use dynamic analysis during an Android security assessment. By assuming the role of an Android app you can:
*find information about installed packages.
@@ -44,7 +44,7 @@ drozer allows you to use dynamic analysis during an Android security assessment.
*use a proper shell to play with the underlying Linux OS (from the content of an unprivileged application).
*check an app’s attack surface, and search for known vulnerabilities.
*create new modules to share your latest findings on Android.
drozer’s remote exploitation features provide a unified framework for sharing Android payloads and exploits. It helps to reduce the time needed for vulnerability assessments and mobile red-teaming exercises, and includes the outcome of some of MWR’s cutting-edge research into advanced Android payloads and exploits.
drozer’s remote exploitation features provide a unified framework for sharing Android payloads and exploits. It helps to reduce the time needed for vulnerability assessments and mobile red-teaming exercises, and includes the outcome of some of Reversec’s cutting-edge research into advanced Android payloads and exploits.
How it Works
drozer does all of this over the network: it does not require ADB.
+1 -1
View File
@@ -46,7 +46,7 @@ def make_apks():
for filename in filenames:
if fnmatch(filename, "*.java"):
# Compile java
javac_cmd = ['javac', '-cp', sdk, filename]
javac_cmd = ['javac', '--release', '17', '-cp', sdk, filename]
# Build apk
basename, _ = filename.split('.')
+1 -1
View File
@@ -1,7 +1,7 @@
import os
import platform
from WithSecure.common import command_wrapper
from reversec.common import command_wrapper
from drozer.configuration import Configuration
+1 -1
View File
@@ -1,5 +1,5 @@
import itertools
from WithSecure.common import cli
from reversec.common import cli
import yaml
from drozer import android, meta
from drozer.agent import builder, manifest
+1 -1
View File
@@ -7,7 +7,7 @@ import distro
if distro.id() in ["Fedora", "CentOS Linux"]:
os.putenv("TERM", "vt100")
from WithSecure.common import argparse_completer
from reversec.common import argparse_completer
from drozer.console import Console
from drozer.exploit.manager import ExploitManager
+1 -1
View File
@@ -3,7 +3,7 @@
import logging
import sys
from WithSecure.common import logger
from reversec.common import logger
from drozer.agent.manager import AgentManager
+1 -1
View File
@@ -3,7 +3,7 @@
import logging
import sys
from WithSecure.common import logger
from reversec.common import logger
from drozer.console import Console
+1 -1
View File
@@ -3,7 +3,7 @@
import logging
import sys
from WithSecure.common import logger
from reversec.common import logger
from drozer.exploit.manager import ExploitManager
+1 -1
View File
@@ -3,7 +3,7 @@
import logging
import sys
from WithSecure.common import logger
from reversec.common import logger
from drozer.payload.manager import PayloadManager
+1 -1
View File
@@ -3,7 +3,7 @@
import logging
import sys
from WithSecure.common import logger
from reversec.common import logger
from drozer.server import Server
+1 -1
View File
@@ -3,7 +3,7 @@
import logging
import sys
from WithSecure.common import logger
from reversec.common import logger
from drozer.ssl import SSLManager
+1 -1
View File
@@ -3,7 +3,7 @@ import os
import platform
import sys
from WithSecure.common import system
from reversec.common import system
class Configuration(object):
"""
+1 -1
View File
@@ -4,7 +4,7 @@ def clean(reflector):
Remove APK and DEX files cached by drozer.
"""
context = reflector.resolve('com.WithSecure.dz.Agent').getContext()
context = reflector.resolve('com.reversec.dz.Agent').getContext()
cache_directory = context.getCacheDir().listFiles()
i = 0
+3 -3
View File
@@ -7,7 +7,7 @@ from pysolar.api.protobuf_pb2 import Message
from pysolar.api.transport.exceptions import ConnectionError
from pysolar.reflection import ReflectionException
from WithSecure.common import cli, path_completion
from reversec.common import cli, path_completion
from drozer import meta
from drozer.api.formatters import SystemResponseFormatter
@@ -75,8 +75,8 @@ class Console(cli.Base):
except KeyboardInterrupt:
print("Caught SIGINT, terminating your session.")
except ReflectionException as e:
if("cannot resolve com.WithSecure.dz.Agent" in str(e)):
sys.stderr.write("It seems that you are running an unsupported version of drozer-agent. Please update your copy.\n\nTo download the latest drozer-agent visit:\nhttps://github.com/WithSecureLabs/drozer-agent/releases\n")
if("cannot resolve com.reversec.dz.Agent" in str(e)):
sys.stderr.write("It seems that you are running an unsupported version of drozer-agent. Please update your copy.\n\nTo download the latest drozer-agent visit:\nhttps://github.com/ReversecLabs/drozer-agent/releases\n")
if(arguments.debug):
self.handleException(e, arguments, session)
except Exception as e:
+29 -12
View File
@@ -10,10 +10,10 @@ from pysolar.api.protobuf_pb2 import Message
from pysolar.api.transport.exceptions import ConnectionError
from pysolar.reflection import Reflector
from WithSecure.common import cmd_ext as cmd
from WithSecure.common import console
from WithSecure.common.stream import ColouredStream, DecolouredStream
from WithSecure.common.text import wrap
from reversec.common import cmd_ext as cmd
from reversec.common import console
from reversec.common.stream import ColouredStream, DecolouredStream
from reversec.common.text import wrap
from drozer import meta
from drozer.configuration import Configuration
@@ -40,7 +40,7 @@ class Session(cmd.Cmd):
self.__onecmd = arguments.onecmd
self.active = True
self.aliases = { "l": "list", "ls": "list", "ll": "list" }
self.intro = "drozer Console (v%s)" % meta.version
self.intro = "drozer Console from ReversecLabs (v%s)" % meta.version
self.history_file = os.path.sep.join([os.path.expanduser("~"), ".drozer_history"])
self.modules = collection.ModuleCollection(loader.ModuleLoader())
self.prompt = "dz> "
@@ -111,7 +111,7 @@ class Session(cmd.Cmd):
def context(self):
if self.has_context():
return self.reflector.resolve("com.WithSecure.dz.Agent").getContext()
return self.reflector.resolve("com.reversec.dz.Agent").getContext()
else:
return None
@@ -195,7 +195,7 @@ class Session(cmd.Cmd):
self.stdout.write("Core Contributors:\n")
for contributor in [
'WithSecure Labs (@withconsulting)',
'Reversec Labs (@reversec)',
'Ken Gannon (@Yogehi)',
'William Ben Embarek (@willbenem)',
'Miłosz Gaczkowski (@cyberMilosz)',
@@ -369,7 +369,7 @@ class Session(cmd.Cmd):
self.stdout.write("Has ApplicationContext: YES\n")
self.stdout.write("Available Permissions:\n")
for permission in sorted(self.permissions()):
if permission not in ["GET_CONTEXT", "com.WithSecure.dz.permissions.GET_CONTEXT", "com.mwr.dz.permissions.GET_CONTEXT"]:
if permission not in ["GET_CONTEXT", "com.reversec.dz.permissions.GET_CONTEXT", "com.mwr.dz.permissions.GET_CONTEXT"]:
self.stdout.write(" - %s\n" % (permission))
else:
self.stdout.write("Has ApplicationContext: NO\n")
@@ -536,7 +536,7 @@ class Session(cmd.Cmd):
For Website URIs, use either 'http://' or 'https://' format of URIs:
--extra parcelable yaywebsiteyay http://www.withsecure.com
--extra parcelable yaywebsiteyay http://www.reversec.com
For Intents, use the 'intent://' format of URI:
@@ -548,7 +548,7 @@ class Session(cmd.Cmd):
def has_context(self):
if self.__has_context == None:
self.__has_context = not self.reflector.resolve("com.WithSecure.dz.Agent").getContext() == None
self.__has_context = not self.reflector.resolve("com.reversec.dz.Agent").getContext() == None
return self.__has_context == True
@@ -572,7 +572,7 @@ class Session(cmd.Cmd):
if (packageManager.checkPermission(str(permission), packageName) == pm.PERMISSION_GRANTED):
self.__permissions.append(str(permission))
self.__permissions.append("com.WithSecure.dz.permissions.GET_CONTEXT")
self.__permissions.append("com.reversec.dz.permissions.GET_CONTEXT")
self.__permissions.append("com.mwr.dz.permissions.GET_CONTEXT")
self.__permissions.append("GET_CONTEXT")
elif self.__permissions == None:
@@ -702,7 +702,7 @@ class Session(cmd.Cmd):
elif x == 42:
self.__print_banner3()
else:
self.__print_banner1()
self.__print_banner4()
def __print_banner1(self):
print(" .. ..:." )
@@ -721,6 +721,23 @@ class Session(cmd.Cmd):
print(" .dprotectorandroidsnemesisandprotector.")
print("")
def __print_banner4(self):
print(" .:.. .." )
print(" ..r. ..o.." )
print(" dn.. . ....... . ..a.." )
print(" rp..dnasisemensdi..or" )
print(" .emendsiordnarotceto." )
print(" .+sdiorndnarotcetorpdnasis,." )
print(" .:nsdiordnarotcetorpdnasisemen.." )
print(" ..semensdiordnarotcetorpdnasiseme." )
print(" .mensdi,..,ordnayaycetor,..,pdnasi.." )
print(" .sisimens..diordnarotcetor..pdnasisi." )
print(" .cetorpdnasisimensdiordnarotcetorpdna, ")
print(" .diordnarotcetorpdnasisemensdiordnarot.")
print(" :nasisemensdiordnarotcetorpdnasisimens.")
print(" .rotcetorpdnasisemensdiordnarotcetorpd.")
print("")
# You found the easter egg!
# What you wanted a prize or something?
def __print_banner2(self):
+1 -1
View File
@@ -1,6 +1,6 @@
import sys
from WithSecure.common import cli, console
from reversec.common import cli, console
from drozer import payload
from drozer.exploit import builder
+2 -2
View File
@@ -4,7 +4,7 @@
#include <jni.h>
#include <android/log.h>
#define LOG_TAG "com.mwr.dz"
#define LOG_TAG "com.reversec.dz"
#define LOGD(LOG_TAG, ...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
#define LOGV(LOG_TAG, ...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, __VA_ARGS__)
@@ -19,7 +19,7 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *pvt)
jmethodID method;
jobject activityThread, context, objPattern, objMatcher;
jstring match, pattern, strResult, file_path, jar_file, string_host, package_name;
jstring agent_class = (*env)->NewStringUTF(env, "com.mwr.dz.Agent");
jstring agent_class = (*env)->NewStringUTF(env, "com.reversec.dz.Agent");
const char *result[1035];
const char *filePath[1024];
const char *jarFile[1024];
+1 -1
View File
@@ -13,7 +13,7 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.
rem Edited by MWR InfoSecurity for use within drozer, for more infomation, please see LICENSE
rem Edited by Reversec for use within drozer, for more information, please see LICENSE
rem This script is called by the other batch files to find a suitable Java.exe
rem to use. The script changes the "java_exe" env variable. The variable
+2 -2
View File
@@ -32,7 +32,7 @@ version = Version(drozer.__version__)
def latest_version():
try:
response = urlopen(Request("https://api.github.com/repos/WithSecureLabs/drozer/releases/latest", None, {"user-agent": "drozer: %s" % str(version)}), None, 1)
response = urlopen(Request("https://api.github.com/repos/ReversecLabs/drozer/releases/latest", None, {"user-agent": "drozer: %s" % str(version)}), None, 1)
latestTag = json.load(response)
latestVersion = Version(latestTag["tag_name"]), latestTag["created_at"][:10]
return latestVersion
@@ -43,7 +43,7 @@ def latest_version():
def latest_agent_version():
try:
response = urlopen(Request("https://api.github.com/repos/WithSecureLabs/drozer-agent/releases/latest", None, {"user-agent": "drozer: %s" % str(version)}), None, 1)
response = urlopen(Request("https://api.github.com/repos/ReversecLabs/drozer-agent/releases/latest", None, {"user-agent": "drozer: %s" % str(version)}), None, 1)
latestTag = json.load(response)
latestAgentVersion = Version(latestTag["tag_name"]), latestTag["created_at"][:10]
return latestAgentVersion
+3 -3
View File
@@ -17,7 +17,7 @@ class ForIntent(Module, common.PackageManager):
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "activity"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
android.Intent.addArgumentsTo(parser)
@@ -57,7 +57,7 @@ class Info(Module, common.Filters, common.IntentFilter, common.PackageManager):
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "activity"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("-a", "--package", default=None, help="specify the package to inspect")
@@ -158,7 +158,7 @@ For more information on how to formulate an Intent, type 'help intents'."""
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "activity"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
android.Intent.addArgumentsTo(parser)
+1 -1
View File
@@ -10,7 +10,7 @@ class Backup(Module, common.Filters, common.PackageManager):
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "package"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
FLAG_ALLOW_BACKUP = 0x0008000
API_KEY_HANDLE = "com.google.android.backup.api_key"
+3 -3
View File
@@ -33,7 +33,7 @@ class Info(Module, common.Filters, common.IntentFilter, common.PackageManager):
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "broadcast"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("-a", "--package", default=None, help="specify the package to inspect")
@@ -119,7 +119,7 @@ For more information on how to formulate an Intent, type 'help intents'."""
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "broadcast"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
android.Intent.addArgumentsTo(parser)
@@ -166,7 +166,7 @@ class Sniff(Module, loader.ClassLoader):
date = "2014-06-27"
license = "BSD (3 clause)"
path = ["app", "broadcast"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("--action", help="specify the action to include in the Intent Filter")
+1 -1
View File
@@ -9,7 +9,7 @@ class Debuggable(Module, common.Filters, common.PackageManager):
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "package"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
FLAG_DEBUGGABLE = 0x00000002
+9 -9
View File
@@ -19,7 +19,7 @@ class AttackSurface(Module, common.Filters, common.PackageManager):
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "package"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("package", help="the identifier of the package to inspect")
@@ -96,7 +96,7 @@ Finding all packages with the "INSTALL_PACKAGES" permission:
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "package"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("-a", "--package", default=None, help="the identifier of the package to inspect")
@@ -265,7 +265,7 @@ class LaunchIntent(Module, common.PackageManager):
date = "2013-03-06"
license = "BSD (3 clause)"
path = ["app", "package"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("package", help="the identifier of the package to inspect")
@@ -336,7 +336,7 @@ class List(Module, common.PackageManager):
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "package"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("-d", "--defines-permission", default=None, help="filter by the permissions a package defines")
@@ -370,9 +370,9 @@ class Manifest(Module, common.Assets):
description = "Retrieves AndroidManifest.xml from an installed package."
examples = """Getting the manifest for drozer
dz> run app.package.manifest com.WithSecure.dz
dz> run app.package.manifest com.reversec.dz
<manifest versionCode="2" versionName="1.1" package="com.WithSecure.dz">
<manifest versionCode="2" versionName="1.1" package="com.reversec.dz">
<uses-sdk minSdkVersion="8" targetSdkVersion="4">
</uses-sdk>
<uses-permission name="android.permission.INTERNET">
@@ -384,7 +384,7 @@ class Manifest(Module, common.Assets):
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "package"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("package", help="the identifier of the package")
@@ -431,7 +431,7 @@ class Native(Module, common.ClassLoader, common.PackageManager):
date = "2013-03-23"
license = "BSD (3 clause)"
path = ["app", "package"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("package", help="the identifier of the package")
@@ -484,7 +484,7 @@ class SharedUID(Module, common.PackageManager):
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "package"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("-u", "--uid", default=None, help="specify uid")
+10 -10
View File
@@ -16,7 +16,7 @@ class Columns(Module, common.Provider, common.TableFormatter):
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "provider"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("uri", help="the content provider uri to query")
@@ -45,7 +45,7 @@ class Delete(Module, common.Provider):
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "provider"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("uri", help="the content provider uri to query")
@@ -69,7 +69,7 @@ class Download(Module, common.Provider):
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "provider"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("uri", help="the content provider URI to read a file through")
@@ -125,7 +125,7 @@ This module uses a number of strategies to identify a content URI, including ins
date = "2012-13-18"
license = "BSD (3 clause)"
path = ["app", "provider"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("package", help="the package to search for content provider uris")
@@ -177,7 +177,7 @@ Finding content providers that do not require permissions to read/write:
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "provider"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
PatternMatcherTypes = { 0: "PATTERN_LITERAL", 1: "PATTERN_PREFIX", 2: "PATTERN_SIMPLE_GLOB" }
@@ -268,7 +268,7 @@ class Insert(Module, common.Provider):
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "provider"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("uri", help="the content provider uri to insert into")
@@ -335,7 +335,7 @@ Querying, with a WHERE clause in the SELECT statement:
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "provider"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("uri", help="the content provider uri to query")
@@ -367,7 +367,7 @@ class Read(Module, common.Provider):
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "provider"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("uri", help="the content provider URI to read a file through")
@@ -395,7 +395,7 @@ class Update(Module, common.Provider):
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "provider"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("uri", help="the content provider uri to update in")
@@ -454,7 +454,7 @@ class Call(Module, common.Provider):
date = "2025-05-07"
license = "BSD (3 clause)"
path = ["app", "provider"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("uri", help="the content provider URI that accepts a 'call'")
+4 -4
View File
@@ -29,7 +29,7 @@ List exported services with no permissions required to interact with it:
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "service"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("-a", "--package", default=None, help="specify the package to inspect")
@@ -121,7 +121,7 @@ NB: by default, this module will wait 20 seconds for a reply."""
date = "2013-05-20"
license = "BSD (3 clause)"
path = ["app", "service"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("package", help="the package containing the target service")
@@ -180,7 +180,7 @@ For more information on how to formulate an Intent, type 'help intents'."""
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "service"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
android.Intent.addArgumentsTo(parser)
@@ -207,7 +207,7 @@ class Stop(Module):
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["app", "service"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
android.Intent.addArgumentsTo(parser)
@@ -20,7 +20,7 @@ class WebContentResolver(Module, common.PackageManager, common.Provider):
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["auxiliary"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("-p", "--port", default=8080, help="the port to start the WebContentResolver on")
+3 -3
View File
@@ -3,8 +3,8 @@ import textwrap
from pysolar.reflection.types import ReflectedType
from WithSecure.common import argparse_completer, console
from WithSecure.common.text import wrap
from reversec.common import argparse_completer, console
from reversec.common.text import wrap
class Module(object):
"""
@@ -119,7 +119,7 @@ class Module(object):
Gets the context of the running Agent application.
"""
return self.klass('com.WithSecure.dz.Agent').getContext()
return self.klass('com.reversec.dz.Agent').getContext()
def has_context(self):
"""
+1 -1
View File
@@ -1,6 +1,6 @@
import itertools
from WithSecure.common.list import flatten
from reversec.common.list import flatten
from drozer.modules import base
+1 -1
View File
@@ -3,7 +3,7 @@ import string
import sys
import re
from WithSecure.common import fs
from reversec.common import fs
from drozer import android, util
from drozer.agent import builder, manifest
+1 -1
View File
@@ -2,7 +2,7 @@ import binascii
import os
import base64
from WithSecure.common.list import chunk
from reversec.common.list import chunk
class FileSystem(object):
"""
+1 -1
View File
@@ -1,4 +1,4 @@
from WithSecure.common.path_completion import complete as on_console,get_folder_and_search_path, get_suggestions
from reversec.common.path_completion import complete as on_console,get_folder_and_search_path, get_suggestions
def on_agent(path, context):
"""
+21 -13
View File
@@ -370,24 +370,32 @@ class Provider(loader.ClassLoader):
paths.add(str(permission.getPath()))
# TODO: try to handle wildcard paths sensibly, like /contacts/.*/xyz
for authority in provider.authority.split(";"):
uris.add("content://%s/" % authority)
for path in paths:
uris.add("content://%s%s" % (authority, path))
for (path, content_uris) in self.findContentUris(package.packageName):
content_uris = list(content_uris)
if len(content_uris) > 0:
for uri in content_uris:
uris.add(uri[uri.upper().find("CONTENT"):])
# one more pass, make sure we get the / and non-/ version of each URI
for uri in set(uris):
if uri.endswith("/"):
uris.add(uri[uri.upper().find("CONTENT"):-1])
else:
uris.add(uri[uri.upper().find("CONTENT"):] + "/")
try:
for (path, content_uris) in self.findContentUris(package.packageName):
content_uris = list(content_uris)
if len(content_uris) > 0:
for uri in content_uris:
uris.add(uri[uri.upper().find("CONTENT"):])
except Exception as e:
print("src/drozer/modules/common/provider.py - line ~390: %s" % e)
try:
# one more pass, make sure we get the / and non-/ version of each URI
for uri in set(uris):
if uri.endswith("/"):
uris.add(uri[uri.upper().find("CONTENT"):-1])
else:
uris.add(uri[uri.upper().find("CONTENT"):] + "/")
except Exception as e:
print("src/drozer/modules/common/provider.py - line ~400: %s" % e)
return sorted(uris)
+1 -1
View File
@@ -31,7 +31,7 @@ class Shell(file_system.FileSystem, loader.ClassLoader):
first command.
"""
try:
shell = self.new("com.WithSecure.jsolar.util.Shell")
shell = self.new("com.reversec.jsolar.util.Shell")
in_shell = True
except ReflectionException as e:
raise e
+1 -1
View File
@@ -9,7 +9,7 @@ class Strings(object):
Searches a file for Strings, and returns them in an Array.
"""
StringsKlass = self.klass("com.WithSecure.jsolar.util.Strings")
StringsKlass = self.klass("com.reversec.jsolar.util.Strings")
strings = StringsKlass.get(path)
+2 -2
View File
@@ -1,5 +1,5 @@
import os, tempfile
from WithSecure.common import fs
from reversec.common import fs
from drozer.modules.common import file_system
@@ -14,7 +14,7 @@ class SuperUser(file_system.FileSystem):
Get the path to which su is uploaded on the Agent.
"""
# yaynoteyay
# TODO
# not sure how to fix this yet
# but if the phone is rooted, then `su` should be in a directoy on `path` anyway
# need to figure out a way to dynamically detect location of `su`
+4 -1
View File
@@ -10,7 +10,10 @@ class ZipFile(loader.ClassLoader):
Extract a file (target) from a zipped archive (source) and save it to
the file system (destination).
"""
try:
ZipUtil = self.loadClass("common/ZipUtil.apk", "ZipUtil")
except Exception as e:
print("\n\n--ERROR-- zip_file.py error: %s\n\n" % e)
ZipUtil = self.loadClass("common/ZipUtil.apk", "ZipUtil")
return ZipUtil.unzip(target, source, destination)
@@ -1,5 +1,5 @@
from drozer.modules import common, Module
from WithSecure.common import fs
from reversec.common import fs
import os, sys, zipfile, tempfile
class Stack(object):
+3 -3
View File
@@ -10,11 +10,11 @@ class Check(Module, common.PackageManager, loader.ClassLoader):
[+] Opened @jdwp-control
[*] Accepting connections
[+] com.WithSecure.dz connected!
[+] com.reversec.dz connected!
[+] Received PID = 4931
[+] This device is vulnerable!
[+] com.WithSecure.dz connected!
[+] com.reversec.dz connected!
[+] Received PID = 4940
[+] This device is vulnerable!
"""
@@ -22,7 +22,7 @@ class Check(Module, common.PackageManager, loader.ClassLoader):
date = "2014-07-29"
license = "BSD (3 clause)"
path = ["exploit", "jdwp"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def execute(self, arguments):
@@ -18,7 +18,7 @@ The target provider is content://telephony/carriers/preferapn"""
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["exploit", "pilfer", "general"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def execute(self, arguments):
data = self.getResultSet(self.contentResolver().query("content://telephony/carriers/preferapn"))
@@ -9,7 +9,7 @@ class SettingsProvider(Module, common.TableFormatter, common.Provider):
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["exploit", "pilfer", "general"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def execute(self, arguments):
data = self.getResultSet(self.contentResolver().query("content://settings/secure"))
@@ -1,5 +1,5 @@
from drozer.modules import Module, common
from WithSecure.common import fs
from reversec.common import fs
class UnknownSources(Module, common.Exploit):
@@ -1,5 +1,5 @@
from drozer.modules import Module, common
from WithSecure.common import fs
from reversec.common import fs
import os, subprocess
class USBDebugging(Module, common.Exploit):
@@ -61,7 +61,7 @@ class USBDebugging(Module, common.Exploit):
elif "INSTALL_FAILED_ALREADY_EXISTS" in result.upper():
print( "[-] Already installed")
print( "[*] Uninstalling...")
subprocess.Popen([adbCommand, "uninstall", "com.WithSecure.dz"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).wait()
subprocess.Popen([adbCommand, "uninstall", "com.reversec.dz"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).wait()
print( "[*] Attempting to install agent...")
subprocess.Popen([adbCommand, "install", rogueAgentPath], stdout=subprocess.PIPE, stderr=subprocess.PIPE).wait()
else:
@@ -69,7 +69,7 @@ class USBDebugging(Module, common.Exploit):
return
print( "[*] Attempting to kick start drozer agent - Method 1 (Service)")
process = subprocess.Popen([adbCommand, "shell", "am", "startservice", "-n", "com.WithSecure.dz/.Agent"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
process = subprocess.Popen([adbCommand, "shell", "am", "startservice", "-n", "com.reversec.dz/.Agent"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
process.wait()
result = process.stdout.read() + process.stderr.read()
@@ -88,7 +88,7 @@ class USBDebugging(Module, common.Exploit):
else:
print( "[-] Failed")
print( "[*] Attempting to kick start drozer agent - Method 3 (Broadcast)")
process = subprocess.Popen([adbCommand, "shell", "am", "broadcast", "-a", "com.WithSecure.dz.PWN"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
process = subprocess.Popen([adbCommand, "shell", "am", "broadcast", "-a", "com.reversec.dz.PWN"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
process.wait()
result = process.stdout.read() + process.stderr.read()
print( "[*] No feedback available. You will have to look if you have a connection on your server")
@@ -1,6 +1,6 @@
from drozer.modules import common, Module
from drozer.configuration import Configuration
from WithSecure.common import fs
from reversec.common import fs
import os, sys
class addJavaScriptInterface(Module, common.Exploit):
@@ -13,7 +13,7 @@ class Permissions(Module, common.PackageManager):
date = "2014-06-17"
license = "BSD (3 clause)"
path = ["information"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("--permission", help="filter by specific permission")
+1 -1
View File
@@ -1,6 +1,6 @@
import os
from WithSecure.common import fs
from reversec.common import fs
from drozer.configuration import Configuration
from drozer.modules import common, Module
@@ -45,7 +45,7 @@ Package: com.android.mms
date = "2025-06-17"
license = "BSD (3-clause)"
path = ["scanner", "activity"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("-a", "--package", help="specify a package to search")
+1 -1
View File
@@ -9,7 +9,7 @@ class Native(Module, common.ClassLoader, common.Filters, common.PackageManager):
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["scanner", "misc"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("-a", "--package", help="specify a package to search")
@@ -9,7 +9,7 @@ class SecretCodes(Module, common.ClassLoader, common.PackageManager):
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["scanner", "misc"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("-v", "--verbose", action="store_true", default=False, help="be verbose")
@@ -11,7 +11,7 @@ class FindUris(Module, common.FileSystem, common.PackageManager, common.Provider
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["scanner", "provider"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("-a", "--package", help="specify a package to search")
@@ -11,7 +11,7 @@ class Injection(Module, common.FileSystem, common.PackageManager, common.Provide
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["scanner", "provider"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("-a", "--package", "--uri", dest="package_or_uri", help="specify a package, or content uri to search", metavar="<package or uri>")
@@ -11,7 +11,7 @@ class SqlTables(Module, common.FileSystem, common.PackageManager, common.Provide
date = "2013-01-23"
license = "BSD (3 clause)"
path = ["scanner", "provider"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("-a", "--package", "--uri", dest="package_or_uri", help="specify a package, or content uri to search", metavar="<package or uri>")
@@ -11,7 +11,7 @@ class Traversal(Module, common.FileSystem, common.PackageManager, common.Provide
date = "2012-11-06"
license = "BSD (3 clause)"
path = ["scanner", "provider"]
permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]
permissions = ["com.reversec.dz.permissions.GET_CONTEXT"]
def add_arguments(self, parser):
parser.add_argument("-a", "--package", "--uri", dest="package_or_uri", help="specify a package, or content uri to search", metavar="<package or uri>")
+6 -6
View File
@@ -13,15 +13,15 @@ WARNING: This minimal version of the su binary is completely unprotected, meanin
dz> run tools.setup.minimalsu
[*] Uploaded minimal-su
[*] Uploaded install-minimal-su.sh
[*] chmod 770 /data/data/com.WithSecure.dz/install-minimal-su.sh
[*] Ready! Execute /data/data/com.WithSecure.dz/install-minimal-su.sh from root context to install su
[*] chmod 770 /data/data/com.reversec.dz/install-minimal-su.sh
[*] Ready! Execute /data/data/com.reversec.dz/install-minimal-su.sh from root context to install su
...insert root exploit here...
u0_a95@android:/data/data/com.WithSecure.dz # /data/data/com.WithSecure.dz/install-minimal-su.sh
u0_a95@android:/data/data/com.reversec.dz # /data/data/com.reversec.dz/install-minimal-su.sh
Done. You can now use `su` from a shell.
u0_a95@android:/data/data/com.WithSecure.dz # exit
u0_a95@android:/data/data/com.WithSecure.dz $ su
u0_a95@android:/data/data/com.WithSecure.dz #
u0_a95@android:/data/data/com.reversec.dz # exit
u0_a95@android:/data/data/com.reversec.dz $ su
u0_a95@android:/data/data/com.reversec.dz #
"""
author = "Tyrone (@mwrlabs)"
date = "2013-12-12"
+1 -1
View File
@@ -1,6 +1,6 @@
import sys
from WithSecure.common import cli, console
from reversec.common import cli, console
from drozer.payload import builder
+1 -1
View File
@@ -5,7 +5,7 @@ import zipfile
from xml.etree import ElementTree as xml
from WithSecure.common import fs
from reversec.common import fs
from drozer.repoman.remotes import Remote, NetworkException
+1 -1
View File
@@ -1,4 +1,4 @@
from WithSecure.common import cli, console, text
from reversec.common import cli, console, text
from drozer.repoman.installer import ModuleInstaller
from drozer.repoman.remotes import Remote, NetworkException, UnknownRemote
+1 -1
View File
@@ -25,7 +25,7 @@ class Remote(object):
"""
if not Configuration.has_section('remotes'):
cls.create("https://raw.githubusercontent.com/WithSecureLabs/drozer-modules/repository/")
cls.create("https://raw.githubusercontent.com/ReversecLabs/drozer-modules/repository/")
return Configuration.get_all_values('remotes')
+1 -1
View File
@@ -5,7 +5,7 @@ import zipfile
from xml.etree import ElementTree as xml
from WithSecure.common import fs
from reversec.common import fs
class RepositoryBuilder(object):
"""
+1 -1
View File
@@ -1,6 +1,6 @@
import re
from WithSecure.common import fs
from reversec.common import fs
from drozer.server.receivers.http import HTTPResponse
+1 -1
View File
@@ -1,6 +1,6 @@
from pysolar.api import Frame
from WithSecure.common.twisted import StreamReceiver
from reversec.common.twisted import StreamReceiver
class FrameReceiver(StreamReceiver):
"""
+1 -1
View File
@@ -1,4 +1,4 @@
from WithSecure.common.twisted import StreamReceiver
from reversec.common.twisted import StreamReceiver
class HttpReceiver(StreamReceiver):
"""
+1 -1
View File
@@ -1,4 +1,4 @@
from WithSecure.common import cli, path_completion
from reversec.common import cli, path_completion
from drozer import util
from drozer.server import dz, uploader
+2 -2
View File
@@ -115,7 +115,7 @@
<section id="introduction">
<p>drozer allows you to assume the role of an Android app, and to interact with other apps, through Android’s Inter-Process Communication (IPC) mechanism, and the underlying operating system.</p>
<p>drozer also helps to you to remotely exploit an Android device, by building malicious files or web pages that exploit known vulnerabilities to install drozer as a remote administration tool. Depending on the permissions granted to the vulnerable app, drozer can install a full agent, inject a limited agent into the process or spawn a reverse shell.</p>
<p>drozer is open source software, released under a BSD license and maintained by MWR InfoSecurity.</p>
<p>drozer is open source software, released under a BSD license and maintained by Reversec.</p>
</section>
<section id="agent-download">
<a href="/default-agent.apk">Download Agent</a>
@@ -141,7 +141,7 @@
</form>
</section>
<section id="about">
<p><a href="http://labs.mwrinfosecurity.com" target="_blank">drozer by MWR Labs</a></p>
<p><a href="http://labs.reversec.com" target="_blank">drozer by Reversec Labs</a></p>
</section>
<script src="/jquery.js"></script>
+1 -1
View File
@@ -2,7 +2,7 @@ import os
import OpenSSL
import random
from WithSecure.common import fs, system
from reversec.common import fs, system
from drozer.configuration import Configuration
from drozer.ssl import ca
+1 -1
View File
@@ -1,6 +1,6 @@
import os
from WithSecure.common import cli
from reversec.common import cli
from drozer import meta
from drozer.ssl.provider import Provider
File diff suppressed because one or more lines are too long
@@ -5,7 +5,7 @@ import os
import subprocess
from sys import platform
from WithSecure.common import fs, system
from reversec.common import fs, system
class ClassBuilder(object):
"""
+2 -2
View File
@@ -5,7 +5,7 @@ import os
from pysolar.reflection.exceptions import ReflectionException
from pysolar.reflection.types.reflected_primitive import ReflectedPrimitive
from pysolar.reflection.utils import ClassBuilder
from WithSecure.common import fs
from reversec.common import fs
import codecs
@@ -105,7 +105,7 @@ class ClassLoader(object):
remote_hash = ""
try:
remote_verify = self.construct("com.WithSecure.dz.util.Verify")
remote_verify = self.construct("com.reversec.dz.util.Verify")
remote_hash = remote_verify.md5sum(remote)
except ReflectionException:
return True
+1 -1
View File
@@ -1,7 +1,7 @@
import argparse
import re
from WithSecure.common import path_completion
from reversec.common import path_completion
class ArgumentParserCompleter(object):
+1 -1
View File
@@ -2,7 +2,7 @@ import argparse
import sys
import textwrap
from WithSecure.common import console
from reversec.common import console
class Base(object):
"""
+6 -6
View File
@@ -21,8 +21,8 @@ import shlex
import sys
import textwrap
from WithSecure.common import system
from WithSecure.common.text import wrap
from reversec.common import system
from reversec.common.text import wrap
class Cmd(cmd.Cmd):
@@ -280,9 +280,9 @@ class Cmd(cmd.Cmd):
latest, date = meta.latest_version()
if latest is not None:
if meta.version > latest:
print("It seems that you are running a drozer pre-release. Brilliant!\n\nPlease send any bugs, feature requests or other feedback to our GitHub project:\nhttps://github.com/WithSecureLabs/drozer\n\nYour contributions help us to make drozer awesome.\n")
print("It seems that you are running a drozer pre-release. Brilliant!\n\nPlease send any bugs, feature requests or other feedback to our GitHub project:\nhttps://github.com/ReversecLabs/drozer\n\nYour contributions help us to make drozer awesome.\n")
elif meta.version < latest:
print("It seems that you are running an old version of drozer. drozer v%s was\nreleased on %s. We suggest that you update your copy to make sure that\nyou have the latest features and fixes.\n\nTo download the latest drozer visit:\nhttps://github.com/WithSecureLabs/drozer/releases\n" % (latest, date))
print("It seems that you are running an old version of drozer. drozer v%s was\nreleased on %s. We suggest that you update your copy to make sure that\nyou have the latest features and fixes.\n\nTo download the latest drozer visit:\nhttps://github.com/ReversecLabs/drozer/releases\n" % (latest, date))
except Exception as e:
#silence this exception unless in debug mode
self.handleException(e, shutup=True)
@@ -295,7 +295,7 @@ class Cmd(cmd.Cmd):
latestAgent, dateAgent = meta.latest_agent_version()
if latestAgent is not None:
if agentVersion < latestAgent:
print("It seems that you are running an old version of drozer-agent. drozer-agent v%s was\nreleased on %s. We suggest that you update your copy to make sure that\nyou have the latest features and fixes.\n\nTo download the latest drozer-agent visit:\nhttps://github.com/WithSecureLabs/drozer-agent/releases\n" % (latestAgent, dateAgent))
print("It seems that you are running an old version of drozer-agent. drozer-agent v%s was\nreleased on %s. We suggest that you update your copy to make sure that\nyou have the latest features and fixes.\n\nTo download the latest drozer-agent visit:\nhttps://github.com/ReversecLabs/drozer-agent/releases\n" % (latestAgent, dateAgent))
except Exception as e:
self.handleException(e, shutup=True)
pass
@@ -344,7 +344,7 @@ class Cmd(cmd.Cmd):
def __build_tee(self, console, destination):
"""
Create a WithSecure.system.Tee object to be used by output redirection.
Create a reversec.system.Tee object to be used by output redirection.
"""
if destination[0] == ">":
+1 -1
View File
@@ -2,7 +2,7 @@ import os
import platform
import struct
from WithSecure.common import text
from reversec.common import text
# Utility methods for calculating the size of a console.
+1 -1
View File
@@ -1,7 +1,7 @@
import os
import platform
from WithSecure.common.stream import DecolouredStream
from reversec.common.stream import DecolouredStream
def which(executable):
+1 -1
View File
@@ -1 +1 @@
from WithSecure.common.twisted.stream_receiver import StreamReceiver
from reversec.common.twisted.stream_receiver import StreamReceiver
@@ -46,7 +46,7 @@ class VerifyFileTestCase(unittest.TestCase):
"""
def constructor(*args, **kwargs):
if args[0] == "com.WithSecure.droidhg.util.Verify":
if args[0] == "com.reversec.droidhg.util.Verify":
return MockRemoteVerify()
if args[0] == "java.io.FileInputStream":
return MockFileInputStream(kwargs)
@@ -59,7 +59,7 @@ class VerifyFileTestCase(unittest.TestCase):
"""
def constructor(*args, **kwargs):
if args[0] == "com.WithSecure.droidhg.util.Verify":
if args[0] == "com.reversec.droidhg.util.Verify":
raise ReflectionException
if args[0] == "java.io.FileInputStream":
return MockFileInputStream(kwargs)
@@ -5,7 +5,7 @@ class MockReflector():
self.cache_delete_valid = [MockFile("thisisdex.dex"), MockFile("thisisapk.apk"), MockFile(".dex"), MockFile(".apk"), MockFile("dex"), MockFile("apk"), MockFile("somefile"), MockFile("fakedex.dexz"), MockFile("fakeapk.apkz")]
self.klass = MockKlass(self.cache_delete_valid)
def resolve(self,klass='com.WithSecure.droidhg.Agent'):
def resolve(self,klass='com.reversec.droidhg.Agent'):
return self.klass
@@ -117,7 +117,7 @@ class ModuleTestCase(unittest.TestCase):
ModuleTestCase.MockModule(MockSession(reflector)).getContext()
assert reflector.resolved == "com.WithSecure.droidhg.Agent"
assert reflector.resolved == "com.reversec.droidhg.Agent"
assert reflector.invoked[1] == "getContext"
def testItShouldResolveAKlass(self):